From 70aa756555e9905d273a5c302f78482066bc404a Mon Sep 17 00:00:00 2001 From: David Mason Date: Tue, 4 Oct 2022 02:16:29 -0700 Subject: [PATCH 1/3] Update provider_compute_event_enable_mask so EventSouces with no keywords show up by default (#75248) Update ep-provider.c --- src/native/eventpipe/ep-provider.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/native/eventpipe/ep-provider.c b/src/native/eventpipe/ep-provider.c index c8640433478fb4..b83a841a9ef822 100644 --- a/src/native/eventpipe/ep-provider.c +++ b/src/native/eventpipe/ep-provider.c @@ -245,6 +245,11 @@ 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. + keywords &= ~0xF00000000000; + EventPipeEvent *instance = ep_event_alloc ( provider, keywords, From a956d8170109519a577c3566de80db3df61edad8 Mon Sep 17 00:00:00 2001 From: David Mason Date: Thu, 3 Nov 2022 13:09:36 -0700 Subject: [PATCH 2/3] Update ep-provider.c --- src/native/eventpipe/ep-provider.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/native/eventpipe/ep-provider.c b/src/native/eventpipe/ep-provider.c index b83a841a9ef822..31c838ddec5e33 100644 --- a/src/native/eventpipe/ep-provider.c +++ b/src/native/eventpipe/ep-provider.c @@ -248,7 +248,12 @@ ep_provider_add_event ( // 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. - keywords &= ~0xF00000000000; + 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, From 73e0b5959e35492c8cf35efeee25359928cdd35b Mon Sep 17 00:00:00 2001 From: David Mason Date: Thu, 3 Nov 2022 17:15:50 -0700 Subject: [PATCH 3/3] Update src/native/eventpipe/ep-provider.c Co-authored-by: Juan Hoyos --- src/native/eventpipe/ep-provider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/native/eventpipe/ep-provider.c b/src/native/eventpipe/ep-provider.c index 31c838ddec5e33..fd8fb57cbd2723 100644 --- a/src/native/eventpipe/ep-provider.c +++ b/src/native/eventpipe/ep-provider.c @@ -249,7 +249,7 @@ ep_provider_add_event ( // 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. + // -1 is special, it means all keywords and gets used on internal error notifications. Don't change it. uint64_t all_keywords = (uint64_t)(-1); if (keywords != all_keywords) { keywords &= session_mask;