Deleted Added
full compact
pmc_mdep.h (196224) pmc_mdep.h (206089)
1/*-
2 * Copyright (c) 2003-2005,2008 Joseph Koshy
3 * Copyright (c) 2007 The FreeBSD Foundation
4 * All rights reserved.
5 *
6 * Portions of this software were developed by A. Joseph Koshy under
7 * sponsorship from the FreeBSD Foundation and Google, Inc.
8 *

--- 13 unchanged lines hidden (view full) ---

22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 *
1/*-
2 * Copyright (c) 2003-2005,2008 Joseph Koshy
3 * Copyright (c) 2007 The FreeBSD Foundation
4 * All rights reserved.
5 *
6 * Portions of this software were developed by A. Joseph Koshy under
7 * sponsorship from the FreeBSD Foundation and Google, Inc.
8 *

--- 13 unchanged lines hidden (view full) ---

22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 *
30 * $FreeBSD: head/sys/i386/include/pmc_mdep.h 196224 2009-08-14 21:05:08Z jhb $
30 * $FreeBSD: head/sys/i386/include/pmc_mdep.h 206089 2010-04-02 13:23:49Z fabient $
31 */
32
33#ifndef _MACHINE_PMC_MDEP_H
34#define _MACHINE_PMC_MDEP_H 1
35
36#ifdef _KERNEL
37struct pmc_mdep;
38#endif

--- 5 unchanged lines hidden (view full) ---

44 * K7 AMD Athlon XP/MP and other 32 bit processors.
45 * K8 AMD Athlon64 and Opteron PMCs in 32 bit mode.
46 * PIV Intel P4/HTT and P4/EMT64
47 * PPRO Intel Pentium Pro, Pentium-II, Pentium-III, Celeron and
48 * Pentium-M processors
49 * PENTIUM Intel Pentium MMX.
50 * IAP Intel Core/Core2/Atom programmable PMCs.
51 * IAF Intel fixed-function PMCs.
31 */
32
33#ifndef _MACHINE_PMC_MDEP_H
34#define _MACHINE_PMC_MDEP_H 1
35
36#ifdef _KERNEL
37struct pmc_mdep;
38#endif

--- 5 unchanged lines hidden (view full) ---

44 * K7 AMD Athlon XP/MP and other 32 bit processors.
45 * K8 AMD Athlon64 and Opteron PMCs in 32 bit mode.
46 * PIV Intel P4/HTT and P4/EMT64
47 * PPRO Intel Pentium Pro, Pentium-II, Pentium-III, Celeron and
48 * Pentium-M processors
49 * PENTIUM Intel Pentium MMX.
50 * IAP Intel Core/Core2/Atom programmable PMCs.
51 * IAF Intel fixed-function PMCs.
52 * UCP Intel Uncore programmable PMCs.
53 * UCF Intel Uncore fixed-function PMCs.
52 */
53
54#include <dev/hwpmc/hwpmc_amd.h> /* K7 and K8 */
55#include <dev/hwpmc/hwpmc_core.h>
56#include <dev/hwpmc/hwpmc_piv.h>
57#include <dev/hwpmc/hwpmc_ppro.h>
58#include <dev/hwpmc/hwpmc_pentium.h>
59#include <dev/hwpmc/hwpmc_tsc.h>
54 */
55
56#include <dev/hwpmc/hwpmc_amd.h> /* K7 and K8 */
57#include <dev/hwpmc/hwpmc_core.h>
58#include <dev/hwpmc/hwpmc_piv.h>
59#include <dev/hwpmc/hwpmc_ppro.h>
60#include <dev/hwpmc/hwpmc_pentium.h>
61#include <dev/hwpmc/hwpmc_tsc.h>
62#include <dev/hwpmc/hwpmc_uncore.h>
60
61/*
62 * Intel processors implementing V2 and later of the Intel performance
63 * measurement architecture have PMCs of the following classes: TSC,
63
64/*
65 * Intel processors implementing V2 and later of the Intel performance
66 * measurement architecture have PMCs of the following classes: TSC,
64 * IAF and IAP.
67 * IAF, IAP, UCF and UCP.
65 */
66#define PMC_MDEP_CLASS_INDEX_TSC 0
67#define PMC_MDEP_CLASS_INDEX_K7 1
68#define PMC_MDEP_CLASS_INDEX_K8 1
69#define PMC_MDEP_CLASS_INDEX_P4 1
70#define PMC_MDEP_CLASS_INDEX_P5 1
71#define PMC_MDEP_CLASS_INDEX_P6 1
72#define PMC_MDEP_CLASS_INDEX_IAP 1
73#define PMC_MDEP_CLASS_INDEX_IAF 2
68 */
69#define PMC_MDEP_CLASS_INDEX_TSC 0
70#define PMC_MDEP_CLASS_INDEX_K7 1
71#define PMC_MDEP_CLASS_INDEX_K8 1
72#define PMC_MDEP_CLASS_INDEX_P4 1
73#define PMC_MDEP_CLASS_INDEX_P5 1
74#define PMC_MDEP_CLASS_INDEX_P6 1
75#define PMC_MDEP_CLASS_INDEX_IAP 1
76#define PMC_MDEP_CLASS_INDEX_IAF 2
77#define PMC_MDEP_CLASS_INDEX_UCP 3
78#define PMC_MDEP_CLASS_INDEX_UCF 4
74
75/*
76 * Architecture specific extensions to <sys/pmc.h> structures.
77 */
78
79union pmc_md_op_pmcallocate {
80 struct pmc_md_amd_op_pmcallocate pm_amd;
81 struct pmc_md_iaf_op_pmcallocate pm_iaf;
82 struct pmc_md_iap_op_pmcallocate pm_iap;
79
80/*
81 * Architecture specific extensions to <sys/pmc.h> structures.
82 */
83
84union pmc_md_op_pmcallocate {
85 struct pmc_md_amd_op_pmcallocate pm_amd;
86 struct pmc_md_iaf_op_pmcallocate pm_iaf;
87 struct pmc_md_iap_op_pmcallocate pm_iap;
88 struct pmc_md_ucf_op_pmcallocate pm_ucf;
89 struct pmc_md_ucp_op_pmcallocate pm_ucp;
83 struct pmc_md_p4_op_pmcallocate pm_p4;
84 struct pmc_md_pentium_op_pmcallocate pm_pentium;
85 struct pmc_md_ppro_op_pmcallocate pm_ppro;
86 uint64_t __pad[4];
87};
88
89/* Logging */
90#define PMCLOG_READADDR PMCLOG_READ32
91#define PMCLOG_EMITADDR PMCLOG_EMIT32
92
93#ifdef _KERNEL
94
95/* MD extension for 'struct pmc' */
96union pmc_md_pmc {
97 struct pmc_md_amd_pmc pm_amd;
98 struct pmc_md_iaf_pmc pm_iaf;
99 struct pmc_md_iap_pmc pm_iap;
90 struct pmc_md_p4_op_pmcallocate pm_p4;
91 struct pmc_md_pentium_op_pmcallocate pm_pentium;
92 struct pmc_md_ppro_op_pmcallocate pm_ppro;
93 uint64_t __pad[4];
94};
95
96/* Logging */
97#define PMCLOG_READADDR PMCLOG_READ32
98#define PMCLOG_EMITADDR PMCLOG_EMIT32
99
100#ifdef _KERNEL
101
102/* MD extension for 'struct pmc' */
103union pmc_md_pmc {
104 struct pmc_md_amd_pmc pm_amd;
105 struct pmc_md_iaf_pmc pm_iaf;
106 struct pmc_md_iap_pmc pm_iap;
107 struct pmc_md_ucf_pmc pm_ucf;
108 struct pmc_md_ucp_pmc pm_ucp;
100 struct pmc_md_p4_pmc pm_p4;
101 struct pmc_md_pentium_pmc pm_pentium;
102 struct pmc_md_ppro_pmc pm_ppro;
103};
104
105struct pmc;
106struct pmc_mdep;
107

--- 53 unchanged lines hidden ---
109 struct pmc_md_p4_pmc pm_p4;
110 struct pmc_md_pentium_pmc pm_pentium;
111 struct pmc_md_ppro_pmc pm_ppro;
112};
113
114struct pmc;
115struct pmc_mdep;
116

--- 53 unchanged lines hidden ---