Skip to content

Commit 0b5b004

Browse files
committed
Added event kind for cgu names
Changed field name Changed field name Added event kinds for cgu names and tracking merges
1 parent 175b8db commit 0b5b004

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compiler/rustc_data_structures/src/profiling.rs

+6
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ bitflags::bitflags! {
111111
const LLVM = 1 << 7;
112112
const INCR_RESULT_HASHING = 1 << 8;
113113

114+
const CGU_NAMES = 1 << 9;
115+
114116
const DEFAULT = Self::GENERIC_ACTIVITIES.bits |
115117
Self::QUERY_PROVIDERS.bits |
116118
Self::QUERY_BLOCKED.bits |
@@ -136,6 +138,7 @@ const EVENT_FILTERS_BY_NAME: &[(&str, EventFilter)] = &[
136138
("args", EventFilter::ARGS),
137139
("llvm", EventFilter::LLVM),
138140
("incr-result-hashing", EventFilter::INCR_RESULT_HASHING),
141+
("cgu-names", EventFilter::CGU_NAMES),
139142
];
140143

141144
/// Something that uniquely identifies a query invocation.
@@ -425,6 +428,7 @@ pub struct SelfProfiler {
425428
incremental_result_hashing_event_kind: StringId,
426429
query_blocked_event_kind: StringId,
427430
query_cache_hit_event_kind: StringId,
431+
cgu_merge_event_kind: StringId,
428432
}
429433

430434
impl SelfProfiler {
@@ -447,6 +451,7 @@ impl SelfProfiler {
447451
profiler.alloc_string("IncrementalResultHashing");
448452
let query_blocked_event_kind = profiler.alloc_string("QueryBlocked");
449453
let query_cache_hit_event_kind = profiler.alloc_string("QueryCacheHit");
454+
let cgu_merge_event_kind = profiler.alloc_string("CguMerged");
450455

451456
let mut event_filter_mask = EventFilter::empty();
452457

@@ -491,6 +496,7 @@ impl SelfProfiler {
491496
incremental_result_hashing_event_kind,
492497
query_blocked_event_kind,
493498
query_cache_hit_event_kind,
499+
cgu_merge_event_kind,
494500
})
495501
}
496502

0 commit comments

Comments
 (0)