Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Aug 2002 23:44:08 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Luigi Rizzo <rizzo@icir.org>
Cc:        current@FreeBSD.ORG
Subject:   Re: how to compute the skew between TSC in SMP systems ? 
Message-ID:  <30687.1030139048@critter.freebsd.dk>
In-Reply-To: Your message of "Fri, 23 Aug 2002 14:42:56 PDT." <20020823144256.A82380@iguana.icir.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20020823144256.A82380@iguana.icir.org>, Luigi Rizzo writes:

>I want to find performance problems in the kernel, and to this purpose,
>sometimes i need to timestamp events in the kernel using the
>least-intrusive technique i can use, and hopefully get reasonably
>accurate estimates.

If you have a motherboard with ACPI I would use the ACPI counter which
runs at 3.mumble MHz, that gives you guaranteed synchronization between
CPUs and <300ns resolution.

Alternatively, consider using "basic-block profiling" (see kernbb(8) and
gcc docs), that will tell you not only how many instructions but also
_which_ instructions are executed.


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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