From: David Mason Date: Tue, 4 Oct 2022 09:16:29 +0000 (-0700) Subject: Update provider_compute_event_enable_mask so EventSouces with no keywords show up... X-Git-Tag: accepted/tizen/unified/riscv/20231226.055536~6096 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=28c7eb85636d8c97d44b0a619d59eb98ba0b98e3;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Update provider_compute_event_enable_mask so EventSouces with no keywords show up by default (#75248) --- diff --git a/src/native/eventpipe/ep-provider.c b/src/native/eventpipe/ep-provider.c index c864043..31c838d 100644 --- a/src/native/eventpipe/ep-provider.c +++ b/src/native/eventpipe/ep-provider.c @@ -245,6 +245,16 @@ ep_provider_add_event ( ep_requires_lock_not_held (); + // Keyword bits 44-47 are reserved for use by EventSources, and every EventSource sets them all. + // We filter out those bits here so later comparisons don't have to take them in to account. Without + // filtering, EventSources wouldn't show up with Keywords=0. + uint64_t session_mask = ~0xF00000000000; + // -1 is special, it means all keywords. Don't change it. + uint64_t all_keywords = (uint64_t)(-1); + if (keywords != all_keywords) { + keywords &= session_mask; + } + EventPipeEvent *instance = ep_event_alloc ( provider, keywords,