Re: gprof with C and C++ not working
From: llewelly (llewelly.at_at_xmission.dot.com)
Date: 07/03/03
- Next message: Barry Margolin: "Re: recvfrom returns with an error code of 14, EFAULT "Bad Address""
- Previous message: Fletcher Glenn: "Re: handle file > 2GB"
- In reply to: Alex: "gprof with C and C++ not working"
- Next in thread: Oleg Goldshmidt: "Re: gprof with C and C++ not working"
- Reply: Oleg Goldshmidt: "Re: gprof with C and C++ not working"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 03 Jul 2003 10:39:48 -0600
abeylin@yahoo.com (Alex) writes:
> Hello,
> Need your help, second day can't get this working.
> I need to compile a program with gprof.
> Program compiles, but doesnt generate information I need.
>
> Program consists of C and C++ code, and is compiled on SunOS 2.6.
> For C compiler we use "cc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2"
> For C++ compiler we use "gcc version 2.95.2 19991024 (release)"
> The link stage we use the same C++ compiler (gcc).
>
> I am not compiling entire souce with gprof options. Only the major
> part of what I want to analize.
> For cc I used -xpg option
> and for gcc I used -pg option
> link line does: gcc -pg
> and links C and C++ code.
>
> To me it looks like only the C++ code gets profiled. I see some
> references to "main", but nothing I am interested in.
> The program creates children processes, so I figured to set PROFDIR.
> When I set it, no profile file gets generated at all (I tried a simple
> a.out, that generates a file exactly where I want it).
IIRC, the profiling info generated by using Sun cc -xpg is not
readable by gprof. My only suggestion is to use gcc -pg to compile
your C code instead of Sun cc.
- Next message: Barry Margolin: "Re: recvfrom returns with an error code of 14, EFAULT "Bad Address""
- Previous message: Fletcher Glenn: "Re: handle file > 2GB"
- In reply to: Alex: "gprof with C and C++ not working"
- Next in thread: Oleg Goldshmidt: "Re: gprof with C and C++ not working"
- Reply: Oleg Goldshmidt: "Re: gprof with C and C++ not working"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|