tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Sample based profiling



Joerg Sonnenberger wrote:
> ...
> (1) Introduce a dynamic version of libc_pg.
> (2) Stop pretending that -pg means dynamic linking and implicitly add
> -static.
> (3) Stop pretending that -pg makes sense on modern hardware.
> 
> Fundamentally, I think the third option is the correct way forward.
> Sample based profiling with the default HZ setting just doesn't give
> very useful results except for extremely long running processes -- you
> get a sample every few million CPU cycles and want to extract something
> useful from that? There are options for doing sample based profiling
> without -pg. devel/gperftools provides one and doesn't require custom
> builds of everything.

I wanted to vote for option 3 if we have better tools but devel/gperftools
didn't build on my amd64 boxes (-current and -8):

In file included from benchmark/getcontext_light.cc:2:0:
benchmark/getcontext_light.cc: In function 'void
getcontext_tramp(ucontext_t*)':
benchmark/getcontext_light.cc:9:47: error: 'struct mcontext_t' has no
member named 'gregs'; did you mean '__gregs'?

Alex


Home | Main Index | Thread Index | Old Index