-
Notifications
You must be signed in to change notification settings - Fork 112
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
improve LOOM_LOG
tracing
#266
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
carllerche
approved these changes
May 4, 2022
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.
🔨
hawkw
added a commit
that referenced
this pull request
May 9, 2022
This commit adds a `tracing` span with the current model's iteration that's entered every time an iteration begins. This should make it much easier to distinguish individual iterations in the `LOOM_LOG` output. This was supposed to be part of #266 (and I discussed it in the PR description for that branch) but I forgot to push this commit. Whoops. Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
May 10, 2022
# 0.5.5 (May 10, 2022) ### Added - sync: Add `Arc::from_std` without `T: Sized` bound (#226) - sync: Implement `Debug` for `AtomicPtr` for all `T` (#255) - logs: Add location tracking for threads and atomic operations (#258) - logs: Add additional location tracking to `Arc`, `alloc`, and `mpsc` (#265) - logs: Improve `tracing` configuration for `LOOM_LOG` (#266) - logs: Add a span for the current model's iteration (#267) ### Documented - Add note about in-memory representation of atomic types (#253) - Document `LOOM_LOG` syntax (#257) ### Fixed - Fix double panic when exceeding the branch limit in `Drop` (#245) - cell: Allow using `{Mut,Const}Ptr::{deref,with}` when the pointee is `!Sized` (#247) - thread: Fix semantics of `thread::park` after `Thread::unpark` (#250)
hawkw
added a commit
that referenced
this pull request
May 13, 2022
# 0.5.5 (May 10, 2022) ### Added - sync: Add `Arc::from_std` without `T: Sized` bound (#226) - sync: Implement `Debug` for `AtomicPtr` for all `T` (#255) - logs: Add location tracking for threads and atomic operations (#258) - logs: Add additional location tracking to `Arc`, `alloc`, and `mpsc` (#265) - logs: Improve `tracing` configuration for `LOOM_LOG` (#266) - logs: Add a span for the current model's iteration (#267) ### Documented - Add note about in-memory representation of atomic types (#253) - Document `LOOM_LOG` syntax (#257) ### Fixed - Fix double panic when exceeding the branch limit in `Drop` (#245) - cell: Allow using `{Mut,Const}Ptr::{deref,with}` when the pointee is `!Sized` (#247) - thread: Fix semantics of `thread::park` after `Thread::unpark` (#250)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This branch makes a few minor improvements to how Loom uses
tracing
togenerate
LOOM_LOG
output:Added
with_test_writer
to thetracing
subscriber. This allows logswritten by Loom to be captured by
libtest
. This way, running Loomtests with
--show-output
will print theLOOM_LOG
output from eachtest under that test's heading. Similarly, this allows libtest to
capture Loom log output by default, and print the output back for
failed tests.
Updated to the latest
tracing-subscriber
version. This gets usslightly nicer-looking formatting but is otherwise not that important.
Added
tracing
spans for each simulated Loom thread. Now, when weswitch threads, we also switch to that thread's corresponding
tracing
span. This way, all output in the log is annotated with thecurrent thread's name, which should help improve debuggability a bit.
Added a
tracing
span with the model's current iteration. This shouldmake it much easier to distinguish when a new iteration has started,
while reading the logs.
Examples
Current
master
. Note how the log output from all tests is mushedtogether, and is not captured by
libtest
:This branch. Note how all
tracing
events are now annotated withthe thread ID and the current iteration, and how
libtest
is able tocapture output and separate it by which test emitted it: