|
From: Philippe W. <phi...@sk...> - 2014-04-13 11:37:03
|
On Sun, 2014-04-06 at 19:29 -0700, janjust wrote: > Hi, > I'm trying to profile valgrind using perftools-lite and when compiling > the tools I get an undefined reference error. > VEX and coregrind build, but during linking it errs (error is below). > > I think it has do with static linking, the build command in memcheck was: > > ../coregrind/link_tool_exe_linux 0x38000000 cc -Wno-long-long -gdwarf-3 > -gstrict-dwarf -Wwrite-strings -fno-stack-protector -o > memcheck-amd64-linux -m64 -O2 -g -Wall -Wmissing-prototypes -Wshadow > -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations > -Wno-format-zero-length -fno-strict-aliasing -fno-builtin > -fno-omit-frame-pointer -O2 -nodefaultlibs -nostartfiles -u _start > -Wl,--build-id=none -m64 memcheck_amd64_linux-mc_leakcheck.o > memcheck_amd64_linux-mc_malloc_wrappers.o memcheck_amd64_linux-mc_main.o > memcheck_amd64_linux-mc_translate.o memcheck_amd64_linux-mc_machine.o > memcheck_amd64_linux-mc_errors.o ../coregrind/libcoregrind-amd64-linux.a > ../VEX/libvex-amd64-linux.a -lgcc > > Does anyone have any suggestions on how to resolve this? Valgrind does not use any libs (even does not use glibc), and I guess for a very good reason, as not using any lib has quite some consequences. To my knowledge, 2 techniques are working to profile valgrind: 1. oprofile 2. self-hosting (i.e. running valgrind under a valgrind tool such as callgrind or cachegrind. For more info about self-hosting, search for "Self-hosting" in README_DEVELOPERS Philippe |