[self-profiler] Add example to -Z help
to turn on query key recording
Also add the `default` option so that it's easy to add query key recording to the default.
This commit is contained in:
parent
9fe05e9456
commit
b1d0c118ff
2 changed files with 7 additions and 1 deletions
|
@ -136,9 +136,11 @@ bitflags::bitflags! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// keep this in sync with the `-Z self-profile-events` help message in librustc_session/options.rs
|
||||||
const EVENT_FILTERS_BY_NAME: &[(&str, EventFilter)] = &[
|
const EVENT_FILTERS_BY_NAME: &[(&str, EventFilter)] = &[
|
||||||
("none", EventFilter::NONE),
|
("none", EventFilter::NONE),
|
||||||
("all", EventFilter::ALL),
|
("all", EventFilter::ALL),
|
||||||
|
("default", EventFilter::DEFAULT),
|
||||||
("generic-activity", EventFilter::GENERIC_ACTIVITIES),
|
("generic-activity", EventFilter::GENERIC_ACTIVITIES),
|
||||||
("query-provider", EventFilter::QUERY_PROVIDERS),
|
("query-provider", EventFilter::QUERY_PROVIDERS),
|
||||||
("query-cache-hit", EventFilter::QUERY_CACHE_HITS),
|
("query-cache-hit", EventFilter::QUERY_CACHE_HITS),
|
||||||
|
|
|
@ -923,8 +923,12 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
|
||||||
self_profile: SwitchWithOptPath = (SwitchWithOptPath::Disabled,
|
self_profile: SwitchWithOptPath = (SwitchWithOptPath::Disabled,
|
||||||
parse_switch_with_opt_path, [UNTRACKED],
|
parse_switch_with_opt_path, [UNTRACKED],
|
||||||
"run the self profiler and output the raw event data"),
|
"run the self profiler and output the raw event data"),
|
||||||
|
// keep this in sync with the event filter names in librustc_data_structures/profiling.rs
|
||||||
self_profile_events: Option<Vec<String>> = (None, parse_opt_comma_list, [UNTRACKED],
|
self_profile_events: Option<Vec<String>> = (None, parse_opt_comma_list, [UNTRACKED],
|
||||||
"specifies which kinds of events get recorded by the self profiler"),
|
"specifies which kinds of events get recorded by the self profiler;
|
||||||
|
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, query-keys"),
|
||||||
emit_stack_sizes: bool = (false, parse_bool, [UNTRACKED],
|
emit_stack_sizes: bool = (false, parse_bool, [UNTRACKED],
|
||||||
"emits a section containing stack size metadata"),
|
"emits a section containing stack size metadata"),
|
||||||
plt: Option<bool> = (None, parse_opt_bool, [TRACKED],
|
plt: Option<bool> = (None, parse_opt_bool, [TRACKED],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue