diff options
author | jkoshy <jkoshy@FreeBSD.org> | 2008-11-27 09:00:47 +0000 |
---|---|---|
committer | jkoshy <jkoshy@FreeBSD.org> | 2008-11-27 09:00:47 +0000 |
commit | aa86a7c59edb19ee67bcf28d9465dc88c0b1fd6a (patch) | |
tree | b416bbd4293b5dc3b86cfd87f09039063e60517b /sys/sys/pmc.h | |
parent | 272e95193bef3d1cacf8bf5d82b6f7bbe6d500a7 (diff) | |
download | FreeBSD-src-aa86a7c59edb19ee67bcf28d9465dc88c0b1fd6a.zip FreeBSD-src-aa86a7c59edb19ee67bcf28d9465dc88c0b1fd6a.tar.gz |
- Add support for PMCs in Intel CPUs of Family 6, model 0xE (Core Solo
and Core Duo), models 0xF (Core2), model 0x17 (Core2Extreme) and
model 0x1C (Atom).
In these CPUs, the actual numbers, kinds and widths of PMCs present
need to queried at run time. Support for specific "architectural"
events also needs to be queried at run time.
Model 0xE CPUs support programmable PMCs, subsequent CPUs
additionally support "fixed-function" counters.
- Use event names that are close to vendor documentation, taking in
account that:
- events with identical semantics on two or more CPUs in this family
can have differing names in vendor documentation,
- identical vendor event names may map to differing events across
CPUs,
- each type of CPU supports a different subset of measurable
events.
Fixed-function and programmable counters both use the same vendor
names for events. The use of a class name prefix ("iaf-" or
"iap-" respectively) permits these to be distinguished.
- In libpmc, refactor pmc_name_of_event() into a public interface
and an internal helper function, for use by log handling code.
- Minor code tweaks: staticize a global, freshen a few comments.
Tested by: gnn
Diffstat (limited to 'sys/sys/pmc.h')
-rw-r--r-- | sys/sys/pmc.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h index 84c0a13..4afb0ab 100644 --- a/sys/sys/pmc.h +++ b/sys/sys/pmc.h @@ -55,7 +55,7 @@ * The patch version is incremented for every bug fix. */ #define PMC_VERSION_MAJOR 0x03 -#define PMC_VERSION_MINOR 0x00 +#define PMC_VERSION_MINOR 0x01 #define PMC_VERSION_PATCH 0x0000 #define PMC_VERSION (PMC_VERSION_MAJOR << 24 | \ @@ -82,6 +82,7 @@ __PMC_CPU(INTEL_PIV, 0x86, "Intel Pentium IV") \ __PMC_CPU(INTEL_CORE, 0x87, "Intel Core Solo/Duo") \ __PMC_CPU(INTEL_CORE2, 0x88, "Intel Core2") \ + __PMC_CPU(INTEL_CORE2EXTREME, 0x89, "Intel Core2 Extreme") \ __PMC_CPU(INTEL_ATOM, 0x8A, "Intel Atom") enum pmc_cputype { @@ -920,8 +921,8 @@ struct pmc_mdep { */ /* per-cpu initialization and finalization */ - int (*pmd_pcpu_init)(int _cpu); /* initialization */ - int (*pmd_pcpu_fini)(int _cpu); /* finalization */ + int (*pmd_pcpu_init)(struct pmc_mdep *_md, int _cpu); + int (*pmd_pcpu_fini)(struct pmc_mdep *_md, int _cpu); /* thread context switch in/out */ int (*pmd_switch_in)(struct pmc_cpu *_p, struct pmc_process *_pp); @@ -942,7 +943,6 @@ struct pmc_mdep { */ extern struct pmc_cpu **pmc_pcpu; -extern struct pmc_mdep *md; /* driver statistics */ extern struct pmc_op_getdriverstats pmc_stats; |