Skip to content

Commit d0a91c5

Browse files
committed
Don't change -1 as a keyword
1 parent 480eee9 commit d0a91c5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/native/eventpipe/ep-provider.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,12 @@ ep_provider_add_event (
248248
// Keyword bits 44-47 are reserved for use by EventSources, and every EventSource sets them all.
249249
// We filter out those bits here so later comparisons don't have to take them in to account. Without
250250
// filtering, EventSources wouldn't show up with Keywords=0.
251-
int64_t session_mask = ~0xF00000000000;
252-
keywords &= session_mask;
251+
uint64_t session_mask = ~0xF00000000000;
252+
// -1 is special, it means all keywords. Don't change it.
253+
uint64_t all_keywords = (uint64_t)(-1);
254+
if (keywords != all_keywords) {
255+
keywords &= session_mask;
256+
}
253257

254258
EventPipeEvent *instance = ep_event_alloc (
255259
provider,

0 commit comments

Comments
 (0)