Integrate measureme's hardware performance counter support.
This commit is contained in:
parent
083721a1a7
commit
d76573abd1
4 changed files with 21 additions and 5 deletions
|
@ -1473,6 +1473,12 @@ options! {
|
|||
for example: `-Z self-profile-events=default,query-keys`
|
||||
all options: none, all, default, generic-activity, query-provider, query-cache-hit
|
||||
query-blocked, incr-cache-load, incr-result-hashing, query-keys, function-args, args, llvm, artifact-sizes"),
|
||||
self_profile_counter: String = ("wall-time".to_string(), parse_string, [UNTRACKED],
|
||||
"counter used by the self profiler (default: `wall-time`), one of:
|
||||
`wall-time` (monotonic clock, i.e. `std::time::Instant`)
|
||||
`instructions:u` (retired instructions, userspace-only)
|
||||
`instructions-minus-irqs:u` (subtracting hardware interrupt counts for extra accuracy)"
|
||||
),
|
||||
share_generics: Option<bool> = (None, parse_opt_bool, [TRACKED],
|
||||
"make the current crate share its generic instantiations"),
|
||||
show_span: Option<String> = (None, parse_opt_string, [TRACKED],
|
||||
|
|
|
@ -1252,7 +1252,8 @@ pub fn build_session(
|
|||
let profiler = SelfProfiler::new(
|
||||
directory,
|
||||
sopts.crate_name.as_deref(),
|
||||
&sopts.debugging_opts.self_profile_events,
|
||||
sopts.debugging_opts.self_profile_events.as_ref().map(|xs| &xs[..]),
|
||||
&sopts.debugging_opts.self_profile_counter,
|
||||
);
|
||||
match profiler {
|
||||
Ok(profiler) => Some(Arc::new(profiler)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue