MSVC5´s Profiler?
Hi!
Can anbody here tell me how the Profiler behaves usually?I always worked with VTune but I don´t want to reinstall the trial version again so I thougt I´d check out the intgrated profiler....But when I start Build->Profile I get a litlle window to select what to profile(function timing,....) and after that a profile window opens at the bottom and then nothing happens anymore....The profile window stays empty and nothing happens(No crash It just does nothing).Is this usual and I´m to stupid to figure out where the problem lies or(what I think) is my installation messed up and I have to reinstall(Don´t want to do that)?
Thanx in advance,XBTC!
I use Visual C++ 6 (not 5), so this may be different...But in my experience, the major thing to watch out for with the profiler is that by default it launches the program with the ''Release'' or ''Debug'' build directory (whichever config you are using) as the current working directory, instead of the main project directory...Which is different than when you run it normally, or in debug mode. If you need to pass arguments to it, I believe it passes the ones you set for "Debug" mode in the projects settings tab...
Lastly, when you run code in the profiler it can take many many times longer to execute than normal...So be aware of that...
If none of these tips help, sorry..
Lastly, when you run code in the profiler it can take many many times longer to execute than normal...So be aware of that...
If none of these tips help, sorry..
Heh, you are gonna hate my answer =).
First of all, try creating a simple hello world application and try running the profiler on that. When I first used the profiler on my game, it would do absolutely nothing. Yet, if I ran it on a simple test project, it worked fine. I finally DID get it working on my game, but for the life of me I can''t remember what I did to get it working (I told you you wouldn''t like my answer).
But at least if it works on another simple app, then you know that you had the same problem as me, and it is fixable. BTW, I would suggest looking at the MSDN help, I think I got my answer in there.
Good luck!
First of all, try creating a simple hello world application and try running the profiler on that. When I first used the profiler on my game, it would do absolutely nothing. Yet, if I ran it on a simple test project, it worked fine. I finally DID get it working on my game, but for the life of me I can''t remember what I did to get it working (I told you you wouldn''t like my answer).
But at least if it works on another simple app, then you know that you had the same problem as me, and it is fixable. BTW, I would suggest looking at the MSDN help, I think I got my answer in there.
Good luck!
- Houdini
September 16, 2000 09:41 AM
I had this problem with VC5 and it took me a fupping long time to find out what was wrong.
I had installed Watcom C/C++ 10.6 before VC and it had written a load of environment variable definitions to my autoexec.bat - the VC profiler reacted badly to them and did exactly what you said your profiler does. Try removing all suspicious looking env vars from your autoexec.bat
Hope that helps.
I had installed Watcom C/C++ 10.6 before VC and it had written a load of environment variable definitions to my autoexec.bat - the VC profiler reacted badly to them and did exactly what you said your profiler does. Try removing all suspicious looking env vars from your autoexec.bat
Hope that helps.
Well, I had a semi quasi related problem.
I couldn''t even get the profile option to be enabled, even after enableing profiling in the project settings. What I ended up doing was whipping up a .bat file to do it for me instead, and was even able to get the output into an output window in devstudio. In the main project dir i created profdll.bat which contains:
The top part might be different for you. Remeber when you installed msvc it told you that it stored the environment vars in a batch file somewhere. That''s just where that all came from. Then in devstudio (i''m using msvc 6.0 btw), you need to create a custom tool. Go to tools -> Customize... -> Tools and create a new one. I use the command E:\Void\profdll.bat cause that''s where the dll and exe are. You also need to have devstudio generate a .map file for what you are profiling. That''s pretty easy to do through the project settings. for arguements i use "vrender void" (whithout quotes) because vrender is the dll I want to profile, and void is the executable. Initial Directory is E:\Void\. Check ''use output window'' and your ready to go. You can run it from the tools menu, or if your really slick, you can just add a custim toolbar button ;-)
JS
http://www.thepeel.com/void
I couldn''t even get the profile option to be enabled, even after enableing profiling in the project settings. What I ended up doing was whipping up a .bat file to do it for me instead, and was even able to get the output into an output window in devstudio. In the main project dir i created profdll.bat which contains:
@echo offrem first load all msvc environment varsremrem Root of Visual Developer Studio Common files.set VSCommonDir=D:\MICROS~2\Commonremrem Root of Visual Developer Studio installed files.remset MSDevDir=D:\MICROS~2\Common\msdev98remrem Root of Visual C++ installed files.remset MSVCDir=D:\MICROS~2\VC98remrem VcOsDir is used to help create either a Windows 95 or Windows NT specific path.remset VcOsDir=WIN95if "%OS%" == "Windows_NT" set VcOsDir=WINNTremecho Setting environment for using Microsoft Visual C++ tools.remif "%OS%" == "Windows_NT" set PATH=%MSDevDir%\BIN;%MSVCDir%\BIN;%VSCommonDir%\TOOLS\%VcOsDir%;%VSCommonDir%\TOOLS;%PATH%if "%OS%" == "" set PATH="%MSDevDir%\BIN";"%MSVCDir%\BIN";"%VSCommonDir%\TOOLS\%VcOsDir%";"%VSCommonDir%\TOOLS";"%windir%\SYSTEM";"%PATH%"set INCLUDE=%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INCLUDE;%INCLUDE%set LIB=%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB%set VcOsDir=set VSCommonDir=rem do the profilingCOPY %1.dll savePREP /OM %1.dllCOPY %1._ll %1.dllPROFILE /I %1 /O %1 %2 %3 %4 %5 %6COPY save %1.dllPREP /M %1PLIST %1
The top part might be different for you. Remeber when you installed msvc it told you that it stored the environment vars in a batch file somewhere. That''s just where that all came from. Then in devstudio (i''m using msvc 6.0 btw), you need to create a custom tool. Go to tools -> Customize... -> Tools and create a new one. I use the command E:\Void\profdll.bat cause that''s where the dll and exe are. You also need to have devstudio generate a .map file for what you are profiling. That''s pretty easy to do through the project settings. for arguements i use "vrender void" (whithout quotes) because vrender is the dll I want to profile, and void is the executable. Initial Directory is E:\Void\. Check ''use output window'' and your ready to go. You can run it from the tools menu, or if your really slick, you can just add a custim toolbar button ;-)
JS
http://www.thepeel.com/void
JShttp://www.thepeel.com/void
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement