78 questions
0
votes
1
answer
96
views
How do I profile c++ code on macOS sequoia using pprof and gperftools
I'm trying to profile my c++ code on macOS using gperftools and pprof. I have installed gperftools and I am able to successfully run g++ test.cpp -o test -lprofiler and CPUPROFILE=~/prof.out ./test. ...
1
vote
1
answer
72
views
C++ Profiling - Called method from coroutine function has a higher hit count than its caller
I am profiling some code using the cppgraphgqlgen library - which uses C++20 coroutines extensively in its internals.
I have profiled an application and found that I have some called-into methods that ...
0
votes
0
answers
53
views
Why no profiler.h in the conan gperftools latest versions?
Starting from version 2.11, the file gperftools/profiler.h disappears. https://conan.io/center/recipes/gperftools?version=2.16
How to profile the application of recent versions if I want to install a ...
0
votes
1
answer
149
views
gperftools: Can the time interval for generating output files in the heap profiler of gperftools be configured?
My program experiences occasional memory spikes:
The issue of memory consumption spiking occurs once every 5 to 7 runs.
Each run takes a few minutes.
I would like to use the heap profiler of ...
0
votes
1
answer
84
views
core dump encountered when linking against to gperftools
I have a customer library which will be invoked by java through JNI, then I want to do a profiling with that through gperftools, the code is below:
Findgperftools:
include(ExternalProject)
set(...
0
votes
0
answers
54
views
How to disable gperftool profiling in python
I want to do CPU profiling with gperftools by setting LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libprofiler.so.0 CPUPROFILE=/tmp/myprofile.out.
It works fine on purely C++ environment, but gperftools doesn'...
1
vote
0
answers
2k
views
How to install libc debug symbols (libc6-dbg) on Ubuntu 20.04? /usr/lib/debug empty after installing libc6-dbg
I need the debug symbols for libc on Ubuntu 20.04 for performance profiling in gperftools (or perf). I checked how to install them and used:
sudo apt-get install libc6-dbg
After successfull ...
0
votes
1
answer
174
views
Can I analyze tcmalloc heap profile dump without golang being part of my environment (pprof can't be installed without go)?
Due to certain restrictions I can not have golang as part of my environment. I would like to use the HEAPPROFILE generated by tcmalloc. To the best of my knowledge only way to make it human readable ...
0
votes
0
answers
248
views
Heap profiling with gperftools and Rcpp: Failing to link against tcmalloc
I'm trying to get a memory profile of my C++ library running under R. Following https://gperftools.github.io/gperftools/heapprofile.html I link against tmalloc, but the build fails.
g++ -std=gnu++11 -...
0
votes
0
answers
99
views
How to avoid CMake writting full path of objects to the static library?
The original issue is here.
After a few days, I find the problem is here.
I tried to use the following CMakeLists.txt to build tcmalloc_minimal_static.lib:
#...
# https://github.com/gperftools/...
1
vote
1
answer
343
views
How does gperftools get the cpu profiling of each thread?
I have read source code of gperftools(https://github.com/gperftools/gperftools/blob/f7c6fb6c8e99d6b1b725e5994373bcd19ffdf8fd/src/profile-handler.cc#:~:text=sevp.sigev_notify_thread_id%20%3D%20syscall(...
2
votes
0
answers
1k
views
Profiling waiting threads with perf or other tools
In a multithreaded program, how can one effectively profile threads that are waiting on a lock, are sleeping or are scheduled out in some other way?
For my profiling purposes I need to have insight in ...
0
votes
0
answers
436
views
which version of tcmalloc is used in gpertools-2.10
tcmalloc is one part of gperftools. I discover the version of tcmalloc used in gperftools laest version(currently 2.10) entirely different from tcmalloc from github: https://github.com/google/tcmalloc....
5
votes
1
answer
650
views
GPerfTools not showing function names
I am new to profiling and am trying to create a flat profile for my c++ project. Looks like gperftools is popular. I installed gperftools using Homebrew and followed this simple tutorial
When I try ...
0
votes
1
answer
331
views
Run pprof on data collected from remote machine?
I have a program that runs on a remote headless machine (ie no X server) that has a memory leak. I was able to install gperftools and ran the heap checker which found the leak.
My problem is I can't ...
0
votes
1
answer
657
views
How to check if a pre-compiled libtcmalloc.so is compiled without libunwind?
I do not know where to even start, apologies for the noob question but seems there's nothing on this specific case in SO unless there's more generic terms I do not know.
2
votes
3
answers
2k
views
gperftools not installing -lprofiler on Mac after installing it with brew
Recently I wanted to profile my cpp code and came across gperftool, but there aren't really clear instructions on how to use it with Mac. So far I have run brew install gperftools and wanted to ...
1
vote
1
answer
379
views
gperftools/tcmalloc 2.8 - running out of memory
We are migrating from gperftools/tcmalloc 2.0 to 2.8. But some of our test cases fail with "out of memory" error. We use Cent OS 6.5.
This happens with a posix_memalign() call requesting for ...
1
vote
0
answers
72
views
What are _Rf_cons and _Rf_allocVector3?
I'm working on an R package that uses Rcpp and RcppArmadillo, and I'm trying to profile one of the main functions in the package to improve its runtime.
I'm using gperftools as recommended by Dirk and ...
0
votes
0
answers
350
views
How to use gperftools on Java Application?
I've learned to install the gperftools on my server from the wiki of gperftools and some blogs .
The commands are like these:
yum -y install gcc make
yum -y install gcc gcc-c++
# upload libunwind-1....
0
votes
1
answer
2k
views
What does __GI___poll mean in my profile?
I am using gperftools to profile my C++ code, and the largest node is __GI___poll. It's being called by low level Qt and OpenCL code (mostly Qt), so it's several steps removed from my own code. My ...
4
votes
2
answers
2k
views
No function names when using gperftools/pprof
I've been trying to get gperftools CPU profiling working on my program.
I'm running into an issue where all the function names in my program are pointer addresses when reported by pprof. Annoyingly, ...
4
votes
0
answers
756
views
How do I specify the host argument to configure scripts in Bazel?
I'm trying to cross-compile envoy (uses Bazel) on lubuntu 16.04 LTS for an aarch64 variant by using the Linaro toolchain at https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-...
1
vote
0
answers
247
views
Profiling issues C++ on a Jetson TX2. Function names are not displayed
I'm having issues with profiling my C++ code on a Jetson TX2. The profiling itself works, but I don't get the function names, but instead, it says that a part is unknown.
I installed pprof with go and ...
0
votes
1
answer
1k
views
TCMALLOC memory leak
On Windows when I static bind tcmalloc with my code, I see continuous memory growth, but there is no growth if I do not use tcmalloc.
issue is not present in Linux.
I have tried flags below flags:
...
0
votes
1
answer
435
views
Filtering heaptrack data for size
I recorded a *.gz file with heaptrack for my application. I want to use it to find out how much memory is wasted by using small allocations.
Now my question is: Is it possible to filter the gz or ...
0
votes
1
answer
236
views
jetty quits immediately after setting HEAPPROFILE
I want to analyse off-heap memory usage of jetty.
So I use gperftools and add env to jetty.sh:
export LD_PRELOAD=/usr/local/lib/libtcmalloc.so
# export HEAPPROFILE=/home/cccccc/perftools/mybin
It ...
1
vote
1
answer
1k
views
Use gperftools' heap profiler to profile libc malloc
I am trying to profile an application to compare its performance using different allocation strategies.
I have no trouble profiling it when using tcmalloc but how to profile it using libc's ...
1
vote
1
answer
3k
views
cmake : failing to link against google profiler (gperftools)
I am on ubuntu 16.04.
Here what I did:
installed gperftools :
sudo apt-get install google-perftools libgoogle-perftools-dev
downloaded FindGperftools.cmake from: https://github.com/vast-io/vast/...
3
votes
1
answer
565
views
Apparent memory leak in gperftools
This one comes up when running a program that was built with the address sanitizer and made me curious.
The gperftools source code contains the following function:
void MallocExtension::Register(...
6
votes
2
answers
4k
views
gperftools - profile file not dumped
I've configured and built gperftools. however, I can't seem to find the generated profile file of my program to display it.
I took the following actions:
Adding the -lprofiler linker flag to my .pro, ...
5
votes
2
answers
1k
views
How to profile Rcpp code (on linux)
I made an R package with Rcpp where whole simulations are run in c++ and results are analyzed in R. Now I need to profile my functions so I can optimize them, but R profilers can't distinguish what ...
3
votes
1
answer
2k
views
Interpreting results for gperftools on multi-threaded workloads
I am trying to profile multi-threaded workloads with gperftools but am having difficulty interpreting the output produced. I have written a simple program that launches two threads with identical ...
0
votes
1
answer
488
views
Linking google perf tools for aarch64
I have been using google perf tools successfully on my pc. However, I am compiling and deploying for aarch64 architecture and the profiling results I get for x86 might not match up with aarch64.
I ...
1
vote
1
answer
2k
views
gperftools and pprof do not print my function names. Need advice on how to fix this
I'm currently writing a game in C++ using SDL on Ubuntu. I recently multithreaded my engine, so I switched from profiling with valgrind/callgrind to gperftools. I have gotten it to work, but it will ...
1
vote
0
answers
485
views
Why are some function names are address in gperftools report?
I'm using gperftools to proflie my program and try to optimize it. After running my program with gperftools, I got this:
Total: 2902 samples
2765 95.3% 95.3% 2765 95.3% 0xb76e7cb0
93 3.2% ...
2
votes
2
answers
2k
views
Go profiler (pprof) timing discrepancy
When I measure the run time of my Go program with Linux's time utility, I get the following output:
real 1m9.177s
user 7m1.788s
sys 0m39.016s
When I look at the output of the same exact ...
0
votes
1
answer
1k
views
Profiling timer expired when using gperftools with sort
I spent the whole day trying to make gperftools working :/
I tired different libunwind versions but when I successed in installing it I got the following error "Profiling timer expired" whenever I ...
5
votes
1
answer
2k
views
What's __nss_passwd_lookup() call that I see in profiler output about?
I'm using gperftools to profile a C++ application, which was compiled using GCC 5.4.0 (with -O3).
The code is highly optimized, so I don't see a lot of branches in the output, but there's a branch ...
2
votes
2
answers
969
views
Getting gperftools to work with Rcpp
I've read related posts here and here, and looked at Dirk Eddelbuettel's talk here and yet I'm failing to even get a .log file from gperftools. Here is my R file, called Rcpp_practice.R:
library(...
0
votes
1
answer
510
views
Using gperftools/Heaptrack without installation
I am trying to do heap profiling of C++ application on unix platform. I have tried valgrind's massif but it makes application very slow and affects behavior of the application.
I was searching for ...
0
votes
1
answer
841
views
gperftools not showing call graph results
I've got gperftools installed and collecting data, which looks reasonable so far. I see one node (?) that gets sampled a lot - but I'm interested in the callers to that node - I don't see them? I've ...
2
votes
3
answers
7k
views
Problems with using gperftools on Mac OS X
I have found several conflicting answers over this topic. This blog post requires libuwind, but that doesn't work on Mac OS X. I included #include <google/profiler.h> in my code, however my ...
2
votes
1
answer
1k
views
How to use gperftools to conditionally profile C++ code?
I am trying to CPU-profile a callback driven system and I'm only interested in profiling when the callback causes me to react a certain way ? Can I use gperftools to accomplish this ?
ProfilerEnable()...
1
vote
1
answer
949
views
Using GPerf Tool: not working, issue with redirection?
I'm trying to profile my software in order to optimize it.
I used gprof with the compilation flag -g -pg -O3 but the result are not giving me enough precision.
Here is my Stacktrace of compilation: ...
0
votes
0
answers
250
views
Using gperftools with a Jetson TX1 dev kit
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 ...
2
votes
1
answer
557
views
how to get the right gperf samples report
I have some gperf tool files:
the first one was running about 2 minites,file is 18M;
others running about 2 hours and the files are about 800M
when I try to use :pprof --text to get the report, ...
0
votes
1
answer
546
views
Hexadecimal function name in gproftools profiling
After CPU profiling using gproftools (google profiler) it show some function name as hexadecimal values.
According to last comment of https://groups.google.com/forum/#!topic/google-perftools/...
1
vote
0
answers
407
views
LNK2005 error when trying to link with tcmalloc
I've trying to compile a project with tcmalloc in Visual Studio 2013. I've compiled .lib file for libtcmalloc from gperftools package and added libtcmalloc.lib into linker input options.
When I'm ...
1
vote
1
answer
154
views
Cannot profile threads in a library
I'm trying to use the Google Performance Tools, specifically the official release in the 64-bit Ubuntu 14.04 repository, to debug an application and its associated .so library.
Running with minimal ...