Skip to content

Commit 2a65e07

Browse files
davmasonhoyosjs
andauthored
[release/7.0] Managed EventSources do not show up by default in EventPipe sessions (#75248) (#77811)
* Update provider_compute_event_enable_mask so EventSouces with no keywords show up by default (#75248) Update ep-provider.c * Update ep-provider.c * Update src/native/eventpipe/ep-provider.c Co-authored-by: Juan Hoyos <[email protected]> Co-authored-by: Juan Hoyos <[email protected]>
1 parent 4ecef5f commit 2a65e07

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/native/eventpipe/ep-provider.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,16 @@ ep_provider_add_event (
245245

246246
ep_requires_lock_not_held ();
247247

248+
// Keyword bits 44-47 are reserved for use by EventSources, and every EventSource sets them all.
249+
// We filter out those bits here so later comparisons don't have to take them in to account. Without
250+
// filtering, EventSources wouldn't show up with Keywords=0.
251+
uint64_t session_mask = ~0xF00000000000;
252+
// -1 is special, it means all keywords and gets used on internal error notifications. Don't change it.
253+
uint64_t all_keywords = (uint64_t)(-1);
254+
if (keywords != all_keywords) {
255+
keywords &= session_mask;
256+
}
257+
248258
EventPipeEvent *instance = ep_event_alloc (
249259
provider,
250260
keywords,

0 commit comments

Comments
 (0)