This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 2 problems with sprof


On Sun, Sep 23, 2001 at 09:22:32AM -0700, H . J . Lu wrote:
> > [I personally don't feel the urge to do this right now since we still
> > have no high-resolution timers.  Without them any new profiling code
> > is rather meaningless.]
> 
> Can we change HZ in kernel to get high-resolution timer?

IMHO it would be far better to teach gcc to emit _mcount style profiling
hooks both in function prologue and function epilogue. Then you don't have
to worry about timer sampling and instead do rdtsc during entering of each
function and rdtsc when leaving that function. On most arches this would
still without proper kernel support give you strange values when process was
rescheduled (but e.g. on SPARC you can choose userland tick timers), but
even that will be far more accurate than using SIGPROF based sampling.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]