Questions tagged [gperftools]

Perftools is a collection of a high-performance multi-threaded malloc() implementation, plus some pretty nifty performance analysis tools.

Perftools is a collection of a high-performance multi-threaded malloc() implementation, plus some pretty nifty performance analysis tools.

71 questions
3
votes
1 answer

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 workloads and profiled with gperftools cpu profiler.…
3
votes
2 answers

GPerfTools/pprof: what does a dashed line mean?

When you use the "--gv" option in GPerfTool's pprof command, you get a very pretty graph. Yay. Lines are either thick, thin, dashed or solid. I figure thick/thin is based on the number of sample entries that follow that line. But I have neither…
Mark Gerolimatos
  • 2,424
  • 1
  • 23
  • 33
3
votes
0 answers

GPERFTOOLS: CPUPROFILE_FREQUENCY seems to be VERY limited

I have been running a short-running program (about 1/8th of a second user CPU time), and no matter how hard I try, I can never get more than about 90 samples. Frankly, this is not fine-grained enough. This means that no more than about 1K…
Mark Gerolimatos
  • 2,424
  • 1
  • 23
  • 33
2
votes
2 answers

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 program execution in Go's pprof CPU profiler, I get…
ns52
  • 35
  • 1
  • 5
2
votes
2 answers

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…
Jason
  • 884
  • 8
  • 28
2
votes
1 answer

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()/ProfilerDisable() seems promising but the header…
nisah
  • 2,478
  • 3
  • 22
  • 20
2
votes
1 answer

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, found the the first one has 1300 samples but these 2…
asafu
  • 25
  • 2
2
votes
1 answer

I've set the CPUPROFILE environment variable and linked -lprofiler. Why is gperftools not starting the profiler?

According to the gperftools documentation, the profiler can be started using any of the following methods: Setting the CPUPROFILE environment variable to the filename the profile information will be saved to Doing the above, and also setting…
Ray
  • 1,706
  • 22
  • 30
2
votes
0 answers

Getting call hierarchy in gperftools for an R package

I can use gperftools to produce a call graph, as in for instance this question. Now I would like to get a call graph for bind_rows() in the dplyr R package in order to track down this bug. I compiled both R and dplyr using CPP/CXXFLAGS=-g…
Michael Schubert
  • 2,726
  • 4
  • 27
  • 49
2
votes
0 answers

Using gperftools with Boost.Python

I am trying to track down a memory leak in a Python extension I wrote in C++ using Boost.Python. I was trying to use gperftools. However, it appears that it does not play nicely with Python at all. Here is a simple example, I'm exposing…
Barry
  • 286,269
  • 29
  • 621
  • 977
2
votes
1 answer

gperftools cpuProfiler cannot see the simbols when profiling a file created by and ARM device

I want to profile a C++ application that runs in an ARM device. I ran my app and I profiled it using ProfilerStart("googleProfBL.prof"), so the file is generated. When I open the file from the ARM device in my local computer I get this: ./pprof…
2
votes
0 answers

Why do I see edges in the call graph that don't exist using gperftools?

Given the following code that either calls f or g #include #include int f() { return 0; } int g() { return 1; } int main() { long sum = 0; for(int i = 0; i < 1000*1000*1000; i++) { int result; …
archgoon
  • 1,538
  • 2
  • 14
  • 19
2
votes
2 answers

gperftools + apache + fcgi , it won't write to the file

I'm trying to profile a fcgi application (C++) that runs within apache with mod_fascgi with perftools. SO is Centos 6 x86_64. The problem is the following. According to gperftools documentation "For security reasons, CPU profiling will not write to…
pakore
  • 11,395
  • 12
  • 43
  • 62
2
votes
3 answers

Can't analyse the output (the profile file) of gperftools profiler

I'm using gperftools for analysing my C code. An as a result I can't analyze the profile file using pprof application. $ gcc -g prog.c -o prog -lprofiler $ export CPUPROFILE=info.prof $ ./prog Inside main() Inside func1 Inside new_func1() …
Mind Mixer
  • 1,503
  • 3
  • 13
  • 15
1
vote
1 answer

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(SYS_gettid)%3B). static void…
12 34
  • 13
  • 3