-
Notifications
You must be signed in to change notification settings - Fork 715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ContentionStart_V2
and LockCreated
events
#1731
Conversation
kouvel
commented
Oct 19, 2022
- Depends on Add new version of the ContentionStart event dotnet/runtime#72627
For some reason the
Any idea why the event name is not showing up? [Edit] Looks like it's because of |
CC @brianrob |
Yes, this is because of how events get named. Can you update the runtime to use a new task called |
It seems to be working fine now after the latest commit, where the name is overridden. Why does using the From only one perspective, I'd actually like to see the event shown as |
Names are usually a combination of Task + Opcode when possible. There are a few different versions of ETW providers, and so this isn't always the case, but often it is. Each tool has to build its own logic as event names aren't encoded into the manifest directly.
It seems reasonable to have it show up as Contention/LockCreated - the right way to do this is to create a LockCreated opcode, and then have the LockCreated event use the Contention task + LockCreated opcode. It's always possible to update PerfView to change things, but from a consistency POV, I would rather see us stick to the convention and change the event definition, especially for new events. If you'd like to change to this, I completely support that. |
I see, sounds good |
@kouvel, wanted to check back in on this. Are you planning to change this to be |
Yea I'm planning to change it, haven't found the time yet, it's on my list |
Sounds good. Just wanted to make sure. Thanks. |
Rebased to latest and added one commit to update the event name based on dotnet/runtime#86817 and to not override it. After dotnet/runtime#86817 and the latest commit, the event is showing up as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - just one thing that I think we should change.
@@ -2162,13 +2174,17 @@ static private ThreadPoolMinMaxThreadsTraceData ThreadPoolMinMaxThreadsTemplate( | |||
{ // action, eventid, taskid, taskName, taskGuid, opcode, opcodeName, providerGuid, providerName | |||
return new ThreadPoolMinMaxThreadsTraceData(action, 59, 38, "ThreadPoolMinMaxThreads", ThreadPoolMinMaxThreadsTaskGuid, 0, "Info", ProviderGuid, ProviderName); | |||
} | |||
static private ContentionLockCreatedTraceData ContentionLockCreatedTemplate(Action<ContentionLockCreatedTraceData> action) | |||
{ // action, eventid, taskid, taskName, taskGuid, opcode, opcodeName, providerGuid, providerName | |||
return new ContentionLockCreatedTraceData(action, 90, 8, "Contention", ContentionTaskGuid, 11, "LockCreated", ProviderGuid, ProviderName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this will show up as a Contention/Info
event and not a LockCreated
event. To fix this, you will want to create LockCreated
opcode, and use that. Unless I've missed something, this is the event definition, using the win:Info
opcode:
<event value="90" version="0" level="win:Informational" template="LockCreated"
keywords ="ContentionKeyword" opcode="win:Info"
task="Contention"
symbol="LockCreated" message="$(string.RuntimePublisher.LockCreatedEventMessage)"/>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I stand corrected - I missed your pending change in dotnet/runtime: dotnet/runtime#86817. Once the change in dotnet/runtime is merged, I will merge this change as well.
- The event was added in .NET 8, I have updated the event name based on the suggestion in microsoft/perfview#1731 (comment). - The name now matches the convention used for most other events, and shows up as Contention/LockCreated as expected in PerfView
Thanks, I have merged dotnet/runtime#86817 |