Can't profile from MSDEV98
-
I am trying to profile some performance-critical code and I can't seem to get the profiler to work. It's been ages since I have used it, so I am probably doing something dumb. I am using MS Visual Studio 6 Pro, SP 5 under Win2k Pro SP 2. I am running on an account that is a member of "Administrators" and I have granted "Administrators" the right to profile both single processes and system processes.
- I create a new project from MSDEV (The same thing happens for both console and MFC applications).
- I go to "Project/Settings," choose the release build, and tell C++ to generate program database debugging info, and tell link to enable profiling and output both a map file and debuging info.
- Set build config to Release and rebuild all.
- "Profile..." is still grayed in the "Build" menu.
- If I run PREP, PROFILE, PREP /M, PLIST from the command line, I get some output, but PLIST throws a fatal error trying to read illegal memory (
The instruction at "0x004060f6" referenced memory at "0x7bd22ef0." The memory could not be "read"
).
Can anyone help me understand why the code profiler seems not to be working here?
-
I am trying to profile some performance-critical code and I can't seem to get the profiler to work. It's been ages since I have used it, so I am probably doing something dumb. I am using MS Visual Studio 6 Pro, SP 5 under Win2k Pro SP 2. I am running on an account that is a member of "Administrators" and I have granted "Administrators" the right to profile both single processes and system processes.
- I create a new project from MSDEV (The same thing happens for both console and MFC applications).
- I go to "Project/Settings," choose the release build, and tell C++ to generate program database debugging info, and tell link to enable profiling and output both a map file and debuging info.
- Set build config to Release and rebuild all.
- "Profile..." is still grayed in the "Build" menu.
- If I run PREP, PROFILE, PREP /M, PLIST from the command line, I get some output, but PLIST throws a fatal error trying to read illegal memory (
The instruction at "0x004060f6" referenced memory at "0x7bd22ef0." The memory could not be "read"
).
Can anyone help me understand why the code profiler seems not to be working here?
I found some answers to my own problem:
- KB Q224382 answers why the profiler is grayed out on the menu. There is a known bug, whereby you need to manually create the registry value (REG_DWORD) HKLM\Software\Microsoft\DevStudio\6.0\General\ProfilerInstalled = 0x1
- KB Q195374 answers the PLIST crash. PLIST cannot handle symbols longer than 255 characters, so it crashes if you use STL with call attributed profiling.
I have found another bug with the profiler. The debug info generated by MSVC has multiple line numbers for several STL functions, so you get scads of "offset duplication" error messages from PREP. Oh well, I guess profiling STL is not really possible on VC6. Does anyone know if it is possible under VC7?
-
I found some answers to my own problem:
- KB Q224382 answers why the profiler is grayed out on the menu. There is a known bug, whereby you need to manually create the registry value (REG_DWORD) HKLM\Software\Microsoft\DevStudio\6.0\General\ProfilerInstalled = 0x1
- KB Q195374 answers the PLIST crash. PLIST cannot handle symbols longer than 255 characters, so it crashes if you use STL with call attributed profiling.
I have found another bug with the profiler. The debug info generated by MSVC has multiple line numbers for several STL functions, so you get scads of "offset duplication" error messages from PREP. Oh well, I guess profiling STL is not really possible on VC6. Does anyone know if it is possible under VC7?
It's better to get some good profilers like NuMega TrueTime. I think there is one which they are giving away for free for VC7 go to http://www.compuware.com. Look for something called Community Profiler