|
|
1.1 root 1: /*++ BUILD Version: 0001 // Increment this if a change has global effects
2:
3: Copyright (c) 1992 Microsoft Corporation
4:
5: Module Name:
6:
7: datavga.h
8:
9: Abstract:
10:
11: Header file for the VGA Extensible Object data definitions
12:
13: This file contains definitions to construct the dynamic data
14: which is returned by the Configuration Registry. Data from
15: various system API calls is placed into the structures shown
16: here.
17:
18: Author:
19:
20: Russ Blake 02/24/93
21:
22: Revision History:
23:
24:
25: --*/
26:
27: #ifndef _DATAVGA_H_
28: #define _DATAVGA_H_
29:
30: /****************************************************************************\
31: 18 Jan 92
32: russbl
33:
34: Adding a Counter to the Extensible Objects Code
35:
36:
37:
38: 1. Modify the object definition in extdata.h:
39:
40: a. Add a define for the offset of the counter in the
41: data block for the given object type.
42:
43: b. Add a PERF_COUNTER_DEFINITION to the <object>_DATA_DEFINITION.
44:
45: 2. Add the Titles to the Registry in perfctrs.ini and perfhelp.ini:
46:
47: a. Add Text for the Counter Name and the Text for the Help.
48:
49: b. Add them to the bottom so we don't have to change all the
50: numbers.
51:
52: c. Change the Last Counter and Last Help entries under
53: PerfLib in software.ini.
54:
55: d. To do this at setup time, see section in pmintrnl.txt for
56: protocol.
57:
58: 3. Now add the counter to the object definition in extdata.c.
59: This is the initializing, constant data which will actually go
60: into the structure you added to the <object>_DATA_DEFINITION in
61: step 1.b. The type of the structure you are initializing is a
62: PERF_COUNTER_DEFINITION. These are defined in winperf.h.
63:
64: 4. Add code in extobjct.c to collect the data.
65:
66: Note: adding an object is a little more work, but in all the same
67: places. See the existing code for examples. In addition, you must
68: increase the *NumObjectTypes parameter to Get<object>PerfomanceData
69: on return from that routine.
70:
71: \****************************************************************************/
72:
73: //
74: // The routines that load these structures assume that all fields
75: // are packed and aligned on DWORD boundries. Alpha support may
76: // change this assumption so the pack pragma is used here to insure
77: // the DWORD packing assumption remains valid.
78: //
79: #pragma pack (4)
80:
81: //
82: // Extensible Object definitions
83: //
84:
85: // Update the following sort of define when adding an object type.
86:
87: #define VGA_NUM_PERF_OBJECT_TYPES 1
88:
89: //----------------------------------------------------------------------------
90:
91: //
92: // Nbf Resource object type counter definitions.
93: //
94: // These are used in the counter definitions to describe the relative
95: // position of each counter in the returned data.
96: //
97:
98: #define NUM_BITBLTS_OFFSET sizeof(DWORD)
99: #define NUM_TEXTOUTS_OFFSET NUM_BITBLTS_OFFSET + sizeof(DWORD)
100: #define SIZE_OF_VGA_PERFORMANCE_DATA \
101: NUM_TEXTOUTS_OFFSET + sizeof(DWORD)
102:
103:
104: //
105: // This is the counter structure presently returned by Nbf for
106: // each Resource. Each Resource is an Instance, named by its number.
107: //
108:
109: typedef struct _VGA_DATA_DEFINITION {
110: PERF_OBJECT_TYPE VgaObjectType;
111: PERF_COUNTER_DEFINITION NumBitBlts;
112: PERF_COUNTER_DEFINITION NumTextOuts;
113: } VGA_DATA_DEFINITION;
114:
115: #pragma pack ()
116:
117: #endif //_DATANBF_H_
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.