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
13
votes
2 answers

How to use google perf tools

I just started using google performance tools (google-perftools and libgoogle-perftools4 packages in ubuntu), I swear that I'm googling for around a day and I didn't find an answer!! The problem is that I do not get the result for ALL of my…
Mohammad
  • 464
  • 1
  • 3
  • 17
12
votes
1 answer

Using pprof with gperftools resulting in curl error

So I have been doing the following: $ pprof /bin/ls ls.prof Using local file /bin/ls. Gathering CPU profile from http://ls.prof/pprof/profile?seconds=30 for 30 seconds to /home/user/csteifel/pprof/ls.1414597606.ls.prof Be patient... curl: (7)…
csteifel
  • 2,854
  • 6
  • 35
  • 61
10
votes
2 answers

How exactly does gperftools CPU profiler start?

gperftools documentation says that libprofiler should be linked into a target program: $ gcc myprogram.c -lprofiler (without changing a code of the program). And then program should be run with a specific environment…
Daniel Vartanov
  • 3,243
  • 1
  • 19
  • 26
8
votes
3 answers

What exactly does C++ profiling (google cpu perf tools) measure?

I trying to get started with Google Perf Tools to profile some CPU intensive applications. It's a statistical calculation that dumps each step to a file using `ofstream'. I'm not a C++ expert so I'm having troubling finding the bottleneck. My first…
Tristan
  • 6,776
  • 5
  • 40
  • 63
7
votes
1 answer

How does gperftools work under the hood?

I am looking for a simple explanation of how gperftools works. So far, this is what I have learned: It runs a stop-the-world sampler. In other words, it periodically stops the program being profiled to collect information. Golang's pprof library…
Ben Sandler
  • 2,223
  • 5
  • 26
  • 36
7
votes
2 answers

gperftools cpu profiler does not support multi process?

according to the document, http://gperftools.googlecode.com/svn/trunk/doc/cpuprofile.html, the cpu profiles does support multi process and will generate independent output file: If your program forks, the children will also be profiled (since they …
ZRJ
  • 181
  • 1
  • 7
5
votes
2 answers

gperftools - profile file not dumped

I've configured and built gpreftools. 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, building the program and the flag is added…
Eslam
  • 123
  • 2
  • 10
5
votes
2 answers

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 happens inside the C++ functions, and I don't know…
MOzSalles
  • 195
  • 8
5
votes
1 answer

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 called __nss_passwd_lookup(), which takes…
Michael Spector
  • 36,723
  • 6
  • 60
  • 88
5
votes
1 answer

What does 'f' suffix mean on a C++ library name and how do I load it?

I'm using gperftools v2.3rc and would like to use the improved profiling of threads feature. The release notes state in part: new cpu profiling mode on Linux is now implemented. It sets up separate profiling timers for separate threads. ... [It] is…
WilliamKF
  • 41,123
  • 68
  • 193
  • 295
5
votes
2 answers

How to properly handle signals, so that gperftools CPU profiler still works?

I want to profile my daemon program, that pauses the main thread: sigset_t signal_mask; sigemptyset(&signal_mask); sigaddset(&signal_mask, SIGTERM); sigaddset(&signal_mask, SIGINT); int sig; sigwait(&signal_mask, &sig); All other threads simply…
abyss.7
  • 13,882
  • 11
  • 56
  • 100
4
votes
1 answer

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 creating a flat profile, using pprof --text…
4
votes
2 answers

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, most of the function names from libraries I've…
Max C
  • 369
  • 5
  • 16
3
votes
0 answers

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…
3
votes
1 answer

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(MallocExtension* implementation) { InitModule(); …
choeger
  • 3,562
  • 20
  • 33
1
2 3 4 5