Memory allocation performance
Alexander Motin
mav at FreeBSD.org
Fri Feb 1 12:16:29 PST 2008
Hi.
Robert Watson wrote:
> It would be very helpful if you could try doing some analysis with hwpmc
> -- "high resolution profiling" is of increasingly limited utility with
> modern CPUs, where even a high frequency timer won't run very often.
> It's also quite subject to cycle events that align with other timers in
> the system.
I have tried hwpmc but still not completely friendly with it. Whole
picture is somewhat alike to kgmon's, but it looks very noisy. Is there
some "know how" about how to use it better?
I have tried it for measuring number of instructions. But I am in doubt
that instructions is a correct counter for performance measurement as
different instructions may have very different execution times depending
on many reasons, like cache misses and current memory traffic. I have
tried to use tsc to count CPU cycles, but got the error:
# pmcstat -n 10000 -S "tsc" -O sample.out
pmcstat: ERROR: Cannot allocate system-mode pmc with specification
"tsc": Operation not supported
What have I missed?
I am now using Pentium4 Prescott CPU with HTT enabled in BIOS, but
kernel built without SMP to simplify profiling. What counters can you
recommend me to use on it for regular time profiling?
Thanks for reply.
--
Alexander Motin
More information about the freebsd-performance
mailing list