Le 10/03/2017 à 19:01, Valery Ushakov a écrit :
On Fri, Mar 10, 2017 at 13:09:11 +0000, Maxime Villard wrote:

Module Name:    src
Committed By:   maxv
Date:           Fri Mar 10 13:09:11 UTC 2017

Modified Files:
        src/sys/arch/i386/i386: pmc.c
        src/sys/arch/x86/include: sysarch.h
        src/usr.bin/pmc: pmc.1 pmc.c

Log Message:
Switch to per-CPU PMC results, and completely rewrite the pmc(1) tool. Now
the PMCs are system-wide, fine-grained and more tunable by the user.

We don't do application tracking, since it would require to store the PMC
values in mdproc and starting/stopping the counters on each context switch.
While this doesn't seem to be particularly difficult to achieve, I don't
think it is really interesting; and if someone really wants to measure
the performance of an application, they can simply schedctl it to a cpu
and look at the PMC results for this cpu.

How does that affects the MI pmc(9) API?

-uwe


It does not; x86 uses a MD sysarch which is intentionally opaque and
undocumented. PMCs are in many ways highly CPU-specific, and MD sysarches are
easier to maintain. I would also add that no one is interested in having a
common API for such features, as long as there is at least one tool that can
correctly use MD entries and display results.

Reply via email to