Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Performance Analyzer Missing ImageId Event

I have an application, that I want to profile using Windows Performance Analyzer. It all works, but I don't get any reasonable stack traces from my application.

The application in question is a demo application. This is to give me a good feeling if all checks out. Then I want to profile another application. Since I have full control over my demo application, I included some marker functions, that should show up in the stack trace.

When running the application on Windwos 71, Process Explorer shows the correct stack trace for the part, that I want to profile. Here is the stack trace with the marker functions in lines 7 - 9:

Process Explorer Stack Trace

Since I installed all performance analytics tools insinde a Windows 10 VM2, I started profiling there. The first thing to notice: Process Explorer does not show the correct stack trace. The marker functions that I implemented are nowhere to be found.

Nevertheless, I recorded performance traces using UIforETW and Windows Performance Recorder. When opening them in WPA and focussing on the target application, this is the stack trace:

WPA Stack Trace

All the information, I'm interested in is missing. The stack shows up as <Application>.exe!<Missing ImageId event>

What did I do wrong?


If this gives you a hint, here is the relevant software, that is installed:

1: The Windows 7 computer has Visual Studio (C#) installed.

2: The Windows 10 VM dowsn't have Visual Studio, but has WinDBG (Preview) and Windows Performance Toolkit installed.

I tagged delphi, because the target application is written in Delphi.

like image 378
rollstuhlfahrer Avatar asked Aug 26 '18 13:08

rollstuhlfahrer


1 Answers

The Windows 10 WPA (as well as Windows 8.1, to a lesser extent) dropped support for older debug symbol formats; it now only supports the "RSDS" format that has been standard since MSVC 7. PE files using older symbol file formats (for example, VB6 generates NB10 PDB files) will result in that "Missing ImageId event" error.

(The message itself is technically incorrect; there likely is an ImageId even in the trace file but it is looking for an ImageId/DbgID_RSDS event, which can't be generated for non-RSDS PDBs)

like image 149
Zhentar Avatar answered Nov 15 '22 05:11

Zhentar