Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

576 lines
13 KiB

  1. /*===================================================================
  2. Microsoft Denali
  3. Microsoft Confidential.
  4. Copyright 1996 Microsoft Corporation. All Rights Reserved.
  5. Component: Main
  6. File: axpfdata.cpp
  7. Owner: LeiJin
  8. Abstract:
  9. Define the data structures used by the Performance Monitor data for the Denali Objects.
  10. Also include shared memory functions used by both perfmon dll and denali dll.
  11. ===================================================================*/
  12. //-------------------------------------------------------------------------------------
  13. // Include Files
  14. //
  15. //-------------------------------------------------------------------------------------
  16. #include "denpre.h"
  17. #pragma hdrstop
  18. #include "windows.h"
  19. #include "winperf.h"
  20. #include "axctrnm.h"
  21. #include "axpfdata.h"
  22. #include <perfutil.h>
  23. //-------------------------------------------------------------------------------------
  24. // Constant structure initializations
  25. // defined in ActiveXPerfData.h
  26. //-------------------------------------------------------------------------------------
  27. AXPD g_AxDataDefinition = {
  28. {
  29. QWORD_MULTIPLE(sizeof(AXPD) + SIZE_OF_AX_PERF_DATA),
  30. sizeof(AXPD),
  31. sizeof(PERF_OBJECT_TYPE),
  32. AXSOBJ,
  33. 0,
  34. AXSOBJ,
  35. 0,
  36. PERF_DETAIL_NOVICE,
  37. (sizeof(AXPD) - sizeof(PERF_OBJECT_TYPE))/
  38. sizeof(PERF_COUNTER_DEFINITION),
  39. 0,
  40. -1,
  41. 0,
  42. 1, // NOTE: PerfTime ?
  43. 1, // NOTE: PerfFreq ?
  44. },
  45. { // Counters[]
  46. // DEBUGDOCREQ
  47. {
  48. sizeof(PERF_COUNTER_DEFINITION),
  49. DEBUGDOCREQ,
  50. 0,
  51. DEBUGDOCREQ,
  52. 0,
  53. 0,
  54. PERF_DETAIL_NOVICE,
  55. PERF_COUNTER_RAWCOUNT,
  56. sizeof(DWORD),
  57. AX_DEBUGDOCREQ_OFFSET
  58. },
  59. // REQERRRUNTIME
  60. {
  61. sizeof(PERF_COUNTER_DEFINITION),
  62. REQERRRUNTIME,
  63. 0,
  64. REQERRRUNTIME,
  65. 0,
  66. 0,
  67. PERF_DETAIL_NOVICE,
  68. PERF_COUNTER_RAWCOUNT,
  69. sizeof(DWORD),
  70. AX_REQERRRUNTIME_OFFSET
  71. },
  72. // REQERRPREPROC
  73. {
  74. sizeof(PERF_COUNTER_DEFINITION),
  75. REQERRPREPROC,
  76. 0,
  77. REQERRPREPROC,
  78. 0,
  79. 0,
  80. PERF_DETAIL_NOVICE,
  81. PERF_COUNTER_RAWCOUNT,
  82. sizeof(DWORD),
  83. AX_REQERRPREPROC_OFFSET
  84. },
  85. // REQERRCOMPILE
  86. {
  87. sizeof(PERF_COUNTER_DEFINITION),
  88. REQERRCOMPILE,
  89. 0,
  90. REQERRCOMPILE,
  91. 0,
  92. 0,
  93. PERF_DETAIL_NOVICE,
  94. PERF_COUNTER_RAWCOUNT,
  95. sizeof(DWORD),
  96. AX_REQERRCOMPILE_OFFSET
  97. },
  98. // REQERRORPERSEC
  99. {
  100. sizeof(PERF_COUNTER_DEFINITION),
  101. REQERRORPERSEC,
  102. 0,
  103. REQERRORPERSEC,
  104. 0,
  105. 0,
  106. PERF_DETAIL_NOVICE,
  107. PERF_COUNTER_COUNTER,
  108. sizeof(DWORD),
  109. AX_REQERRORPERSEC_OFFSET
  110. },
  111. // REQTOTALBYTEIN
  112. {
  113. sizeof(PERF_COUNTER_DEFINITION),
  114. REQTOTALBYTEIN,
  115. 0,
  116. REQTOTALBYTEIN,
  117. 0,
  118. -4,
  119. PERF_DETAIL_NOVICE,
  120. PERF_COUNTER_RAWCOUNT,
  121. sizeof(DWORD),
  122. AX_REQTOTALBYTEIN_OFFSET
  123. },
  124. // REQTOTALBYTEOUT
  125. {
  126. sizeof(PERF_COUNTER_DEFINITION),
  127. REQTOTALBYTEOUT,
  128. 0,
  129. REQTOTALBYTEOUT,
  130. 0,
  131. -4,
  132. PERF_DETAIL_NOVICE,
  133. PERF_COUNTER_RAWCOUNT,
  134. sizeof(DWORD),
  135. AX_REQTOTALBYTEOUT_OFFSET
  136. },
  137. // REQEXECTIME
  138. {
  139. sizeof(PERF_COUNTER_DEFINITION),
  140. REQEXECTIME,
  141. 0,
  142. REQEXECTIME,
  143. 0,
  144. -3,
  145. PERF_DETAIL_NOVICE,
  146. PERF_COUNTER_RAWCOUNT,
  147. sizeof(DWORD),
  148. AX_REQEXECTIME_OFFSET
  149. },
  150. // REQWAITTIME
  151. {
  152. sizeof(PERF_COUNTER_DEFINITION),
  153. REQWAITTIME,
  154. 0,
  155. REQWAITTIME,
  156. 0,
  157. -3,
  158. PERF_DETAIL_NOVICE,
  159. PERF_COUNTER_RAWCOUNT,
  160. sizeof(DWORD),
  161. AX_REQWAITTIME_OFFSET
  162. },
  163. // REQCOMFAILED
  164. {
  165. sizeof(PERF_COUNTER_DEFINITION),
  166. REQCOMFAILED,
  167. 0,
  168. REQCOMFAILED,
  169. 0,
  170. 0,
  171. PERF_DETAIL_NOVICE,
  172. PERF_COUNTER_RAWCOUNT,
  173. sizeof(DWORD),
  174. AX_REQCOMFAILED_OFFSET
  175. },
  176. // REQBROWSEREXEC
  177. {
  178. sizeof(PERF_COUNTER_DEFINITION),
  179. REQBROWSEREXEC,
  180. 0,
  181. REQBROWSEREXEC,
  182. 0,
  183. 0,
  184. PERF_DETAIL_NOVICE,
  185. PERF_COUNTER_RAWCOUNT,
  186. sizeof(DWORD),
  187. AX_REQBROWSEREXEC_OFFSET
  188. },
  189. // REQFAILED
  190. {
  191. sizeof(PERF_COUNTER_DEFINITION),
  192. REQFAILED,
  193. 0,
  194. REQFAILED,
  195. 0,
  196. 0,
  197. PERF_DETAIL_NOVICE,
  198. PERF_COUNTER_RAWCOUNT,
  199. sizeof(DWORD),
  200. AX_REQFAILED_OFFSET
  201. },
  202. // REQNOTAUTH
  203. {
  204. sizeof(PERF_COUNTER_DEFINITION),
  205. REQNOTAUTH,
  206. 0,
  207. REQNOTAUTH,
  208. 0,
  209. 0,
  210. PERF_DETAIL_NOVICE,
  211. PERF_COUNTER_RAWCOUNT,
  212. sizeof(DWORD),
  213. AX_REQNOTAUTH_OFFSET
  214. },
  215. // REQNOTFOUND
  216. {
  217. sizeof(PERF_COUNTER_DEFINITION),
  218. REQNOTFOUND,
  219. 0,
  220. REQNOTFOUND,
  221. 0,
  222. 0,
  223. PERF_DETAIL_NOVICE,
  224. PERF_COUNTER_RAWCOUNT,
  225. sizeof(DWORD),
  226. AX_REQNOTFOUND_OFFSET
  227. },
  228. // REQCURRENT
  229. {
  230. sizeof(PERF_COUNTER_DEFINITION),
  231. REQCURRENT,
  232. 0,
  233. REQCURRENT,
  234. 0,
  235. 0,
  236. PERF_DETAIL_NOVICE,
  237. PERF_COUNTER_RAWCOUNT,
  238. sizeof(DWORD),
  239. AX_REQCURRENT_OFFSET
  240. },
  241. // REQREJECTED
  242. {
  243. sizeof(PERF_COUNTER_DEFINITION),
  244. REQREJECTED,
  245. 0,
  246. REQREJECTED,
  247. 0,
  248. 0,
  249. PERF_DETAIL_NOVICE,
  250. PERF_COUNTER_RAWCOUNT,
  251. sizeof(DWORD),
  252. AX_REQREJECTED_OFFSET
  253. },
  254. // REQSUCCEEDED
  255. {
  256. sizeof(PERF_COUNTER_DEFINITION),
  257. REQSUCCEEDED,
  258. 0,
  259. REQSUCCEEDED,
  260. 0,
  261. -1,
  262. PERF_DETAIL_NOVICE,
  263. PERF_COUNTER_RAWCOUNT,
  264. sizeof(DWORD),
  265. AX_REQSUCCEEDED_OFFSET
  266. },
  267. // REQTIMEOUT
  268. {
  269. sizeof(PERF_COUNTER_DEFINITION),
  270. REQTIMEOUT,
  271. 0,
  272. REQTIMEOUT,
  273. 0,
  274. 0,
  275. PERF_DETAIL_NOVICE,
  276. PERF_COUNTER_RAWCOUNT,
  277. sizeof(DWORD),
  278. AX_REQTIMEOUT_OFFSET
  279. },
  280. // REQTOTAL
  281. {
  282. sizeof(PERF_COUNTER_DEFINITION),
  283. REQTOTAL,
  284. 0,
  285. REQTOTAL,
  286. 0,
  287. -1,
  288. PERF_DETAIL_NOVICE,
  289. PERF_COUNTER_RAWCOUNT,
  290. sizeof(DWORD),
  291. AX_REQTOTAL_OFFSET
  292. },
  293. // REQPERSEC
  294. {
  295. sizeof(PERF_COUNTER_DEFINITION),
  296. REQPERSEC,
  297. 0,
  298. REQPERSEC,
  299. 0,
  300. 0,
  301. PERF_DETAIL_NOVICE,
  302. PERF_COUNTER_COUNTER,
  303. sizeof(DWORD),
  304. AX_REQPERSEC_OFFSET
  305. },
  306. // SCRIPTFREEENG
  307. {
  308. sizeof(PERF_COUNTER_DEFINITION),
  309. SCRIPTFREEENG,
  310. 0,
  311. SCRIPTFREEENG,
  312. 0,
  313. 0,
  314. PERF_DETAIL_NOVICE,
  315. PERF_COUNTER_RAWCOUNT,
  316. sizeof(DWORD),
  317. AX_SCRIPTFREEENG_OFFSET
  318. },
  319. // SESSIONLIFETIME
  320. {
  321. sizeof(PERF_COUNTER_DEFINITION),
  322. SESSIONLIFETIME,
  323. 0,
  324. SESSIONLIFETIME,
  325. 0,
  326. 3,
  327. PERF_DETAIL_NOVICE,
  328. PERF_COUNTER_RAWCOUNT,
  329. sizeof(DWORD),
  330. AX_SESSIONLIFETIME_OFFSET
  331. },
  332. // SESSIONCURRENT
  333. {
  334. sizeof(PERF_COUNTER_DEFINITION),
  335. SESSIONCURRENT,
  336. 0,
  337. SESSIONCURRENT,
  338. 0,
  339. -1,
  340. PERF_DETAIL_NOVICE,
  341. PERF_COUNTER_RAWCOUNT,
  342. sizeof(DWORD),
  343. AX_SESSIONCURRENT_OFFSET
  344. },
  345. // SESSIONTIMEOUT
  346. {
  347. sizeof(PERF_COUNTER_DEFINITION),
  348. SESSIONTIMEOUT,
  349. 0,
  350. SESSIONTIMEOUT,
  351. 0,
  352. -1,
  353. PERF_DETAIL_NOVICE,
  354. PERF_COUNTER_RAWCOUNT,
  355. sizeof(DWORD),
  356. AX_SESSIONTIMEOUT_OFFSET
  357. },
  358. // SESSIONSTOTAL
  359. {
  360. sizeof(PERF_COUNTER_DEFINITION),
  361. SESSIONSTOTAL,
  362. 0,
  363. SESSIONSTOTAL,
  364. 0,
  365. -1,
  366. PERF_DETAIL_NOVICE,
  367. PERF_COUNTER_RAWCOUNT,
  368. sizeof(DWORD),
  369. AX_SESSIONSTOTAL_OFFSET
  370. },
  371. // TEMPLCACHE
  372. {
  373. sizeof(PERF_COUNTER_DEFINITION),
  374. TEMPLCACHE,
  375. 0,
  376. TEMPLCACHE,
  377. 0,
  378. 0,
  379. PERF_DETAIL_NOVICE,
  380. PERF_COUNTER_RAWCOUNT,
  381. sizeof(DWORD),
  382. AX_TEMPLCACHE_OFFSET
  383. },
  384. // TEMPLCACHEHITS
  385. {
  386. sizeof(PERF_COUNTER_DEFINITION),
  387. TEMPLCACHEHITS,
  388. 0,
  389. TEMPLCACHEHITS,
  390. 0,
  391. 0,
  392. PERF_DETAIL_NOVICE,
  393. PERF_RAW_FRACTION,
  394. sizeof(DWORD),
  395. AX_TEMPLCACHEHITS_OFFSET
  396. },
  397. // TEMPLCACHETRYS
  398. {
  399. sizeof(PERF_COUNTER_DEFINITION),
  400. TEMPLCACHETRYS,
  401. 0,
  402. TEMPLCACHETRYS,
  403. 0,
  404. 0,
  405. PERF_DETAIL_NOVICE,
  406. PERF_RAW_BASE,
  407. sizeof(DWORD),
  408. AX_TEMPLCACHETRYS_OFFSET
  409. },
  410. // TEMPLFLUSHES
  411. {
  412. sizeof(PERF_COUNTER_DEFINITION),
  413. TEMPLFLUSHES,
  414. 0,
  415. TEMPLFLUSHES,
  416. 0,
  417. 0,
  418. PERF_DETAIL_NOVICE,
  419. PERF_COUNTER_RAWCOUNT,
  420. sizeof(DWORD),
  421. AX_TEMPLFLUSHES_OFFSET
  422. },
  423. // TRANSABORTED
  424. {
  425. sizeof(PERF_COUNTER_DEFINITION),
  426. TRANSABORTED,
  427. 0,
  428. TRANSABORTED,
  429. 0,
  430. 0,
  431. PERF_DETAIL_NOVICE,
  432. PERF_COUNTER_RAWCOUNT,
  433. sizeof(DWORD),
  434. AX_TRANSABORTED_OFFSET
  435. },
  436. // TRANSCOMMIT
  437. {
  438. sizeof(PERF_COUNTER_DEFINITION),
  439. TRANSCOMMIT,
  440. 0,
  441. TRANSCOMMIT,
  442. 0,
  443. 0,
  444. PERF_DETAIL_NOVICE,
  445. PERF_COUNTER_RAWCOUNT,
  446. sizeof(DWORD),
  447. AX_TRANSCOMMIT_OFFSET
  448. },
  449. // TRANSPENDING
  450. {
  451. sizeof(PERF_COUNTER_DEFINITION),
  452. TRANSPENDING,
  453. 0,
  454. TRANSPENDING,
  455. 0,
  456. 0,
  457. PERF_DETAIL_NOVICE,
  458. PERF_COUNTER_RAWCOUNT,
  459. sizeof(DWORD),
  460. AX_TRANSPENDING_OFFSET
  461. },
  462. // TRANSTOTAL
  463. {
  464. sizeof(PERF_COUNTER_DEFINITION),
  465. TRANSTOTAL,
  466. 0,
  467. TRANSTOTAL,
  468. 0,
  469. 0,
  470. PERF_DETAIL_NOVICE,
  471. PERF_COUNTER_RAWCOUNT,
  472. sizeof(DWORD),
  473. AX_TRANSTOTAL_OFFSET
  474. },
  475. // TRANSPERSEC
  476. {
  477. sizeof(PERF_COUNTER_DEFINITION),
  478. TRANSPERSEC,
  479. 0,
  480. TRANSPERSEC,
  481. 0,
  482. 0,
  483. PERF_DETAIL_NOVICE,
  484. PERF_COUNTER_COUNTER,
  485. sizeof(DWORD),
  486. AX_TRANSPERSEC_OFFSET
  487. },
  488. // MEMORYTEMPLCACHE
  489. {
  490. sizeof(PERF_COUNTER_DEFINITION),
  491. MEMORYTEMPLCACHE,
  492. 0,
  493. MEMORYTEMPLCACHE,
  494. 0,
  495. 0,
  496. PERF_DETAIL_NOVICE,
  497. PERF_COUNTER_RAWCOUNT,
  498. sizeof(DWORD),
  499. AX_MEMORYTEMPLCACHE_OFFSET
  500. },
  501. // MEMORYTEMPLCACHEHITS
  502. {
  503. sizeof(PERF_COUNTER_DEFINITION),
  504. MEMORYTEMPLCACHEHITS,
  505. 0,
  506. MEMORYTEMPLCACHEHITS,
  507. 0,
  508. 0,
  509. PERF_DETAIL_NOVICE,
  510. PERF_RAW_FRACTION,
  511. sizeof(DWORD),
  512. AX_MEMORYTEMPLCACHEHITS_OFFSET
  513. },
  514. // MEMORYTEMPLCACHETRYS
  515. {
  516. sizeof(PERF_COUNTER_DEFINITION),
  517. MEMORYTEMPLCACHETRYS,
  518. 0,
  519. MEMORYTEMPLCACHETRYS,
  520. 0,
  521. 0,
  522. PERF_DETAIL_NOVICE,
  523. PERF_RAW_BASE,
  524. sizeof(DWORD),
  525. AX_MEMORYTEMPLCACHETRYS_OFFSET
  526. }
  527. } // Counters[]
  528. };