-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Provide option for specifying the profiler runtime #85284
Conversation
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
Currently, if `-Zinstrument-coverage` is enabled, the target is linked against the `library/profiler_builtins` crate (which pulls in LLVM's compiler-rt runtime). This option enables backends to specify an alternative runtime crate for handling injected instrumentation calls.
5e5cb17
to
93c6362
Compare
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.
So, is there currently any work being held up elsewhere by this? I.e. is there another profiler runtime ready?
I'm also not sure if this deserves an MCP. I'm not sure how used this option is?
There might be someone better to review this then me (someone more familiar in this area). That being said, the code changes here look mostly fine (modulo one nit). Are there any tests that can be added here?
@eggyal do you know someone who might be a better reviewer? I'm basically okay approving this, if
|
I have an alternative profiler runtime for an under-development incremental test runner that uses cg_clif, but it's not ready no. @bjorn3 do you have r+ privileges? Would you be an appropriate reviewer for this? Else perhaps @tmandry or @wesleywiser given that the profiler runtime is part of the coverage instrumentation that I think they oversaw? |
This seems fine to me but let's cc @Amanieu who added |
I added that flag for minicov which provides a Since the profiler runtime is provided by the crate, it just needs rustc/LLVM to emit the profiling instrumentation without injecting a profiling runtime. |
@rustbot label: +S-waiting-on-review -S-waiting-on-author |
📌 Commit 872839e has been approved by |
☀️ Test successful - checks-actions |
This was removed by rust-lang#85284 in favor of -Zprofiler-runtime=<name>. However the suggested -Zprofiler-runtime=None doesn't work because "None" is treated as a crate name.
…h726 Add back -Zno-profiler-runtime This was removed by rust-lang#85284 in favor of `-Zprofiler-runtime=<name>`.However the suggested `-Zprofiler-runtime=None` doesn't work because`None` is treated as a crate name.
…h726 Add back -Zno-profiler-runtime This was removed by rust-lang#85284 in favor of `-Zprofiler-runtime=<name>`.However the suggested `-Zprofiler-runtime=None` doesn't work because`None` is treated as a crate name.
Currently, if
-Zinstrument-coverage
is enabled, the target is linkedagainst the
library/profiler_builtins
crate (which pulls in LLVM'scompiler-rt runtime).
This option enables backends to specify an alternative runtime crate for
handling injected instrumentation calls.