Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion compiler/rustc_data_structures/src/profiling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ bitflags::bitflags! {
/// Store aggregated counts of cache hits per query invocation.
const QUERY_CACHE_HIT_COUNTS = 1 << 10;

// keep this in sync with the `-Z self-profile-events` help message in rustc_session/src/options.rs
const DEFAULT = Self::GENERIC_ACTIVITIES.bits() |
Self::QUERY_PROVIDERS.bits() |
Self::QUERY_BLOCKED.bits() |
Expand All @@ -128,12 +129,13 @@ bitflags::bitflags! {
Self::ARTIFACT_SIZES.bits() |
Self::QUERY_CACHE_HIT_COUNTS.bits();

// keep this in sync with the `-Z self-profile-events` help message in rustc_session/src/options.rs
const ARGS = Self::QUERY_KEYS.bits() | Self::FUNCTION_ARGS.bits();
const QUERY_CACHE_HIT_COMBINED = Self::QUERY_CACHE_HITS.bits() | Self::QUERY_CACHE_HIT_COUNTS.bits();
}
}

// keep this in sync with the `-Z self-profile-events` help message in rustc_session/options.rs
// keep this in sync with the `-Z self-profile-events` help message in rustc_session/src/options.rs
const EVENT_FILTERS_BY_NAME: &[(&str, EventFilter)] = &[
("none", EventFilter::empty()),
("all", EventFilter::all()),
Expand Down
9 changes: 6 additions & 3 deletions compiler/rustc_session/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2839,12 +2839,15 @@ written to standard error output)"),
`instructions:u` (retired instructions, userspace-only)
`instructions-minus-irqs:u` (subtracting hardware interrupt counts for extra accuracy)"
),
/// keep this in sync with the event filter names in librustc_data_structures/profiling.rs
/// keep this in sync with the event filter names and defaults in rustc_data_structures/src/profiling.rs
self_profile_events: Option<Vec<String>> = (None, parse_opt_comma_list, [UNTRACKED],
"specify the events 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, incr-result-hashing, query-keys, function-args, args, llvm, artifact-sizes"),
all option groups: none, all, default, args
`default` contains: generic-activity, query-provider, query-cache-hit-count, \
query-blocked, incr-cache-load, incr-result-hashing, artifact-sizes
`args` contains: query-keys, function-args
remaining (ungrouped) options: query-cache-hit, llvm"),
share_generics: Option<bool> = (None, parse_opt_bool, [TRACKED],
"make the current crate share its generic instantiations"),
shell_argfiles: bool = (false, parse_bool, [UNTRACKED],
Expand Down
Loading