0

I've been recommended gperftools to simply and quickly profile my code. Furthermore, the integration of -lprofiler was already done in the CMAKE of the code I got. Now that I migrated the source code on to the Jetson TX1 and that it worked well, I've tried to use gperftools.

Unfortunately, segmentation faults start to appear as soon as I launch my program with perftools

env CPUPROFILE=./lts.prof /mybin

I've read the documentation and they talk about using the correct libunwind for 64 bit Linux. Unfortunately, the given library (0.99 libunwind, http://download.savannah.gnu.org/releases/libunwind/libunwind-0.99-beta.tar.gz) does not seem to like the Tegra platform.

First of all, there is a problem with the config.guess, that I had to change with the one located in /usr/share/automake*/.

configure: error: cannot guess build type; you must specify one

Then it goes wrong like this :

config.status: error: ./include/libunwind-aarch64.h: file not found

I've tried to use the master tree because they added AARCH64 (which appeared in the error messages), but then I get other messages :

aarch64/is_fpreg.c:31:21: error: 'UNW_AARCH64_V0' undeclared (first use in this function)
return (regnum >= UNW_AARCH64_V0 && regnum <= UNW_AARCH64_V31);

aarch64/is_fpreg.c:31:49: error: 'UNW_AARCH64_V31' undeclared (first use in this function)
return (regnum >= UNW_AARCH64_V0 && regnum <= UNW_AARCH64_V31);
  • As anyone been able to use gperftools on a Tegra Dev Kit or similar platform ?
  • Is the libunwind part of the segfault problem ? Again the code works without -lprofiler and CPUPROFILER.
Kriegalex
  • 423
  • 6
  • 17
  • Please open a bug on github.com/gperftools/gperftools with full backtrace of the crash. Also newest gperftools gives your various working options for backtrace capturing such using using libgcc or glibc. Which might work better in your case. You will simply need to stop linking it to libunwind. – Aliaksei Kandratsenka Mar 11 '16 at 16:32
  • https://github.com/gperftools/gperftools/issues/784 if someone wants to follow – Kriegalex Mar 22 '16 at 14:49

0 Answers0