Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Feb 2008 22:16:20 +0200
From:      Alexander Motin <mav@FreeBSD.org>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        freebsd-hackers@freebsd.org, freebsd-performance@freebsd.org
Subject:   Re: Memory allocation performance
Message-ID:  <47A37E14.7050801@FreeBSD.org>
In-Reply-To: <20080201185435.X88034@fledge.watson.org>
References:  <47A25412.3010301@FreeBSD.org> <47A25A0D.2080508@elischer.org> <47A2C2A2.5040109@FreeBSD.org> <20080201185435.X88034@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47A37E14.7050801>