Solved

Running VC++ Profiler On Windows NT

Posted on 2001-08-20
10
261 Views
Last Modified: 2007-12-19
Am trying, unsecussfully,  to run the VC++ Profiler.  

I have compiled my application in debug mode with the Enable Profiling check box at Project / Link / General dialog checked. But, when I click on the Profile menu item, the system complains that I haven't done that.

Noted that the Profiler is available only with Enterprise or Professional versions.   I am using the VC++
version 6 that came with our Universal subscription.
Is that the problem?   Am running NT.
0
Comment
Question by:TBursch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
10 Comments
 
LVL 3

Expert Comment

by:cwrea
ID: 6407451
Suggestion:  Run the profiler on a Release build.
0
 

Author Comment

by:TBursch
ID: 6407857
Release or Debug does not seem to matter, I get the same complaint.  
0
 
LVL 3

Expert Comment

by:cwrea
ID: 6408220
Hmm What kind of application is it?  Console executable, Win32 app, DLL, etc.?

Are you running your Visual Studio 6 with Service Pack 5 installed?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:Pacman
ID: 6408726
I think you also have to activate "generate map file" and copy the map file to the exe directory.
0
 
LVL 9

Expert Comment

by:Pacman
ID: 6408731
PS: I always use command line version of the profiler and this works.
Use VC's batchfile FTIME.BAT:

FTIME exename exeparameter >destination.txt
0
 

Author Comment

by:TBursch
ID: 6410861
Pacman,
I had used Profile about a year ago and remember that there was some trick to getting it to run.   Your comment about the .map file triggered a memory and I was certain the map file was the key, but haven't been able to get it yet.   How about Debug Information? Does Profile need that?

I made the output paths myproject\release and myproject\debug so both the .exe and .map are going to the same place, but that didn't do it either.  

Am I supposed to be running Profile in Release or Debug mode?

cwrea,
My application is an .exe, very large, uses many DLLs and Libraries.  The executable is >4 mbyte.  A coworker is wondering about our Help file.   Every time we compile and run, VC complains that the help file is out of date and asks if we want to build it.   We usually just say NO.  He thinks that may be the reason Profile does not think our executable is up to date?

We are running NT v4.0, with service pack 5.

Thanks for your help guys, this is getting really frustrating for me.
tom
 
0
 
LVL 9

Expert Comment

by:Pacman
ID: 6412303
>> ... and I was certain the map file was the key, but
>> haven't been able to get it yet.

Don't you get the map file or don't you get it working with the map file ?

I always copy the mapfile to the exe directory. Then I start a command line ("DOS" box) and change to this directory. From there I call profiler via "FTIME.BAT", see above.

Did you try calling FTIME.BAT ?
0
 

Author Comment

by:TBursch
ID: 6413995
Pacman,
Yes, a .map file was created, and it has the same date and time as the .exe.   I have tried several things to put the .map and .exe in the same directory ... moved the .map to the same directory as the .exe, moved the .exe to the directory where the .map is, and changed the compiler settings so that the .exe is placed in the same directory as the .map.   None of these has made a difference.

I created a test project, just a SDI with no extra code, and was able to get the Profiler started for it.  I just tried compiling with the Enable Profiler box checked, and  the Build map File box not checked on the Settings / Link page.  Both the .exe and .map files were created.  Profiler started.   It started for both Release and Debug builds.

I've never used VC++ from a command line ... will try your suggestion today, though I don't know how to do that.
Do I start what used to be the DOS process and enter FTIME from that?

Still trying to get rid of the complaint about the .hlp file.  Even when I answer YES to querry about creating it, nothing is built, at least not a .hlp file.   Do you know how to turn creation of the .hlp file off?

tom
0
 
LVL 9

Accepted Solution

by:
Pacman earned 100 total points
ID: 6416440
>> I've never used VC++ from a command line ...

It's the same with me. But you only have to run the profiler from command line.

On my machine (Win98, VC6.0) Developer Studio crashes when I try to configure profile from IDE. So I use command line directly.
Since I don't use profile very often this is a good compromise to me.

>> Do I start what used to be the DOS process and enter
>> FTIME from that?

yes. Make sure it's in your path.

Good Luck!
Pacman
0
 

Author Comment

by:TBursch
ID: 6428884
Pacman,
Wonderful!   The command line trick is working very well,
Have gathered some good data.  A coworker is going wild,
working to get line timing data.

Thanks for your help.

tom
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C++ question 3 84
How to print into std::string like sprintf using C++11? 12 191
How do i run a c++ file? 15 58
Are the two lines the same? If not what is the difference? 2 31
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question