On Fri, Jun 1, 2012 at 1:03 PM, iam_donald <donald....@gmail.com> wrote:
> Hi, I am building my project with debugging enabled [-g] however the
> profiling output generated has hex values for method names. Like this:
> --
> You received this message because you are subscribed to the Google Groups
> "google-perftools" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-perftools/-/sLBA5zhJQ7MJ.
> To post to this group, send email to google-perftools@googlegroups.com.
> To unsubscribe from this group, send email to
> google-perftools+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-perftools?hl=en.
On Fri, Jun 1, 2012 at 11:15 AM, David Chappelle <chapp...@gmail.com> wrote:
> Are there any method names or are they all hexadecimal? Are you
> linking against any third party libraries?
> On Fri, Jun 1, 2012 at 1:03 PM, iam_donald <donald....@gmail.com> wrote:
> > Hi, I am building my project with debugging enabled [-g] however the
> > profiling output generated has hex values for method names. Like this:
> > --
> > You received this message because you are subscribed to the Google Groups
> > "google-perftools" group.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msg/google-perftools/-/sLBA5zhJQ7MJ.
> > To post to this group, send email to google-perftools@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-perftools+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/google-perftools?hl=en.
> --
> You received this message because you are subscribed to the Google Groups
> "google-perftools" group.
> To post to this group, send email to google-perftools@googlegroups.com.
> To unsubscribe from this group, send email to
> google-perftools+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-perftools?hl=en.
On Friday, June 1, 2012 6:15:50 PM UTC, chappelle wrote:
> Are there any method names or are they all hexadecimal? Are you > linking against any third party libraries?
> On Fri, Jun 1, 2012 at 1:03 PM, iam_donald <donald....@gmail.com> wrote: > > Hi, I am building my project with debugging enabled [-g] however the > > profiling output generated has hex values for method names. Like this:
> > -- > > You received this message because you are subscribed to the Google > Groups > > "google-perftools" group. > > To view this discussion on the web visit > > https://groups.google.com/d/msg/google-perftools/-/sLBA5zhJQ7MJ. > > To post to this group, send email to google-perftools@googlegroups.com. > > To unsubscribe from this group, send email to > > google-perftools+unsubscribe@googlegroups.com. > > For more options, visit this group at > > http://groups.google.com/group/google-perftools?hl=en.
As Santosh suggested, does addr2line resolve any of these symbol
addresses? It is possible that these are coming from a third party
library like libc, glibc, etc that is stripped of symbols.
Try writing a simple main.cpp that calls several locally defined
functions. Are all of the symbols you expect to show up in the output
there?
On Fri, Jun 1, 2012 at 6:24 PM, iam_donald <donald....@gmail.com> wrote:
> There are some method names. I tried with gcc -pg and clang and still got
> nothing
> On Friday, June 1, 2012 6:15:50 PM UTC, chappelle wrote:
>> Are there any method names or are they all hexadecimal? Are you
>> linking against any third party libraries?
>> On Fri, Jun 1, 2012 at 1:03 PM, iam_donald <donald....@gmail.com> wrote:
>> > Hi, I am building my project with debugging enabled [-g] however the
>> > profiling output generated has hex values for method names. Like this:
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "google-perftools" group.
>> > To view this discussion on the web visit
>> > https://groups.google.com/d/msg/google-perftools/-/sLBA5zhJQ7MJ.
>> > To post to this group, send email to google-perftools@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > google-perftools+unsubscribe@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/google-perftools?hl=en.
> To post to this group, send email to google-perftools@googlegroups.com.
> To unsubscribe from this group, send email to
> google-perftools+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-perftools?hl=en.
On Friday, June 1, 2012 11:34:13 PM UTC, iam_donald wrote:
> I'm using debug libraries to build the debug version of the programme and > it's giving me this output. Do I set these flags with pprof? : enable > profiling=1 > disable_pie = 1 > fno-omit-frame-pointer = 1
Also my gnu bundle doesn't have addr2line, I'm not sure if it's a mac thing. I'll look aroung for the source but if any of you have a link to it please post it. Thanks.
> On Friday, June 1, 2012 11:21:19 PM UTC, chappelle wrote:
>> As Santosh suggested, does addr2line resolve any of these symbol >> addresses? It is possible that these are coming from a third party >> library like libc, glibc, etc that is stripped of symbols.
>> Try writing a simple main.cpp that calls several locally defined >> functions. Are all of the symbols you expect to show up in the output >> there?
>> On Fri, Jun 1, 2012 at 6:24 PM, iam_donald <donald....@gmail.com> wrote: >> > There are some method names. I tried with gcc -pg and clang and still >> got >> > nothing
>> > On Friday, June 1, 2012 6:15:50 PM UTC, chappelle wrote:
>> >> Are there any method names or are they all hexadecimal? Are you >> >> linking against any third party libraries?
>> >> On Fri, Jun 1, 2012 at 1:03 PM, iam_donald <donald....@gmail.com> >> wrote: >> >> > Hi, I am building my project with debugging enabled [-g] however the >> >> > profiling output generated has hex values for method names. Like >> this:
>> >> > -- >> >> > You received this message because you are subscribed to the Google >> >> > Groups >> >> > "google-perftools" group. >> >> > To view this discussion on the web visit >> >> > https://groups.google.com/d/msg/google-perftools/-/sLBA5zhJQ7MJ. >> >> > To post to this group, send email to >> google-perftools@googlegroups.com. >> >> > To unsubscribe from this group, send email to >> >> > google-perftools+unsubscribe@googlegroups.com. >> >> > For more options, visit this group at >> >> > http://groups.google.com/group/google-perftools?hl=en.
On Friday, June 1, 2012 11:21:19 PM UTC, chappelle wrote:
> As Santosh suggested, does addr2line resolve any of these symbol > addresses? It is possible that these are coming from a third party > library like libc, glibc, etc that is stripped of symbols.
> Try writing a simple main.cpp that calls several locally defined > functions. Are all of the symbols you expect to show up in the output > there?
> On Fri, Jun 1, 2012 at 6:24 PM, iam_donald <donald....@gmail.com> wrote: > > There are some method names. I tried with gcc -pg and clang and still > got > > nothing
> > On Friday, June 1, 2012 6:15:50 PM UTC, chappelle wrote:
> >> Are there any method names or are they all hexadecimal? Are you > >> linking against any third party libraries?
> >> On Fri, Jun 1, 2012 at 1:03 PM, iam_donald <donald....@gmail.com> > wrote: > >> > Hi, I am building my project with debugging enabled [-g] however the > >> > profiling output generated has hex values for method names. Like > this:
> >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups > >> > "google-perftools" group. > >> > To view this discussion on the web visit > >> > https://groups.google.com/d/msg/google-perftools/-/sLBA5zhJQ7MJ. > >> > To post to this group, send email to > google-perftools@googlegroups.com. > >> > To unsubscribe from this group, send email to > >> > google-perftools+unsubscribe@googlegroups.com. > >> > For more options, visit this group at > >> > http://groups.google.com/group/google-perftools?hl=en.
> > To post to this group, send email to google-perftools@googlegroups.com. > > To unsubscribe from this group, send email to > > google-perftools+unsubscribe@googlegroups.com. > > For more options, visit this group at > > http://groups.google.com/group/google-perftools?hl=en.
use $nm binary.out >> log.txt
and check log.txt contain any symbol name or not.(it could be possible that
even if you compile with -g symbol but strip the binary at after linking)
If it contains symbols then follow as below:
I can see two kind of address
0x0000000103f77c4f -->looks like logical address
0x00007fff6390ac5f --> looks like actual physical address.
use addr2line -Cfe bin.out <logical address>
in this case addr2line -Cfe binary_name 0x0000000103f77c4f
Also you need to enable flag whatever I mentioned for your binary.
On Sat, Jun 2, 2012 at 5:41 AM, iam_donald <donald....@gmail.com> wrote:
> I used addr2line, it's doesn't return anything meaningful - it just
> outputs '??:0' - for the tested hex values in the profiling info.
> On Friday, June 1, 2012 11:21:19 PM UTC, chappelle wrote:
>> As Santosh suggested, does addr2line resolve any of these symbol
>> addresses? It is possible that these are coming from a third party
>> library like libc, glibc, etc that is stripped of symbols.
>> Try writing a simple main.cpp that calls several locally defined
>> functions. Are all of the symbols you expect to show up in the output
>> there?
>> On Fri, Jun 1, 2012 at 6:24 PM, iam_donald <donald....@gmail.com> wrote:
>> > There are some method names. I tried with gcc -pg and clang and still
>> got
>> > nothing
>> > On Friday, June 1, 2012 6:15:50 PM UTC, chappelle wrote:
>> >> Are there any method names or are they all hexadecimal? Are you
>> >> linking against any third party libraries?
>> >> On Fri, Jun 1, 2012 at 1:03 PM, iam_donald <donald....@gmail.com>
>> wrote:
>> >> > Hi, I am building my project with debugging enabled [-g] however the
>> >> > profiling output generated has hex values for method names. Like
>> this:
>> >> > To post to this group, send email to google-perftools@googlegroups.*
>> *com <google-perftools@googlegroups.com>.
>> >> > To unsubscribe from this group, send email to
>> >> > google-perftools+unsubscribe@**googlegroups.com<google-perftools%2Bunsubscr ibe@googlegroups.com>.
>> > To post to this group, send email to google-perftools@googlegroups.**
>> com <google-perftools@googlegroups.com>.
>> > To unsubscribe from this group, send email to
>> > google-perftools+unsubscribe@**googlegroups.com<google-perftools%2Bunsubscr ibe@googlegroups.com>.
> To post to this group, send email to google-perftools@googlegroups.com.
> To unsubscribe from this group, send email to
> google-perftools+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-perftools?hl=en.
Did anyone ever figure this out? I've already tried this with llvm-gcc, clang, and even a fresh gcc 4.7.1 built from source, all w/ -pg and -lprofiler flags. I've also tried splitting out linking as a separate step. Nothing's worked so far.
I attached the output of nm and pprof --text after building with "clang++ myprog.cpp -pg -lprofiler -o myprof". A few of the standard library functions' names are still present in pprof's output, but otherwise it's a bunch of hex addresses. Strangely enough the hex addresses of the function's I'm interested in (matexp, matmult, etc.; they're name mangled in nm's output) aren't present in pprof's output.
I'm trying to profile a simple one file program with no dependencies beyond the STL and C stdlib, and I'm on OS X if that helps.
On Saturday, June 2, 2012 5:27:22 AM UTC-4, Santosh Mahto wrote:
> Hi
> use $nm binary.out >> log.txt > and check log.txt contain any symbol name or not.(it could be possible > that even if you compile with -g symbol but strip the binary at after > linking)
> If it contains symbols then follow as below: > I can see two kind of address > 0x0000000103f77c4f -->looks like logical address > 0x00007fff6390ac5f --> looks like actual physical address.
> use addr2line -Cfe bin.out <logical address> > in this case addr2line -Cfe binary_name 0x0000000103f77c4f
> Also you need to enable flag whatever I mentioned for your binary.
> On Sat, Jun 2, 2012 at 5:41 AM, iam_donald <donal...@gmail.com<javascript:> > > wrote:
>> I used addr2line, it's doesn't return anything meaningful - it just >> outputs '??:0' - for the tested hex values in the profiling info.
>> On Friday, June 1, 2012 11:21:19 PM UTC, chappelle wrote:
>>> As Santosh suggested, does addr2line resolve any of these symbol >>> addresses? It is possible that these are coming from a third party >>> library like libc, glibc, etc that is stripped of symbols.
>>> Try writing a simple main.cpp that calls several locally defined >>> functions. Are all of the symbols you expect to show up in the output >>> there?
>>> On Fri, Jun 1, 2012 at 6:24 PM, iam_donald <donal...@gmail.com<javascript:>> >>> wrote: >>> > There are some method names. I tried with gcc -pg and clang and still >>> got >>> > nothing
>>> > On Friday, June 1, 2012 6:15:50 PM UTC, chappelle wrote:
>>> >> Are there any method names or are they all hexadecimal? Are you >>> >> linking against any third party libraries?
>>> >> On Fri, Jun 1, 2012 at 1:03 PM, iam_donald <donal...@gmail.com<javascript:>> >>> wrote: >>> >> > Hi, I am building my project with debugging enabled [-g] however >>> the >>> >> > profiling output generated has hex values for method names. Like >>> this:
>> To post to this group, send email to google-p...@googlegroups.com<javascript:> >> . >> To unsubscribe from this group, send email to >> google-perftoo...@googlegroups.com <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/google-perftools?hl=en.
Same problem here, also on Mac OS X 10.7.4, using gcc from Xcode 4.4.1. Also tried clang, same issue. I'm using gperftools 2.0 installed via homebrew.
The gperftools CPU profiler does not resolve function names. The following simple test program (test.c) reproduces the issue on my Mac:
double sum(double a, double b) { return a + b;
}
int main() { int i; double a = 0., b = 1.;
for (i=0; i<100000000; i++) { a = sum(a, b); } return 0;
}
Note that there are no #include statements. Running this on my Mac yields:
$ gcc test.c -o test -lprofiler $ CPUPROFILE=test.prof ./test PROFILE: interrupts/evictions/bytes = 107/13/1624 $ pprof --text test test.prof Using local file test. Using local file test.prof. Removing __sigtramp from all stack traces. Total: 107 samples 19 17.8% 17.8% 19 17.8% 0x0000000109a65e86 18 16.8% 34.6% 18 16.8% 0x0000000109a65e7c 18 16.8% 51.4% 18 16.8% 0x0000000109a65e90 15 14.0% 65.4% 15 14.0% 0x0000000109a65e73 11 10.3% 75.7% 11 10.3% 0x0000000109a65ede 6 5.6% 81.3% 6 5.6% 0x0000000109a65e61 6 5.6% 86.9% 6 5.6% 0x0000000109a65e8b 5 4.7% 91.6% 5 4.7% 0x0000000109a65eed 4 3.7% 95.3% 4 3.7% 0x0000000109a65ef9 3 2.8% 98.1% 3 2.8% 0x0000000109a65e69 1 0.9% 99.1% 1 0.9% 0x0000000109a65e81 1 0.9% 100.0% 1 0.9% 0x0000000109a65ee8 0 0.0% 100.0% 107 100.0% 0x0000000109a65e53 0 0.0% 100.0% 80 74.8% 0x0000000109a65ee7 0 0.0% 100.0% 21 19.6% 0x00029bdb3ab52bf1 0 0.0% 100.0% 7 6.5% 0x00029bdb3ab63fda 0 0.0% 100.0% 107 100.0% __mh_execute_header 0 0.0% 100.0% 79 73.8% __sigtramp $ nm test 0000000100001040 S _NXArgc 0000000100001048 S _NXArgv 0000000100001058 S ___progname 0000000100000000 A __mh_execute_header 0000000100001050 S _environ U _exit 0000000100000ea0 T _main 0000000100001000 s _pvars 0000000100000e60 T _sum U dyld_stub_binder 0000000100000e20 T start
So the output of pprof is useless, while nm reveals that all the symbol information is there. Adding -g and/or -pg compiler flags didn't change anything, just adds some more symbols.
On Monday, September 3, 2012 12:10:38 AM UTC+2, Nick Haliday wrote:
> Did anyone ever figure this out? I've already tried this with llvm-gcc, > clang, and even a fresh gcc 4.7.1 built from source, all w/ -pg and > -lprofiler flags. I've also tried splitting out linking as a separate step. > Nothing's worked so far.
> I attached the output of nm and pprof --text after building with "clang++ > myprog.cpp -pg -lprofiler -o myprof". A few of the standard library > functions' names are still present in pprof's output, but otherwise it's a > bunch of hex addresses. Strangely enough the hex addresses of the > function's I'm interested in (matexp, matmult, etc.; they're name mangled > in nm's output) aren't present in pprof's output.
> I'm trying to profile a simple one file program with no dependencies > beyond the STL and C stdlib, and I'm on OS X if that helps.
> On Saturday, June 2, 2012 5:27:22 AM UTC-4, Santosh Mahto wrote:
>> Hi
>> use $nm binary.out >> log.txt >> and check log.txt contain any symbol name or not.(it could be possible >> that even if you compile with -g symbol but strip the binary at after >> linking)
>> If it contains symbols then follow as below: >> I can see two kind of address >> 0x0000000103f77c4f -->looks like logical address >> 0x00007fff6390ac5f --> looks like actual physical address.
>> use addr2line -Cfe bin.out <logical address> >> in this case addr2line -Cfe binary_name 0x0000000103f77c4f
>> Also you need to enable flag whatever I mentioned for your binary.
>> On Sat, Jun 2, 2012 at 5:41 AM, iam_donald <donal...@gmail.com> wrote:
>>> I used addr2line, it's doesn't return anything meaningful - it just >>> outputs '??:0' - for the tested hex values in the profiling info.
>>> On Friday, June 1, 2012 11:21:19 PM UTC, chappelle wrote:
>>>> As Santosh suggested, does addr2line resolve any of these symbol >>>> addresses? It is possible that these are coming from a third party >>>> library like libc, glibc, etc that is stripped of symbols.
>>>> Try writing a simple main.cpp that calls several locally defined >>>> functions. Are all of the symbols you expect to show up in the output >>>> there?
>>>> On Fri, Jun 1, 2012 at 6:24 PM, iam_donald <donal...@gmail.com> wrote: >>>> > There are some method names. I tried with gcc -pg and clang and still >>>> got >>>> > nothing
>>>> > On Friday, June 1, 2012 6:15:50 PM UTC, chappelle wrote:
>>>> >> Are there any method names or are they all hexadecimal? Are you >>>> >> linking against any third party libraries?
>>>> >> On Fri, Jun 1, 2012 at 1:03 PM, iam_donald <donal...@gmail.com> >>>> wrote: >>>> >> > Hi, I am building my project with debugging enabled [-g] however >>>> the >>>> >> > profiling output generated has hex values for method names. Like >>>> this:
>>> To post to this group, send email to google-p...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> google-perftoo...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/google-perftools?hl=en.
On Wednesday, September 5, 2012 6:23:32 PM UTC+9, Stefan Muller wrote:
> Hi!
> Same problem here, also on Mac OS X 10.7.4, using gcc from Xcode 4.4.1. > Also tried clang, same issue. I'm using gperftools 2.0 installed via > homebrew.
> The gperftools CPU profiler does not resolve function names. The following > simple test program (test.c) reproduces the issue on my Mac:
> double sum(double a, double b) { > return a + b; > }
> int main() { > int i; > double a = 0., b = 1.;
> for (i=0; i<100000000; i++) { > a = sum(a, b); > } > return 0; > }
> Note that there are no #include statements. Running this on my Mac yields:
> So the output of pprof is useless, while nm reveals that all the symbol > information is there. Adding -g and/or -pg compiler flags didn't change > anything, just adds some more symbols.
> Thanks, > Stefan
> On Monday, September 3, 2012 12:10:38 AM UTC+2, Nick Haliday wrote:
>> Did anyone ever figure this out? I've already tried this with llvm-gcc, >> clang, and even a fresh gcc 4.7.1 built from source, all w/ -pg and >> -lprofiler flags. I've also tried splitting out linking as a separate step. >> Nothing's worked so far.
>> I attached the output of nm and pprof --text after building with "clang++ >> myprog.cpp -pg -lprofiler -o myprof". A few of the standard library >> functions' names are still present in pprof's output, but otherwise it's a >> bunch of hex addresses. Strangely enough the hex addresses of the >> function's I'm interested in (matexp, matmult, etc.; they're name mangled >> in nm's output) aren't present in pprof's output.
>> I'm trying to profile a simple one file program with no dependencies >> beyond the STL and C stdlib, and I'm on OS X if that helps.
>> On Saturday, June 2, 2012 5:27:22 AM UTC-4, Santosh Mahto wrote:
>>> Hi
>>> use $nm binary.out >> log.txt >>> and check log.txt contain any symbol name or not.(it could be possible >>> that even if you compile with -g symbol but strip the binary at after >>> linking)
>>> If it contains symbols then follow as below: >>> I can see two kind of address >>> 0x0000000103f77c4f -->looks like logical address >>> 0x00007fff6390ac5f --> looks like actual physical address.
>>> use addr2line -Cfe bin.out <logical address> >>> in this case addr2line -Cfe binary_name 0x0000000103f77c4f
>>> Also you need to enable flag whatever I mentioned for your binary.
>>> On Sat, Jun 2, 2012 at 5:41 AM, iam_donald <donal...@gmail.com> wrote:
>>>> I used addr2line, it's doesn't return anything meaningful - it just >>>> outputs '??:0' - for the tested hex values in the profiling info.
>>>> On Friday, June 1, 2012 11:21:19 PM UTC, chappelle wrote:
>>>>> As Santosh suggested, does addr2line resolve any of these symbol >>>>> addresses? It is possible that these are coming from a third party >>>>> library like libc, glibc, etc that is stripped of symbols.
>>>>> Try writing a simple main.cpp that calls several locally defined >>>>> functions. Are all of the symbols you expect to show up in the output >>>>> there?
>>>>> On Fri, Jun 1, 2012 at 6:24 PM, iam_donald <donal...@gmail.com> >>>>> wrote: >>>>> > There are some method names. I tried with gcc -pg and clang and >>>>> still got >>>>> > nothing
>>>>> > On Friday, June 1, 2012 6:15:50 PM UTC, chappelle wrote:
>>>>> >> Are there any method names or are they all hexadecimal? Are you >>>>> >> linking against any third party libraries?
>>>>> >> On Fri, Jun 1, 2012 at 1:03 PM, iam_donald <donal...@gmail.com> >>>>> wrote: >>>>> >> > Hi, I am building my project with debugging enabled [-g] however >>>>> the >>>>> >> > profiling output generated has hex values for method names. Like >>>>> this:
>>>> To post to this group, send email to google-p...@googlegroups.com. >>>> To unsubscribe from this group, send email to >>>> google-perftoo...@googlegroups.com. >>>> For more options, visit this group at >>>> http://groups.google.com/group/google-perftools?hl=en.