Add tracing to validate_operand#143051
Merged
bors merged 2 commits intorust-lang:masterfrom Jun 27, 2025
Merged
Conversation
The name of the parameter changed from `op` to `val` in cbdcbf0
RalfJung
reviewed
Jun 26, 2025
Member
What happens if this gets merged without that PR? By default, all tracing is still disabled in Miri, right? |
Contributor
Author
Yes, this can be merged without issues even before rust-lang/miri#4406 |
Member
Okay, then please make the PR & description ready for that. :) |
Contributor
Author
|
@rustbot ready |
Collaborator
Member
|
@bors r+ rollup |
Collaborator
bors
added a commit
that referenced
this pull request
Jun 27, 2025
Rollup of 10 pull requests Successful merges: - #142270 (Rustdoc js: even more typechecking improvements) - #142420 (Report infer ty errors during hir ty lowering) - #142671 (add #![rustc_no_implicit_bounds]) - #142721 (Add tracing to `InterpCx::layout_of()` ) - #142818 (Port `#[used]` to new attribute parsing infrastructure) - #143020 (codegen_fn_attrs: make comment more precise) - #143051 (Add tracing to `validate_operand`) - #143060 (Only args in main diag are saved and restored without removing the newly added ones) - #143065 (Improve recovery when users write `where:`) - #143084 (const-eval: error when initializing a static writes to that static) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Jun 27, 2025
Rollup merge of #143051 - Stypox:tracing-validity, r=RalfJung Add tracing to `validate_operand` This PR adds a tracing call to keep track of how much time is spent in `validate_operand` and `const_validate_operand`. Let me know if more fine-grained tracing is needed (e.g. adding tracing to `validate_operand_internal` too, which is just called from those two functions). I also fixed the rustdoc of `validate_operand` and `const_validate_operand` since it was referencing an older name for the `val` parameter which was renamed in cbdcbf0. Here is some tracing output when Miri is run on `src/tools/miri/tests/pass/hello.rs`, visualizable in [ui.perfetto.dev](https://ui.perfetto.dev/): [trace-1750932222218210.json](https://github.com/user-attachments/files/20924000/trace-1750932222218210.json) **Note: obtaining tracing output depends on rust-lang/miri#4406, but this PR is standalone and can be merged without waiting for rust-lang/miri#4406 r? `@RalfJung`
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Jun 28, 2025
Rollup of 10 pull requests Successful merges: - rust-lang/rust#142270 (Rustdoc js: even more typechecking improvements) - rust-lang/rust#142420 (Report infer ty errors during hir ty lowering) - rust-lang/rust#142671 (add #![rustc_no_implicit_bounds]) - rust-lang/rust#142721 (Add tracing to `InterpCx::layout_of()` ) - rust-lang/rust#142818 (Port `#[used]` to new attribute parsing infrastructure) - rust-lang/rust#143020 (codegen_fn_attrs: make comment more precise) - rust-lang/rust#143051 (Add tracing to `validate_operand`) - rust-lang/rust#143060 (Only args in main diag are saved and restored without removing the newly added ones) - rust-lang/rust#143065 (Improve recovery when users write `where:`) - rust-lang/rust#143084 (const-eval: error when initializing a static writes to that static) r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or 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
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 PR adds a tracing call to keep track of how much time is spent in
validate_operandandconst_validate_operand. Let me know if more fine-grained tracing is needed (e.g. adding tracing tovalidate_operand_internaltoo, which is just called from those two functions).I also fixed the rustdoc of
validate_operandandconst_validate_operandsince it was referencing an older name for thevalparameter which was renamed in cbdcbf0.Here is some tracing output when Miri is run on
src/tools/miri/tests/pass/hello.rs, visualizable in ui.perfetto.dev: trace-1750932222218210.jsonNote: obtaining tracing output depends on rust-lang/miri#4406, but this PR is standalone and can be merged without waiting for rust-lang/miri#4406.
r? @RalfJung