diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-01-17 18:53:42 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-17 18:53:42 +0530 |
| commit | ed0e11a3cbaa4c3d3a6e90c2dea197952398ab88 (patch) | |
| tree | ff6a1a7ab9f12bcf92608a844ac3d4009f1488e1 | |
| parent | 8c016c3c36bdfcc256edea38c969c72304aad60e (diff) | |
| parent | b1d0c118ff726fc8c5ff2a5a19840a9e36e8940e (diff) | |
| download | rust-ed0e11a3cbaa4c3d3a6e90c2dea197952398ab88.tar.gz rust-ed0e11a3cbaa4c3d3a6e90c2dea197952398ab88.zip | |
Rollup merge of #68278 - wesleywiser:doc_query_key_recording, r=michaelwoerister
[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. r? @michaelwoerister
| -rw-r--r-- | src/librustc_data_structures/profiling.rs | 2 | ||||
| -rw-r--r-- | src/librustc_session/options.rs | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/librustc_data_structures/profiling.rs b/src/librustc_data_structures/profiling.rs index 004db0a79a8..44cef727f03 100644 --- a/src/librustc_data_structures/profiling.rs +++ b/src/librustc_data_structures/profiling.rs @@ -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)] = &[ ("none", EventFilter::NONE), ("all", EventFilter::ALL), + ("default", EventFilter::DEFAULT), ("generic-activity", EventFilter::GENERIC_ACTIVITIES), ("query-provider", EventFilter::QUERY_PROVIDERS), ("query-cache-hit", EventFilter::QUERY_CACHE_HITS), diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs index 4b5736adc17..2a0ed27b63b 100644 --- a/src/librustc_session/options.rs +++ b/src/librustc_session/options.rs @@ -923,8 +923,12 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, self_profile: SwitchWithOptPath = (SwitchWithOptPath::Disabled, parse_switch_with_opt_path, [UNTRACKED], "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], - "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], "emits a section containing stack size metadata"), plt: Option<bool> = (None, parse_opt_bool, [TRACKED], |
