Skip to content

Conversation

@two-heart
Copy link
Contributor

Introduces basic Thread Safety Analyser support. In contrast to #7189, this does only adds support + a script to see the TSA warnings. As discussed offline with @ripatel-fd, follow up PRs will add annotations support to individual components. Later with the follow-up PRs merged we can decide if we want to run TSA on every PR, or if we want to use the sarif v2 output from the checker script and feed it into GitHub code scanning in nightly.

@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.07307 s 0.073083 s 0.018%
backtest mainnet-368528500-perf snapshot load 4.683 s 3.307 s -29.383%
backtest mainnet-368528500-perf total elapsed 73.06989 s 73.08337 s 0.018%
firedancer mem usage with mainnet.toml 987.33 GiB 987.33 GiB 0.000%


static inline void
fd_rwlock_write( fd_rwlock_t * lock ) {
fd_rwlock_write( fd_rwlock_t * lock ) FD_ACQUIRE( lock ) FD_NO_THREAD_SAFETY_ANALYSIS {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this disabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To suppress TSA checks inside the lock primitive implementation itself, while still keeping lock state tracking for callers. This is the common way to annotate the lock itself, see e.g. https://github.com/torvalds/linux/blob/master/tools/perf/util/mutex.c#L58

Introduces basic Thread Safety Analyser support. In contrast to #7189,
this does only adds support + a script to see the TSA warnings.
As discussed offline with @ripatel-fd, follow up PRs will add
annotations support to individual components. Later with the follow-up
PRs merged we can decide if we want to run TSA on every PR, or if we
want to use the sarif v2 output from the checker script and feed it
into GitHub code scanning in nightly.
@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.061206 s 0.061613 s 0.665%
backtest mainnet-368528500-perf snapshot load 2.44 s 2.175 s -10.861%
backtest mainnet-368528500-perf total elapsed 61.205839 s 61.612532 s 0.664%
firedancer mem usage with mainnet.toml 987.33 GiB 987.33 GiB 0.000%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants