diff options
author | fabient <fabient@FreeBSD.org> | 2012-03-28 20:58:30 +0000 |
---|---|---|
committer | fabient <fabient@FreeBSD.org> | 2012-03-28 20:58:30 +0000 |
commit | 5edfb77dd3a164bb9d2d40c6604faa6c9f3dce15 (patch) | |
tree | fadff08d26576c3d5c1cef9d47abd784602b237a /sys/dev/hwpmc/hwpmc_piv.c | |
parent | 9a7982e5a0267c0421856f3a43a1ae75880058f3 (diff) | |
download | FreeBSD-src-5edfb77dd3a164bb9d2d40c6604faa6c9f3dce15.zip FreeBSD-src-5edfb77dd3a164bb9d2d40c6604faa6c9f3dce15.tar.gz |
Add software PMC support.
New kernel events can be added at various location for sampling or counting.
This will for example allow easy system profiling whatever the processor is
with known tools like pmcstat(8).
Simultaneous usage of software PMC and hardware PMC is possible, for example
looking at the lock acquire failure, page fault while sampling on
instructions.
Sponsored by: NETASQ
MFC after: 1 month
Diffstat (limited to 'sys/dev/hwpmc/hwpmc_piv.c')
-rw-r--r-- | sys/dev/hwpmc/hwpmc_piv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/hwpmc/hwpmc_piv.c b/sys/dev/hwpmc/hwpmc_piv.c index 8ee8518..26b23a1 100644 --- a/sys/dev/hwpmc/hwpmc_piv.c +++ b/sys/dev/hwpmc/hwpmc_piv.c @@ -1463,7 +1463,7 @@ p4_intr(int cpu, struct trapframe *tf) !PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) { continue; } - (void) pmc_process_interrupt(cpu, pm, tf, + (void) pmc_process_interrupt(cpu, PMC_HR, pm, tf, TRAPF_USERMODE(tf)); continue; } @@ -1513,7 +1513,7 @@ p4_intr(int cpu, struct trapframe *tf) * Process the interrupt. Re-enable the PMC if * processing was successful. */ - error = pmc_process_interrupt(cpu, pm, tf, + error = pmc_process_interrupt(cpu, PMC_HR, pm, tf, TRAPF_USERMODE(tf)); /* |