perfview icon indicating copy to clipboard operation
perfview copied to clipboard

PerfView cannot find module names for managed .NET code

Open LogicRising opened this issue 2 years ago • 1 comments

PerfView can't seem to identify the names of modules for my process. It tends to either call them "?!?" or "ManagedModule". This prevents it from resolving symbols and finding the source code and makes stack traces difficult to interpret. The PerfView documentation says that loading symbols for managed .net code should "just work" without any recommendation when it doesn't work.

image

Here is the log from me loading the ETL file and attempting to load symbols through the right-click context menu for a few nodes, and trying to navigate to Source for method names that are in my project. For security reasons, I've renamed my process "MyService" where it appeared in the logs. PerfViewLogFile2.txt

LogicRising avatar Dec 27 '22 23:12 LogicRising

The string "ManagedModule" shows up when the file path for a managed module is unknown. This happens when a module load or module rundown event is missing. Most likely, the trace is missing an event, which can be caused for a number of reasons. The most common is that the rate of events is too high at the time the event is written out, and ETW can't keep up with the rate. When this happens, ETW will drop events. In all cases, the existence of the term "ManagedModule" doesn't necessarily mean that symbols won't resolve, but that instead, you just won't have the module name.

"?!?" means that there is either native code whose module we couldn't resolve, or jitted code whose symbols didn't make it into the trace file, likely for the same reason as described above.

The likely issue here is the rate of events was too high at some point. The best thing that you can do is to try and increase the /BufferSize and /CircularMB values.

brianrob avatar Jan 04 '23 18:01 brianrob