Hi Arun,

I was able to compile with -lunwind after installing libunwind.rpm directly
in my target box.

However, pprof is not interpreting the profiler output and not giving any
information. I tried the unittest in google profiler

export CPUPROFILE=/tmp/test.4
/localdisk/google-perftools-0.8/.libs/lt-profiler1_unittest 10 10
The XOR test returns 0
PROFILE: interrupts/evictions/bytes = 45/0/424

./src/pprof --gv /localdisk/google-perftools-0.8/.libs/lt-profiler1_unittest
/tmp/test.4
No nodes to print

But there seems to be some content available in pprof.

Also, I understand that there are some issues with google profiler if
function pointers are used. Is there any work around for such cases?

~Rajesh.B


On 2/22/07, Rajesh Balamohan <[EMAIL PROTECTED]> wrote:
>
> Hi Arun,
>
> Thankx again for helping out on this issue. I managed to install the rpm
> directly in my box. Here are the details.
>
> [EMAIL PROTECTED] google-perftools-0.8]# rpm -q libunwind
> libunwind-0.98.5-2
>
>
> However, when I tried to compile google profiler, it was throwing the
> following error for which i made a change.
>
> In file included from src/malloc_hook.cc:35:
> src/base/linux_syscall_support.h: In function `void* sys_mmap(void*,
> size_t, int, int, int, __off64_t)':
> src/base/linux_syscall_support.h:339: error: invalid conversion from
> `long int' to `void*'
> make: *** [libtcmalloc_minimal_la-malloc_hook.lo] Error 1
>
> If I make "src/base/linux_syscall_support.h"
>
> 339     static inline _syscall6(void *, sys_mmap,          void*, s,
>                                  size_t,                   l,
> int,               p,
>                                  int,                      f,
> int,               d,
> to
> static inline _syscall6(long int, sys_mmap,          void*, s,
>                                  size_t,                   l,
> int,               p,
>                                  int,                      f,
> int,               d,
>
> After this, google profiler was compiled without any issues. However, it
> doesnt generate any output with pprof. Is there any other setting required??
>
>
> [EMAIL PROTECTED] google-perftools-0.8]# ./profiler3_unittest
> USAGE: /localdisk/google-perftools-0.8/.libs/lt-profiler3_unittest
> <iters> [num_threads] [filename]
>    iters: How many million times to run the XOR test.
>    num_threads: how many concurrent threads.
>                 0 or 1 for single-threaded mode,
>                 -# to fork instead of thread.
>    filename: The name of the output profile.
>              If you don't specify, set CPUPROFILE in the environment
> instead!
> PROFILE: interrupts/evictions/bytes = 0/0/64
>
> [EMAIL PROTECTED] google-perftools-0.8]# ./profiler3_unittest 1 10
> The XOR test returns 0
> PROFILE: interrupts/evictions/bytes = 273/5/784
>
> [EMAIL PROTECTED] google-perftools-0.8]# pprof --text /localdisk/google-
> perftools-0.8/.libs/lt-profiler1_unittest /tmp/test.3
>
>
>
>
>
> On 2/21/07, Arun Sharma < [EMAIL PROTECTED]> wrote:
> >
> > On 2/20/07, Rajesh Balamohan < [EMAIL PROTECTED]> wrote:
> > > Hi Arun,
> > >
> > > I have raised a bug in source forge for it. I still get that error
> > with
> > > make.
> > >
> > > make LDFLAGS="-lunwind -lunwind-x86_64"
> > > /bin/sh ./libtool --mode=link g++  -g -O2  -lunwind -lunwind-x86_64
> > -o
> > > stacktrace_unittest  stacktrace_unittest.o     libstacktrace.la
> > > g++ -g -O2 -o .libs/stacktrace_unittest stacktrace_unittest.o
> > > /usr/local/lib/libunwind-x86_64.a
> > > /usr/local/lib/libunwind.a -lgcc -lc ./.libs/libstacktrace.so
> > -Wl,--rpath
> > > -Wl,/usr/local/lib
> > > ./.libs/libstacktrace.so: undefined reference to `_ULx86_64_step'
> > > ./.libs/libstacktrace.so: undefined reference to `_ULx86_64_get_reg'
> > > ./.libs/libstacktrace.so: undefined reference to
> > `_ULx86_64_init_local'
> > > collect2: ld returned 1 exit status
> > > make: *** [stacktrace_unittest] Error 1
> >
> > Actually, you don't need -lunwind-x86_64 to link. -lunwind should be
> > sufficient. On my machine:
> >
> > $ nm /usr/lib/libunwind.so |grep _ULx86_64_step
> > 0000000000007330 T _ULx86_64_step
> >
> > libunwind.a - does "local" unwinding for the architecture it was
> > compiled for
> > libunwind-${ARCH}.a - does "remote" unwinding for a different
> > architecture.
> >
> > google-perftools require only local unwinding.
> >
> > -Arun
> >
>
>
>
> --
> ~Rajesh.B




--
~Rajesh.B




--
~Rajesh.B

Attachment: test.c
Description: Binary data

Attachment: a.out
Description: Binary data

Attachment: test.4
Description: Binary data

_______________________________________________
Libunwind-devel mailing list
Libunwind-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/libunwind-devel

Reply via email to