[PATCH] gprofng: a new GNU profiler

Ruud van der Pas ruud.vanderpas@oracle.com
Fri Oct 8 17:59:07 GMT 2021


Hi Florian,

Thanks for the feedback.

> I find it odd to replace an instrumentation-based profiler with a
> sampling-based profiler.

We’re not replacing gprof, or any other profiling tool for that matter.
They all have their merits and generally more than one tool is needed
for performance analysis.

There are definitely differences, both pros and cons, between instrumentation
and sampling. We think that the pros of sampling by far outweigh the cons,
but of course the user decides.

One thing we do not do is produce function call counts. While I found that
gprof sometimes drops the ball on that, in certain cases this is useful to know.

Having said that, I found that DTrace does a really good job at this. It
is also much more efficient and has full support for multithreading.

I wrote a blog on this:

https://blogs.oracle.com/linux/post/dtrace-for-the-application-developer-counting-function-calls

> This looks very useful.  

Thsnks.

> Can it be generalized to support coredumps?
> So that it is possible to get identical debugging experience on a
> system where the necessary prerequisites are not installed?

I’m not sure how that would work. While gprofng can produce a profile
for a code that crashes, we do not have the infrastructure to handle
core files.

It might be better to perhaps leverage what we have, but integrate
this with either gdb (?), or maybe develop a separate tool.

Kind regards, Ruud



More information about the Binutils mailing list