[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] Urgent - Help - 64 bit google profiler crashes (li

From: Rajesh Balamohan
Subject: Re: [Libunwind-devel] Urgent - Help - 64 bit google profiler crashes (libunwind)
Date: Thu, 22 Feb 2007 03:44:49 +0000

Hi Arun,

Thankx again for helping out on this issue. I managed to install the rpm directly in my box. Here are the details.

address@hidden google-perftools-0.8]# rpm -q libunwind

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/
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,

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??

address@hidden 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

address@hidden google-perftools-0.8]# ./profiler3_unittest 1 10
The XOR test returns 0
PROFILE: interrupts/evictions/bytes = 273/5/784

address@hidden google-perftools-0.8]# pprof --text /localdisk/google-perftools-0.8/.libs/lt-profiler1_unittest /tmp/test.3

On 2/21/07, Arun Sharma < address@hidden> wrote:
On 2/20/07, Rajesh Balamohan < address@hidden> 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
> 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/ -Wl,--rpath
> -Wl,/usr/local/lib
> ./.libs/ undefined reference to `_ULx86_64_step'
> ./.libs/ undefined reference to `_ULx86_64_get_reg'
> ./.libs/ 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/ |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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]