Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mason <davmason@microsoft.com>2022-11-07 21:56:10 +0300
committerGitHub <noreply@github.com>2022-11-07 21:56:10 +0300
commit2a65e07a9cd2eb588c59a8d2b7d373de6fef4b8e (patch)
treee22205e6b874915ba35db89528a7951b08e4f504
parent4ecef5f32b3a08967e77c28d0fab04a7a4290c21 (diff)
[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 <juan.hoyos@microsoft.com> Co-authored-by: Juan Hoyos <juan.hoyos@microsoft.com>
-rw-r--r--src/native/eventpipe/ep-provider.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/native/eventpipe/ep-provider.c b/src/native/eventpipe/ep-provider.c
index c8640433478..fd8fb57cbd2 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 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;
+ }
+
EventPipeEvent *instance = ep_event_alloc (
provider,
keywords,