-
Notifications
You must be signed in to change notification settings - Fork 717
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
TraceEvent: Getting allocation stacks on Linux #2057
Comments
I did additional tests on Linux and it turns out that the trace events contain extended data with stack traces. So, I will probably close this issue because it somehow answers most of my questions. However, it would be nice if I could get the confirmation that:
Also, it would be interesting to know if |
I will investigate alternative ways to trace allocations on Linux without dotnet-trace, either by manually creating a diagnostic-port based Anyway, both solutions are related to https://github.com/dotnet/diagnostics so I am closing this issue. |
Sorry for the delay @ocoanet, I have been out of the office. The |
Thank you very much for your response. To be honest I still do not know how to get stack traces from Here are my options:
It seems that my best option is to go deeper in the "evil" path and read the stack traces from the internal event record "ExtendedData". |
Gotcha. Let's make sure you have a good path forward. Option 1 above is what you should do. The raw sources ( If you want to do a live session, there is very new support for this, but it's not available in a released TraceEvent yet. It was just merged - #1867. I expect this to be in the next version of TraceEvent. I see that you're using |
Thank you for your answer.
Yes, I specifically want to detect all allocations and the performance impact is not important in my use case (I am not profiling the production instances). |
I am trying to create a simple OS independent allocation detection program. The detection program:
I can get allocation events (
ClrTraceEventParser.GCSampledObjectAllocation
) by using the allocations keywords. However, I cannot get stack events (ClrTraceEventParser.ClrStackWalk
) by using theClrTraceEventParser.Keywords.Stack
keyword.TraceLog
is still able to retrieve stack information from the allocation events usingTraceLog.ProcessExtendedData
, but the code is internal and seems to be Windows-specific. Also, I would like to avoid converting my event pipe files to ETLX because it consumes too much memory and crashes on low-memory containers.My questions are:
ClrTraceEventParser.Keywords.Stack
keyword on Linux?ClrTraceEventParser.ClrStackWalk
) on Linux?The text was updated successfully, but these errors were encountered: