]>
Commit | Line | Data |
---|---|---|
de355530 A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
e5568f75 A |
6 | * The contents of this file constitute Original Code as defined in and |
7 | * are subject to the Apple Public Source License Version 1.1 (the | |
8 | * "License"). You may not use this file except in compliance with the | |
9 | * License. Please obtain a copy of the License at | |
10 | * http://www.apple.com/publicsource and read it before using this file. | |
de355530 | 11 | * |
e5568f75 A |
12 | * This Original Code and all software distributed under the License are |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
de355530 A |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
e5568f75 A |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the |
17 | * License for the specific language governing rights and limitations | |
18 | * under the License. | |
de355530 A |
19 | * |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | /* | |
23 | * | |
24 | * Hardware specific performance counters | |
25 | */ | |
26 | #ifndef _HW_COUNTERS_H_ | |
27 | #define _HW_COUNTERS_H_ | |
28 | ||
29 | #ifndef __ppc__ | |
30 | #error This file is only useful on PowerPC. | |
31 | #endif | |
32 | ||
55e303ae | 33 | #pragma pack(4) /* Make sure the structure stays as we defined it */ |
de355530 A |
34 | |
35 | typedef struct hw_counters { | |
36 | ||
37 | unsigned int hw_InVains; /* In vain */ | |
38 | unsigned int hw_Resets; /* Reset */ | |
39 | unsigned int hw_MachineChecks; /* Machine check */ | |
40 | unsigned int hw_DSIs; /* DSIs */ | |
41 | unsigned int hw_ISIs; /* ISIs */ | |
42 | unsigned int hw_Externals; /* Externals */ | |
43 | unsigned int hw_Alignments; /* Alignment */ | |
44 | unsigned int hw_Programs; /* Program */ | |
45 | unsigned int hw_FloatPointUnavailable; /* Floating point */ | |
46 | unsigned int hw_Decrementers; /* Decrementer */ | |
47 | unsigned int hw_IOErrors; /* I/O error */ | |
48 | unsigned int hw_rsvd0; /* Reserved */ | |
49 | unsigned int hw_SystemCalls; /* System call */ | |
50 | unsigned int hw_Traces; /* Trace */ | |
51 | unsigned int hw_FloatingPointAssists; /* Floating point assist */ | |
52 | unsigned int hw_PerformanceMonitors; /* Performance monitor */ | |
53 | unsigned int hw_Altivecs; /* VMX */ | |
54 | unsigned int hw_rsvd1; /* Reserved */ | |
55 | unsigned int hw_rsvd2; /* Reserved */ | |
56 | unsigned int hw_rsvd3; /* Reserved */ | |
57 | unsigned int hw_InstBreakpoints; /* Instruction breakpoint */ | |
58 | unsigned int hw_SystemManagements; /* System management */ | |
55e303ae A |
59 | unsigned int hw_AltivecAssists; /* Altivec Assist */ |
60 | unsigned int hw_Thermal; /* Thermals */ | |
61 | unsigned int hw_rsvd5; /* Reserved */ | |
de355530 A |
62 | unsigned int hw_rsvd6; /* Reserved */ |
63 | unsigned int hw_rsvd7; /* Reserved */ | |
64 | unsigned int hw_rsvd8; /* Reserved */ | |
65 | unsigned int hw_rsvd9; /* Reserved */ | |
66 | unsigned int hw_rsvd10; /* Reserved */ | |
67 | unsigned int hw_rsvd11; /* Reserved */ | |
68 | unsigned int hw_rsvd12; /* Reserved */ | |
69 | unsigned int hw_rsvd13; /* Reserved */ | |
de355530 A |
70 | unsigned int hw_Trace601; /* Trace */ |
71 | unsigned int hw_SIGPs; /* SIGP */ | |
72 | unsigned int hw_Preemptions; /* Preemption */ | |
73 | unsigned int hw_ContextSwitchs; /* Context switch */ | |
55e303ae A |
74 | unsigned int hw_Shutdowns; /* Shutdowns */ |
75 | unsigned int hw_Chokes; /* System ABENDs */ | |
76 | unsigned int hw_DataSegments; /* Data Segment Interruptions */ | |
77 | unsigned int hw_InstructionSegments; /* Instruction Segment Interruptions */ | |
78 | unsigned int hw_SoftPatches; /* Soft Patch interruptions */ | |
79 | unsigned int hw_Maintenances; /* Maintenance interruptions */ | |
80 | unsigned int hw_Instrumentations; /* Instrumentation interruptions */ | |
81 | unsigned int hw_rsvd14; /* Reswerved */ | |
a3d08fcd | 82 | unsigned int hw_hdec; /* Hypervisor decrementer */ |
de355530 | 83 | |
a3d08fcd | 84 | unsigned int hw_spare[18]; /* Pad to 256 bytes */ |
de355530 A |
85 | |
86 | } hw_counters; | |
55e303ae | 87 | #pragma pack() |
de355530 A |
88 | |
89 | extern hw_counters hw_counts(NCPUS); | |
90 | ||
91 | #endif /* _HW_COUNTERS_H_ */ |