-
Notifications
You must be signed in to change notification settings - Fork 0
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 support for Performance Monitoring Counters (PMC) #59
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1bfa8ca
to
8bf37bc
Compare
This is to reduce the required LFS bandwidth of the GitHub actions. The solution is based on actions/checkout#165 (comment)
Support samples that do not have a stack attached to them, but only a single instruction pointer (or in case of perf-data samples, they theoretically might not even have that).
Process PMC counter profile events and generate a separate list of samples per thread. Stack walk events are attached to any matching sample for both "regular" samples, as well as PMC samples.
Only kernel events have an attribute id attached, but we tried to read/find them for all (including perf) events. This was working in cases where there is only one event source, since we did never really look for the correct id, but simply took the one and only attribute as default. Put with multiple event sources, this was failing. To fix this, the special kernel event handling is now done a little bit earlier in the event creation code, before we try to find the correct attributes for an event, and we simply skip this step for non kernel events.
If the ETL files does not come from vsdiagnostics.exe (e.g. directly from xperf), it does not include any information about the process we where trying to profile. Hence we try to narrow down the list of processes by only looking at processes that have at least one sample.
Use an xperf command line that looks like the one that has probably started the trace.
7459f12
to
5788d2b
Compare
Instead of doing an analysis for each source separately, we analyze all samples from all available sources at the same time (regardless of whether they have stacks attached or not).
The script invokes XPerf (elevating via Windows UAC dialogs if necessary) and supports sample based profiling for regular timing events, as well es PMC events. Additionally, it introduces a new event provider and event to attach information about the target process that is being profiled to the ETL file.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a very coarse and initial implementation to support multiple sample sources (usually from performance monitoring counters).