Visual C++ 2010 premium - cannot profile with instrumentation
-
Sunday, August 08, 2010 8:32 AM
Hi,
Have been doing CPU sampling profiling on a C++ Win32 Application project for a while. Now when I try to profile it with instrumentation (using the performance wizard) I get the following dump when the wizard finishes:
Profiling started.
Instrumenting <<.exe full path/name>> in place
Info VSP3049: Small functions will be excluded from instrumentation.
Microsoft (R) VSInstr Post-Link Instrumentation 10.0.30319 x86
Copyright (C) Microsoft Corp. All rights reserved.
Warning VSP2005: Internal instrumentation warning: The object '<<some .lib object>>' was built without debug information.
File to Process:
<<.exe full path/name>> --> <<.exe full path/name>>
Original file backed up to <<.exe full path/name.orig>>
Warning VSP2005: Internal instrumentation warning: The object '<<some .lib object (same as before)>>' was built without debug information.
Successfully instrumented file <<.exe full path/name>>.
The process cannot access the file '<<.exe full path/name>>' because it is being used by another process.
Data written to <<.exe full path/name suffixed with 100808.vsp>>.
Profiling finished.
File contains no data buffers
File contains no data buffers
Analysis failed
The process cannot access the file '<<.exe full path/name>>' because it is being used by another process.
Profiling complete.As far as I can tell, I have made no changes to the default settings that could affect any paths relavent to the creation of profiling-related files.
Please help...
BR,
Erez
All Replies
-
Tuesday, August 10, 2010 5:45 AM
Hello Erez,
As far as I know, if your process is launched before the profiler monitor, then, no data will be collected. Make sure your Win32 application is not running (you may need Process Explorer for help) and then try again. Hope this tip helps.
- Marked As Answer by Roahn LuoModerator Friday, August 13, 2010 10:36 AM
-
Tuesday, August 17, 2010 11:09 PMModerator
Hi Erez,
Could you please provide some more information regarding your project(s) configuration. Are there multiple projects involved in this scenario with some sort of dependency between them?
We have seen a similar access privilege error during instrumentation in C++ projects of the dependent project binary( say B.dll) which is referenced by a another project (say A.exe). If that's the scenario for you as well then the workaround for now would be to change the target build destination of the project B to to something outside of the current location and separately instrument that project (B.dll) and place to into the right destination directory (say next to A.exe). This would help work around the issue for now, while the right fix is made ready in Visual Studio 2010 SP1 patch.
Let us know however with details if this was not the issue, so that we could try and repro this at our end.
-anurag
-anurag (VS Profiler)

