-
Notifications
You must be signed in to change notification settings - Fork 8
Light(er)weight tracing. #1957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Light(er)weight tracing. #1957
Conversation
| /// What kind of tracing (if any!) is this thread undertaking? | ||
| fn tracing_kind() -> IsTracing { | ||
| THREAD_IS_TRACING.with(|x| x.load(Ordering::Relaxed)) | ||
| let raw = &raw mut __yk_thread_tracing_state; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try again (in a follow up PR) to use an atomic here, thus avoiding the need for &raw, but as you can see, this PR is already big enough.
3439471 to
801e705
Compare
|
Looks like a simple Clippy fix. |
801e705 to
e8172db
Compare
|
Force pushed a fix. |
Light(er)weight tracing.
e8172db to
a1cbfc7
Compare
|
Not sure what happened there. Re-synced ykllvm anyway. |
a1cbfc7 to
91b429b
Compare
|
Force pushed more clippy fixes. |
91b429b to
01e0e7c
Compare
|
Fifth time lucky? |
Decide if we the current thread is tracing inline, in the interpreter, rather than calling off to Rust in every block. The Rust side now defines the thread local shared with LLVM IR generated by our software tracing pass. Also many fixes to make this work, the most important of which allows traces to retrieve live variables from registers (and not just spill slots). A large comment explains.
01e0e7c to
e0f8258
Compare
|
Force pushed the fix for the hanging test. We were worried about the potential performance hit from saving/restoring those 6 registers. This is what I measured on b15: I think that's still a good starting point for the other optimisations we've planned. Would you agree? |
|
(those results are from 5 process executions) |
|
LGTM! I take it I can now merge this? |
|
Go ahead! |
Requires: ykjit/ykllvm#291
Decide if we the current thread is tracing inline, in the interpreter, rather than calling off to Rust in every block.
The Rust side now defines the thread local shared with LLVM IR generated by our software tracing pass.
Also many fixes to make this work.