Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mips backtracing] Cavium octeon mips64 don't have program address --help #406

Closed
alk opened this issue Aug 23, 2015 · 9 comments
Closed

Comments

@alk
Copy link
Contributor

alk commented Aug 23, 2015

Originally reported on Google Code with ID 403

What steps will reproduce the problem?
1.download version 1.8.2 and patch, read README_mips.txt first.
2.cd google-perftools-1.8.2; patch -p1 < ../google-perftools-1.8.2-mips.patch
3.vi configure
add
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##
ac_cv_func_mmap_fixed_mapped=yes

4, ./configure --host=mips64-octeon-linux-gnu
5!!, vi src/base/linuxthreads.h
   open define sys_sigprocmask and sys_sigaction
//# if defined(HAVE_RT_SIGPROCMASK)
#if 1
#  define sys_sigprocmask(a,b,c) sys_rt_sigprocmask(a, b, c, sizeof(struct kernel_sigset_t))
#  define sys_sigaction(a,b,c)   sys_rt_sigaction(a,b,c,sizeof(struct kernel_sigaction))
# endif
6, vi src/config.h
add this line
#define __MIPS64__ 1
7, make
8, cp google-perftools-1.8.2/.libs/libtcmalloc.so.0 to Cavium platform /lib64
9, mips64-octeon-linux-gnu-g++ -O0 -g heap_test2.c -o heap_test -Igoogle-perftools-1.8.2/src
 -Igoogle-perftools-1.8.2/src/google  -Lgoogle-perftools-1.8.2/.libs -ltcmalloc
10, run heap_test on Cavium octeon platform
  #env HEAPCHECK=normal ./heap_test   #this sample heap_test run at least 10secs.
11, cat /tmp/heap_test.18884._main_-end.heap
    !!!!!!!!!!!!!!!!!!!!!!
   heap profile @ don't have any program address!
    !!!!!!!!!!!!!!!!!!!!!!
heap profile:     10:      200 [    10:      200] @ heapprofile
     1:       20 [     1:       20] @
     1:       20 [     1:       20] @
     1:       20 [     1:       20] @
     1:       20 [     1:       20] @
     1:       20 [     1:       20] @
     1:       20 [     1:       20] @
     1:       20 [     1:       20] @
     1:       20 [     1:       20] @
     1:       20 [     1:       20] @
     1:       20 [     1:       20] @

MAPPED_LIBRARIES:
120000000-120002000 r-xp 00000000 00:00 12320878    /disk/heap_test
120101000-120102000 rw-p 00001000 00:00 12320878    /disk/heap_test
120102000-120582000 rwxp 120102000 00:00 0           [heap]
5555556000-5555572000 r-xp 00000000 00:00 2909        /lib64/ld-2.4.so
5555572000-5555588000 rw-p 5555572000 00:00 0           
5555598000-55555f8000 rw-p 5555598000 00:00 0           
5555671000-5555673000 rw-p 0001b000 00:00 2909        /lib64/ld-2.4.so
...

What is the expected output? What do you see instead?
heap profile @ have some program address!

What version of the product are you using? On what operating system?
I use google-perftools-1.8.2 on Cavium octeon 58xx platform.


Please provide any additional information below.


Reported by xuxin2008 on 2012-02-16 03:46:47


- _Attachment: [heap_test2.c](https://storage.googleapis.com/google-code-attachments/gperftools/issue-403/comment-0/heap_test2.c)_ - _Attachment: [heap_test.18884._main_-end.heap](https://storage.googleapis.com/google-code-attachments/gperftools/issue-403/comment-0/heap_test.18884._main_-end.heap)_
@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

any one help? 

Reported by WangNull on 2012-02-28 01:56:53

@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

I suspect you are going to need --enable-frame-pointers and possibly libunwind. Also,
try without any optimizations and full debugging symbols:

    -g -O0

Reported by chappedm on 2012-03-02 16:25:38

@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

Any update here. If not I am going to close this one off.

Reported by chappedm on 2013-03-11 02:09:13

@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

mips doesn't have standard way to grab backtraces. On mailing list I've seen people
reporting that -fexceptions and libunwind seem to work (with yet to be merged patches).

Reported by alkondratenko on 2013-09-14 20:20:54

@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

Hi,

I'm observing the same issue on on cavium octeon mips64

Here are the steps which i tried,

1. Compiled libunwind for mips64-octeon-linux-gnu with the following options,
./configure --host=mips64-octeon-linux-gnu CC=mips64-octeon-linux-gnu-gcc
make

2. Compiled libtcmalloc for mips64-octeon-linux-gnu with the following options,
./configure --host=mips64-octeon-linux-gnu --enable-libunwind=yes --enable-frame-pointers
CC=mips64-octeon-linux-gnu-gcc LDFLAGS=-L../libunwind-1.1/src/.libs LIBS=-lunwind CPPFLAGS=-I../libunwind-1.1/include
make

3. Compiled a sample program which does a malloc(100) and new int[200] as follows,
mips64-octeon-linux-gnu-g++ temp.c -L ./.libs -L ../libunwind-1.1/src/.libs/ -ltcmalloc
-lunwind

4. The program compiled successfully and on execution with HEAPCHECK=normal, i see
the following output,
heap profile:      2:      900 [     2:      900] @ heapprofile
     1:      100 [     1:      100] @
     1:      800 [     1:      800] @

MAPPED_LIBRARIES:
...

Output from the HEAP checker displays that 100 and 800 bytes have been leaked but does
not print any address where the allocation is done.
On using pprof it says "No nodes to print"

Kindly suggest.

Regards

Reported by loknaidu on 2015-02-25 09:39:56

@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

Please find the source and compiler version details,

gperftools-2.4.tar.gz
libunwind-1.1.tar.gz
mips64-octeon-linux-gnu-g++ (Cavium Inc. Version: 2_3_0 build 116) 4.3.3

Reported by loknaidu on 2015-02-25 09:47:22

@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

Please suggest..

Reported by loknaidu on 2015-02-26 15:47:02

@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

Any help??

Reported by loknaidu on 2015-03-04 05:40:31

@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

Is anybody willing to help here?

Reported by loknaidu on 2015-03-12 12:51:45

@alk alk closed this as completed Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant