From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <68694c5150d7a12663e93d2154d330ce.axp-list@archive.invalid> X-Archive-Original-Message-ID: <9707162339.AA30958@hellfire.dusers.drexel.edu> Date: Wed, 16 Jul 97 23:32:22 CDT From: wsb@VNET.IBM.COM Subject: gprof Problems Now that I have the memory problems sorted out in my program, I'm attempting to profile it by compiling with '-pg'. I run the program and it creates a gmon.out file but when I attempt to use gprof on it, it says: gprof: 'gmon.out' is incompatible with first gmon file First off I don't have two gmon.out files. Second, I grabbed the RH4.2 SRPM for binutils-2.7.0.2 and built the gprof binary myself to see if that was the problem. The new one also complains the same way. However, I did get the DEBUG prints turned on and it appears that the function 'hist_read_rec' is unhappy with the low/high program counter values it finds in the gmon.out file. Debug prints the following: [hist_read_rec] n_lowpc 0x200016bc01730000 n_highpc 0x2000253800000001 ncnt 1 [hist_read_rec] s_lowpc 0x120000e20 s_highpc 0x1200025f8 nsamples 1526 [hist_read_rec] lowpc 0x90000710 highpc 0x900012fc The code fragment is: if (n_lowpc != s_lowpc || n_highpc != s_highpc || ncnt != hist_num_bins || hz != profrate) { fprintf (stderr, "%s: `%s' is incompatible with first gmon file\n", whoami, filename); done (1); } I did check the source code and all the '*pc' variables are the same type but it appears the s_ set have 32 bit values in them so I'm wondering if they were truncated somewhere along the line. Anyone seen/fixed this problem?? Are there any other options to profile the code?? I can't find prof on my system and I did a find from root for it. Any help is appreciated. Wes -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com