Link to home
Start Free TrialLog in
Avatar of esdave
esdave

asked on

How to profile in VC++6

Hi All,

I'm interested in studying my code for performance enhancements. I've never used the profiler in VC++6 before (or any other profiler product). I'm running in Dev Studio (6). I've checked all of the boxes that enable profiling (linking incrementally turned off), generating a map file and .pdb in Microsoft format. I then run my app (in debug I think is correct). Oh, I also clicked on "function timing". The big question is:

Where do I view my timing results? If it is supposed to be under the "profile Tab" then I have to say I get nothing there. I have seen an error about profile.dll but I checked the system and I have only one version of this file, the correct data, and in the correct location according to the help. Can anybody hold my hand a bit here and let me know what to do?

Thanks!

Dave P
Avatar of proskig
proskig

This link gives an excellent overview of built-in profiler.

http://msdn.microsoft.com/library/default.asp?URL=/library/devprods/vs6/visualc/vccore/_core_profiling.3a_.overview.htm

I can also recommend to look at third-party profilers. There are good ones provided by Rational Software and nu-mega. I will post links soon
Avatar of esdave

ASKER

Proskig,

Thanks for your quick reply. I'm opening up the question for others to answer since what you pointed me to is the same documentation as is on my system and I have looked at it in total.

I still can't seem to get any results. I get the following:

PREP : fatal error PRF1012: cannot read expected number of bytes from file d:\esdave\oitest\debug\vtest.pbo

In the docs it says something about profile.dll. I have the correct version of profile.dll in the correct location.

Dave P
fine, I agree
I've always done it from the command line (batch file) and not from the IDE - it's a four-pass operation, as you would know from the docs...

PREP pass 1
PROFILE
PREP pass 2
PLIST

The output can be placed in a file formatted so that Excel can read it and generate a sheet, etc. There is a macro called profiler.xlm, I believe, that will give you a bar chart that may or may not be useful - sometimes you get a skimmed-down chart that doesn't include the functions of interest.

Try the command line approach and see if that doesn't help...
Avatar of esdave

ASKER

CaptainKirk, Jim (if you don't mind),

I have not used the command line to build my apps except if I have a Makefile I can use NMAKE to build it. That is the extent of my knowledge of the command line. You say:

PREP pass 1
PROFILE
PREP pass 2
PLIST

I have no idea what that all means. Are those commands that you type at the DOS level? No Makefile? The bottom line is that I don't see what you are doing. I have nothing against using the command line tools to get what I want done. Could you please spell out in a bit (OK, a bunch) more detail. I'd surely appreciate it.

Thanks!

Dave P
Avatar of esdave

ASKER

CaptainKirk, Jim (if you don't mind),

I have not used the command line to build my apps except if I have a Makefile I can use NMAKE to build it. That is the extent of my knowledge of the command line. You say:

PREP pass 1
PROFILE
PREP pass 2
PLIST

I have no idea what that all means. Are those commands that you type at the DOS level? No Makefile? The bottom line is that I don't see what you are doing. I have nothing against using the command line tools to get what I want done. Could you please spell out in a bit (OK, a bunch) more detail. I'd surely appreciate it.

Thanks!

Dave P
ASKER CERTIFIED SOLUTION
Avatar of captainkirk
captainkirk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of esdave

ASKER

CaptainKirk, Jim (if you don't mind),

I have not used the command line to build my apps except if I have a Makefile I can use NMAKE to build it. That is the extent of my knowledge of the command line. You say:

PREP pass 1
PROFILE
PREP pass 2
PLIST

I have no idea what that all means. Are those commands that you type at the DOS level? No Makefile? The bottom line is that I don't see what you are doing. I have nothing against using the command line tools to get what I want done. Could you please spell out in a bit (OK, a bunch) more detail. I'd surely appreciate it.

Thanks!

Dave P
Avatar of esdave

ASKER

Capt'n,

I just got profiler results for my app just minutes ago. Thanks for your help!!

Dave P
glad it helped...