Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
include keywords in V3 of EventPipe metadata, fixes #11934
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsitnik committed Jan 22, 2018
1 parent 2a0f168 commit 98ef2f5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/vm/eventpipeconfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,11 @@ EventPipeEventInstance* EventPipeConfiguration::BuildEventMetadataEvent(EventPip
const SString &providerName = sourceEvent.GetProvider()->GetProviderName();
unsigned int eventID = sourceEvent.GetEventID();
unsigned int eventVersion = sourceEvent.GetEventVersion();
INT64 keywords = sourceEvent.GetKeywords();
BYTE *pPayloadData = sourceEvent.GetMetadata();
unsigned int payloadLength = sourceEvent.GetMetadataLength();
unsigned int providerNameLength = (providerName.GetCount() + 1) * sizeof(WCHAR);
unsigned int instancePayloadSize = providerNameLength + sizeof(eventID) + sizeof(eventVersion) + sizeof(payloadLength) + payloadLength;
unsigned int instancePayloadSize = providerNameLength + sizeof(eventID) + sizeof(eventVersion) + sizeof(keywords) + sizeof(payloadLength) + payloadLength;

// Allocate the payload.
BYTE *pInstancePayload = new BYTE[instancePayloadSize];
Expand All @@ -455,6 +456,10 @@ EventPipeEventInstance* EventPipeConfiguration::BuildEventMetadataEvent(EventPip
memcpy(currentPtr, &eventVersion, sizeof(eventVersion));
currentPtr += sizeof(eventVersion);

// Write the event keywords.
memcpy(currentPtr, &keywords, sizeof(keywords));
currentPtr += sizeof(keywords);

// Write the size of the metadata.
memcpy(currentPtr, &payloadLength, sizeof(payloadLength));
currentPtr += sizeof(payloadLength);
Expand Down

0 comments on commit 98ef2f5

Please sign in to comment.