Mapping symbol formats back to the original code #50701
Unanswered
nschuessler
asked this question in
Q&A
Replies: 1 comment
-
There hasn't been much traction here, but I would suggest one thing: If you're using ETW for tracing, tools for ETW events have support for mapping symbols. WPA supports this https://docs.microsoft.com/en-us/previous-versions/windows/desktop/xperf/symbol-support If you can map the traces to a symbol in a similar way, that would be ideal. It would use actual symbol information and doesn't need to do any new logic that might be error prone. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a need to map profiling data back to the original code to provide tips in the IDE.
The reason is that even if you have a central team collecting and displaying this data in a tool somewhere, few developers actually will go to that tool on their own to review it.
Having it right in the IDE while they are working would allow more people to see methods that have performance issues.
Here are some example symbols collected from PerfView traces:
Note that these symbol names cannot be generated using built in Roslyn formatting capabilities. So the first approach people would try would be to write a bunch of regular expressions to map roslyn metadata format -> symbol format or more likely to "normalize" the symbol format -> how these methods are known in the IDE.
Of course there are a number of ways to do this, all with limitations:
For the normalizing (1) case:
roslyn
repository that will break the build if a new symbol format is created w/o a reverse mapping rule being added.for (2) and (3) downsides:
for (2) the additional downside is that manually putting attributes on each method is tedious. Tools are supposed to make things easier, not add work on your plate.
The other benefit of being able to reverse map these symbols is that fixes can be automated. I.e. if you see
List``1.Add
allocating lots of memory, a roslyn fix provider could go and find where theList<T>
is constructed and add an estimated size.Any thoughts or tips on how we can get tooling and automation to be able to correlate the data from production with the code in the IDE?
Beta Was this translation helpful? Give feedback.
All reactions