Skip to content

Conversation

lifengl
Copy link
Member

@lifengl lifengl commented Apr 16, 2024

Asking nested lock was not considered to be costly, but sending extra ETW event makes them to pop in performance traces. Since they don't provide much value to understand those traces, we should suppress them.

(Note: we don't send ETW when lock is released, so there is no work there.)

The reason behind this change is that this specific ETW event sometime is the primary delay of certain code path, and sometime could cause incorrect interpreting the trace.

During around 7s solution loading trace, the total thread delay from ETW events is about 1.8s, and this event contributed 0.8s, 2x more than any other events. Because capturing stack of ordinal nested lock does not provide lots of value, i think we should suppress it. It would still send event for all top level locks and when an upgradable lock becomes a write lock.

image

Note: the real CPU usage in VS is much lower, the overhead is mostly when the system collects stacks during capturing the event. It adds extra time to the code path, instead of direct CPU usage.

…automatically.

Asking nested lock was not considered to be costly, but sending extra ETW event makes them to pop in performance traces. Since they don't provide much value to understand those traces, we should suppress them.

(Note: we don't send ETW when lock is released, so there is no work there.)
@lifengl lifengl requested a review from AArnott April 16, 2024 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants