2008-09-16 16:34:55 +00:00
|
|
|
.\" Copyright (c) 2003-2008 Joseph Koshy. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" This software is provided by Joseph Koshy ``as is'' and
|
|
|
|
.\" any express or implied warranties, including, but not limited to, the
|
|
|
|
.\" implied warranties of merchantability and fitness for a particular purpose
|
|
|
|
.\" are disclaimed. in no event shall Joseph Koshy be liable
|
|
|
|
.\" for any direct, indirect, incidental, special, exemplary, or consequential
|
|
|
|
.\" damages (including, but not limited to, procurement of substitute goods
|
|
|
|
.\" or services; loss of use, data, or profits; or business interruption)
|
|
|
|
.\" however caused and on any theory of liability, whether in contract, strict
|
|
|
|
.\" liability, or tort (including negligence or otherwise) arising in any way
|
|
|
|
.\" out of the use of this software, even if advised of the possibility of
|
|
|
|
.\" such damage.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2008-10-04 12:44:05 +00:00
|
|
|
.Dd October 4, 2008
|
2008-09-16 16:34:55 +00:00
|
|
|
.Os
|
|
|
|
.Dt PMC 3
|
|
|
|
.Sh NAME
|
|
|
|
.Nm pmc
|
|
|
|
.Nd library for accessing hardware performance monitoring counters
|
|
|
|
.Sh LIBRARY
|
|
|
|
.Lb libpmc
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.In pmc.h
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
Intel Pentium PMCs are present in Intel
|
|
|
|
.Tn Pentium
|
|
|
|
and
|
|
|
|
.Tn "Pentium MMX"
|
|
|
|
processors.
|
|
|
|
These PMCs are documented in the
|
|
|
|
.Rs
|
|
|
|
.%B "Intel 64 and IA-32 Intel(R) Architectures Software Developer's Manual"
|
|
|
|
.%T "Volume 3B: System Programming Guide, Part 2"
|
|
|
|
.%N "Order Number 253669-024US"
|
|
|
|
.%D "August 2007"
|
|
|
|
.%Q "Intel Corporation"
|
|
|
|
.Re
|
|
|
|
.Ss PMC Features
|
|
|
|
These CPUs contain two PMCs, each 40 bits wide.
|
|
|
|
These PMCs support the following capabilities:
|
|
|
|
.Bl -column "PMC_CAP_INTERRUPT" "Support"
|
|
|
|
.It Em Capability Ta Em Support
|
|
|
|
.It PMC_CAP_CASCADE Ta \&No
|
|
|
|
.It PMC_CAP_EDGE Ta \&No
|
|
|
|
.It PMC_CAP_INTERRUPT Ta \&No
|
|
|
|
.It PMC_CAP_INVERT Ta \&No
|
|
|
|
.It PMC_CAP_READ Ta Yes
|
|
|
|
.It PMC_CAP_PRECISE Ta \&No
|
|
|
|
.It PMC_CAP_SYSTEM Ta Yes
|
|
|
|
.It PMC_CAP_TAGGING Ta \&No
|
|
|
|
.It PMC_CAP_THRESHOLD Ta \&No
|
|
|
|
.It PMC_CAP_USER Ta Yes
|
|
|
|
.It PMC_CAP_WRITE Ta Yes
|
|
|
|
.El
|
|
|
|
.Ss Event Qualifiers
|
|
|
|
Event specifiers for Intel Pentium PMCs can have the following common
|
|
|
|
qualifiers:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Li duration
|
|
|
|
Count duration (in clocks) of events.
|
|
|
|
The default is to count events.
|
|
|
|
.It Li os
|
|
|
|
Measure events at privilege levels 0, 1 and 2.
|
|
|
|
.It Li overflow
|
|
|
|
Assert the external processor pin associated with a counter on counter
|
|
|
|
overflow.
|
|
|
|
.It Li usr
|
|
|
|
Measure events at privilege level 3.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
If neither of the
|
|
|
|
.Dq Li os
|
|
|
|
or
|
|
|
|
.Dq Li usr
|
|
|
|
qualifiers are specified, the default is to enable both.
|
|
|
|
.Pp
|
|
|
|
Some events may only be used on specific counters and some events
|
|
|
|
are defined only on processors supporting the MMX instruction set.
|
|
|
|
Note that these PMCs do not have the ability to interrupt the CPU.
|
|
|
|
.Ss Intel Pentium Event Specifiers
|
|
|
|
The event specifiers supported by Intel Pentium PMCs are:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Li p5-any-segment-register-loaded
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 0FH
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of writes to any segment register, including the LDTR,
|
|
|
|
GDTR, TR and IDTR.
|
|
|
|
Far control transfers and task switches that involve privilege
|
|
|
|
level changes will count this event twice.
|
|
|
|
.It Li p5-bank-conflicts
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 0AH
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of actual bank conflicts.
|
|
|
|
.It Li p5-branches
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 12H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of taken and not taken branches including branches, jumps, calls,
|
|
|
|
software interrupts and interrupt returns.
|
|
|
|
.It Li p5-breakpoint-match-on-dr0-register
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 23H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of matches on the DR0 breakpoint register.
|
|
|
|
.It Li p5-breakpoint-match-on-dr1-register
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 24H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of matches on the DR1 breakpoint register.
|
|
|
|
.It Li p5-breakpoint-match-on-dr2-register
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 25H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of matches on the DR2 breakpoint register.
|
|
|
|
.It Li p5-breakpoint-match-on-dr3-register
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 26H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of matches on the DR3 breakpoint register.
|
|
|
|
.It Li p5-btb-false-entries
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 3AH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of false entries in the BTB.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-btb-hits
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 13H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of branches executed that hit in the branch table buffer.
|
|
|
|
.It Li p5-btb-miss-prediction-on-not-taken-branch
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 3AH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of times the BTB predicted a not-taken branch as taken.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.It Li p5-bus-cycle-duration
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 18H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of cycles while a bus cycle was in progress.
|
|
|
|
.It Li p5-bus-ownership-latency
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 2AH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The time from bus ownership being requested to ownership being granted.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-bus-ownership-transfers
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 2AH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of bus ownership transfers.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.It Li p5-bus-utilization-due-to-processor-activity
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 2EH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of clocks the bus is busy due to the processor's own
|
|
|
|
activity.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-cache-line-sharing
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 2CH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of shared data lines in L1 cache.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.It Li p5-cache-m-state-line-sharing
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 2CH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of hits to an M- state line due to a memory access by
|
|
|
|
another processor.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-code-cache-miss
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 0EH
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of instruction reads that miss the internal code cache.
|
2009-08-23 07:31:10 +00:00
|
|
|
Both cacheable and un-cacheable misses are counted.
|
2008-09-16 16:34:55 +00:00
|
|
|
.It Li p5-code-read
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 0CH
|
2009-08-23 07:31:10 +00:00
|
|
|
The number of instruction reads to both cacheable and un-cacheable regions.
|
2008-09-16 16:34:55 +00:00
|
|
|
.It Li p5-code-tlb-miss
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 0DH
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of instruction reads that miss the instruction TLB.
|
2009-08-23 07:31:10 +00:00
|
|
|
Both cacheable and un-cacheable unreads are counted.
|
2008-09-16 16:34:55 +00:00
|
|
|
.It Li p5-d1-starvation-and-fifo-is-empty
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 33H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of times the D1 stage cannot issue any instructions because
|
|
|
|
the FIFO was empty.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-d1-starvation-and-only-one-instruction-in-fifo
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 33H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of times the D1 stage could issue only one instruction
|
|
|
|
because the FIFO had one instruction ready.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.It Li p5-data-cache-lines-written-back
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 06H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of data cache lines that are written back, including
|
|
|
|
those caused by internal and external snoops.
|
|
|
|
.It Li p5-data-cache-tlb-miss-stall-duration
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 30H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of clocks the pipeline is stalled due to a data cache
|
|
|
|
TLB miss.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.It Li p5-data-read
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 00H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of memory data reads, counting internal data cache hits and
|
|
|
|
misses.
|
|
|
|
I/O and data memory accesses due to TLB miss processing are
|
|
|
|
not included.
|
|
|
|
Split cycle reads are counted individually.
|
|
|
|
.It Li p5-data-read-miss
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 03H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of memory read accesses that miss the data cache, counting
|
2009-08-23 07:31:10 +00:00
|
|
|
both cacheable and un-cacheable accesses.
|
2008-09-16 16:34:55 +00:00
|
|
|
Data accesses that are part of TLB miss processing are not included.
|
|
|
|
I/O accesses are not included.
|
|
|
|
.It Li p5-data-read-miss-or-write-miss
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 29H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of data reads and writes that miss the internal data cache,
|
2009-08-23 07:31:10 +00:00
|
|
|
counting un-cacheable accesses.
|
2008-09-16 16:34:55 +00:00
|
|
|
Data accesses due to TLB miss processing are not counted.
|
|
|
|
.It Li p5-data-read-or-write
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 28H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of data reads and writes including internal data cache hits
|
|
|
|
and misses.
|
|
|
|
Data reads due to TLB miss processing are not counted.
|
|
|
|
.It Li p5-data-tlb-miss
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 02H
|
2009-08-23 07:31:10 +00:00
|
|
|
The number of misses to the data cache translation look aside buffer.
|
2008-09-16 16:34:55 +00:00
|
|
|
.It Li p5-data-write
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 01H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of memory data writes, counting internal data cache hits
|
|
|
|
and misses.
|
|
|
|
I/O is not included and split cycle writes are counted individually.
|
|
|
|
.It Li p5-data-write-miss
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 04H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of memory write accesses that miss the data cache, counting
|
2009-08-23 07:31:10 +00:00
|
|
|
both cacheable and un-cacheable accesses.
|
2008-09-16 16:34:55 +00:00
|
|
|
I/O accesses are not counted.
|
|
|
|
.It Li p5-emms-instructions-executed
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 2DH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of EMMS instructions executed.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-external-data-cache-snoop-hits
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 08H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of external snoops to the data cache that hit a valid line,
|
|
|
|
or the data line fill buffer, or one of the write back buffers.
|
|
|
|
.It Li p5-external-snoops
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 07H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of external snoop requests accepted, including snoops that
|
|
|
|
hit in the code cache, the data cache and that hit in neither.
|
|
|
|
.It Li p5-floating-point-stalls-duration
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 32H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of cycles the pipeline is stalled due to a floating point
|
|
|
|
freeze.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-flops
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 22H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of floating point adds, subtracts, multiples, divides and
|
|
|
|
square roots.
|
|
|
|
Transcendental instructions trigger this event multiple times.
|
|
|
|
Instructions generating divide-by-zero, negative square root, special
|
|
|
|
operand and stack exceptions are not counted.
|
|
|
|
Integer multiply instructions that use the x87 FPU are counted.
|
|
|
|
.It Li p5-full-write-buffer-stall-duration-while-executing-mmx-instructions
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 3BH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of clocks the pipeline has stalled due to full write
|
|
|
|
buffers when executing MMX instructions.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-hardware-interrupts
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 27H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of taken INTR and NMI interrupts.
|
|
|
|
.It Li p5-instructions-executed
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 16H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of instructions executed.
|
|
|
|
Repeat prefixed instructions are counted only once.
|
|
|
|
The HLT instruction is counted only once, irrespective of the number
|
|
|
|
of cycles spent in the halted state.
|
|
|
|
All hardware and software exceptions are counted as instructions, and
|
|
|
|
fault handler invocations are also counted as instructions.
|
|
|
|
.It Li p5-instructions-executed-v-pipe
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 17H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of instructions that executed in the V pipe.
|
|
|
|
.It Li p5-io-read-or-write-cycle
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 1DH
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of bus cycles directed to I/O space.
|
|
|
|
.It Li p5-locked-bus-cycle
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 1CH
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of locked bus cycles that occur on account of the lock
|
|
|
|
prefixes, LOCK instructions, page table updates and descriptor table
|
|
|
|
updates.
|
|
|
|
.It Li p5-memory-accesses-in-both-pipes
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 09H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of data memory reads or writes that are paired in both pipes.
|
|
|
|
.It Li p5-misaligned-data-memory-or-io-references
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 0BH
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of memory or I/O reads or writes that are not aligned on
|
|
|
|
natural boundaries.
|
|
|
|
2- and 4-byte accesses are counted as misaligned if they cross a 4
|
|
|
|
byte boundary.
|
2008-10-02 04:46:00 +00:00
|
|
|
.It Li p5-misaligned-data-memory-reference-on-mmx-instructions
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 36H , Tn Pentium MMX
|
2008-10-02 04:46:00 +00:00
|
|
|
The number of misaligned data memory references when executing MMX
|
|
|
|
instructions.
|
|
|
|
This event is only allocated on counter 0.
|
2008-09-16 16:34:55 +00:00
|
|
|
.It Li p5-mispredicted-or-unpredicted-returns
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 37H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of returns predicted incorrectly or not at all, only
|
|
|
|
counting RET instructions.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-mmx-instruction-data-read-misses
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 31H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of MMX instruction data read misses.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.It Li p5-mmx-instruction-data-reads
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 31H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of MMX instruction data reads.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-mmx-instruction-data-write-misses
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 34H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of data write misses caused by MMX instructions.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.It Li p5-mmx-instruction-data-writes
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 34H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of data writes caused by MMX instructions.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-mmx-instructions-executed-u-pipe
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 2BH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of MMX instructions executed in the U pipe.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-mmx-instructions-executed-v-pipe
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 2BH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of MMX instructions executed in the V pipe.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.It Li p5-mmx-multiply-unit-interlock
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 38H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of clocks the pipeline is stalled because the destination
|
|
|
|
of a prior MMX multiply is not ready.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-movd-movq-store-stall-due-to-previous-mmx-operation
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 38H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of clocks a MOVD/MOVQ instruction stalled in the D2 stage
|
|
|
|
of the pipeline due to a previous MMX instruction.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.It Li p5-noncacheable-memory-reads
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 1EH
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of bus cycles for non-cacheable instruction or data reads,
|
|
|
|
including cycles caused by TLB misses.
|
|
|
|
.It Li p5-number-of-cycles-not-in-halt-state
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 30H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of cycles the processor is not idle due to the HLT
|
|
|
|
instruction.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-pipeline-agi-stalls
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 1FH
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of address generation interlock stalls.
|
|
|
|
An AGI that occurs in both the U and V pipelines in the same clock
|
|
|
|
signals the event twice.
|
|
|
|
.It Li p5-pipeline-flushes
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 15H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of pipeline flushes that occur.
|
|
|
|
Pipeline flushes are caused by branch mispredicts, exceptions,
|
|
|
|
interrupts, some segment register loads, and BTB misses.
|
|
|
|
Prefetch queue flushes due to serializing instructions are not
|
|
|
|
counted.
|
|
|
|
.It Li p5-pipeline-flushes-due-to-wrong-branch-predictions
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 35H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of pipeline flushes due to wrong branch predictions
|
|
|
|
resolved in either the E- or WB- stage of the pipeline.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-pipeline-flushes-due-to-wrong-branch-predictions-resolved-in-wb-stage
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 35H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of pipeline flushes due to wrong branch predictions
|
|
|
|
resolved in the stage of the pipeline.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.It Li p5-pipeline-stall-for-mmx-instruction-data-memory-reads
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 36H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of clocks during pipeline stalls caused by waiting MMX data
|
|
|
|
memory reads.
|
2008-10-02 04:46:00 +00:00
|
|
|
This event is only allocated on counter 1.
|
2008-09-16 16:34:55 +00:00
|
|
|
.It Li p5-predicted-returns
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 37H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of predicted returns, whether correct or incorrect.
|
|
|
|
This counter only counts RET instructions.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.It Li p5-returns
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 39H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of RET instructions executed.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-saturating-mmx-instructions-executed
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 2FH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of saturating MMX instructions executed.
|
|
|
|
This event is only allocated on counter 0.
|
|
|
|
.It Li p5-saturations-performed
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 2FH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of saturating MMX instructions executed when at least one
|
|
|
|
of its results were actually saturated.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.It Li p5-stall-on-mmx-instruction-write-to-e-o-m-state-line
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 3BH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of clocks during stalls on MMX instructions writing to
|
|
|
|
E- or M- state cache lines.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.It Li p5-stall-on-write-to-an-e-or-m-state-line
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 1BH
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of stalls on a write to an exclusive or modified data cache
|
|
|
|
line.
|
|
|
|
.It Li p5-taken-branch-or-btb-hit
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 14H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of events that may cause a hit in the BTB, namely either
|
|
|
|
taken branches or BTB hits.
|
|
|
|
.It Li p5-taken-branches
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 32H , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of taken branches.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.It Li p5-transitions-between-mmx-and-fp-instructions
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 2DH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of transitions between MMX and floating-point instructions
|
|
|
|
and vice-versa.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.It Li p5-waiting-for-data-memory-read-stall-duration
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 1AH
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of clocks the pipeline was stalled waiting for data
|
|
|
|
memory reads.
|
|
|
|
Data TLB misses processing is included in this count.
|
|
|
|
.It Li p5-write-buffer-full-stall-duration
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 19H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of clocks while the pipeline was stalled due to write
|
|
|
|
buffers being full.
|
|
|
|
.It Li p5-write-hit-to-m-or-e-state-lines
|
2008-10-02 04:46:00 +00:00
|
|
|
.Pq Event 05H
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of writes that hit exclusive or modified lines in the data
|
|
|
|
cache.
|
|
|
|
.It Li p5-writes-to-noncacheable-memory
|
2008-10-02 06:21:07 +00:00
|
|
|
.Pq Event 2EH , Tn Pentium MMX
|
2008-09-16 16:34:55 +00:00
|
|
|
The number of writes to non-cacheable memory, including write cycles
|
|
|
|
caused by TLB misses and I/O writes.
|
|
|
|
This event is only allocated on counter 1.
|
|
|
|
.El
|
2008-09-17 03:53:37 +00:00
|
|
|
.Ss Event Name Aliases
|
|
|
|
The following table shows the mapping between the PMC-independent
|
|
|
|
aliases supported by
|
|
|
|
.Lb libpmc
|
|
|
|
and the underlying hardware events used.
|
|
|
|
.Bl -column "branch-mispredicts" "Description"
|
|
|
|
.It Em Alias Ta Em Event
|
|
|
|
.It Li branches Ta Li p5-taken-branches
|
|
|
|
.It Li branch-mispredicts Ta Li (unsupported)
|
|
|
|
.It Li dc-misses Ta Li p5-data-read-miss-or-write-miss
|
|
|
|
.It Li ic-misses Ta Li p5-code-cache-miss
|
|
|
|
.It Li instructions Ta Li p5-instructions-executed
|
|
|
|
.It Li interrupts Ta Li p5-hardware-interrupts
|
|
|
|
.It Li unhalted-cycles Ta Li p5-number-of-cycles-not-in-halt-state
|
|
|
|
.El
|
2008-09-16 16:34:55 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr pmc 3 ,
|
2008-10-04 12:44:05 +00:00
|
|
|
.Xr pmc.atom 3 ,
|
|
|
|
.Xr pmc.core 3 ,
|
|
|
|
.Xr pmc.core2 3 ,
|
|
|
|
.Xr pmc.iaf 3 ,
|
2008-09-16 16:34:55 +00:00
|
|
|
.Xr pmc.k7 3 ,
|
|
|
|
.Xr pmc.k8 3 ,
|
|
|
|
.Xr pmc.p4 3 ,
|
|
|
|
.Xr pmc.p6 3 ,
|
|
|
|
.Xr pmc.tsc 3 ,
|
|
|
|
.Xr pmclog 3 ,
|
|
|
|
.Xr hwpmc 4
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm pmc
|
|
|
|
library first appeared in
|
|
|
|
.Fx 6.0 .
|
|
|
|
.Sh AUTHORS
|
|
|
|
The
|
|
|
|
.Lb libpmc
|
|
|
|
library was written by
|
|
|
|
.An "Joseph Koshy"
|
|
|
|
.Aq jkoshy@FreeBSD.org .
|