Leaked source code of windows server 2003
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.

113 lines
2.8 KiB

  1. //
  2. // perfct.h
  3. //
  4. // Profiling counters.
  5. //
  6. #ifndef PERFCOUNT_H
  7. #define PERFCOUNT_H
  8. //#define PERF_DUMP
  9. // offsets into s_rgPerfCounters
  10. #define PERF_ANCHORREF_COUNTER 0
  11. #define PERF_RANGE_COUNTER 1
  12. #define PERF_LOADERACP_COUNTER 2
  13. #define PERF_ACPWRAP_COUNTER 3
  14. #define PERF_ANCHORLIST_COUNTER 4
  15. #define PERF_ANCHOR_COUNTER 5
  16. #define PERF_ENUMAPPPROP_COUNTER 6
  17. #define PERF_APPPROP_COUNTER 7
  18. #define PERF_ENUMUBERPROP_COUNTER 8
  19. #define PERF_UBERPROP_COUNTER 9
  20. #define PERF_ENUMPROP_COUNTER 10
  21. #define PERF_PROP_COUNTER 11
  22. #define PERF_CATMGR_COUNTER 12
  23. #define PERF_ENUMCAT_COUNTER 13
  24. #define PERF_COMPARTMGR_COUNTER 14
  25. #define PERF_ENUMCOMPART_COUNTER 15
  26. #define PERF_COMPART_COUNTER 16
  27. #define PERF_GLOBCOMPART_COUNTER 17
  28. #define PERF_COMPARTSUB_COUNTER 18
  29. #define PERF_EDITREC_COUNTER 19
  30. #define PERF_ENUMPROPRANGE_COUNTER 20
  31. #define PERF_CONTEXT_COUNTER 21
  32. #define PERF_SPANSET_COUNTER 22
  33. #define PERF_PROPERTYLIST_COUNTER 23
  34. #define PERF_BREAK0 24
  35. #define PERF_ACPWRAP_GETTEXT 25
  36. #define PERF_ACPWRAP_GETTEXT_LOOP 26
  37. #define PERF_ANCHOR_REGION_GETTEXT 27
  38. #define PERF_NORM_GETTEXTCOMPLETE 28
  39. #define PERF_PTO_GETTEXT 29
  40. #define PERF_ATOF_GETTEXT_COUNTER 30
  41. #define PERF_SHIFTCOND_GETTEXT 31
  42. #define PERF_BREAK1 32
  43. #define PERF_ATOF_COUNTER 33
  44. #define PERF_ATON_COUNTER 34
  45. #define PERF_NORMALIZE_COUNTER 35
  46. #define PERF_SHIFTREG_COUNTER 36
  47. #define PERF_RENORMALIZE_COUNTER 37
  48. #define PERF_BREAK2 38
  49. #define PERF_CREATERANGE_ACP 39
  50. #define PERF_LAZY_NORM 40
  51. #define PERF_BREAK3 41
  52. #define PERF_SHIFTSTART_COUNT 42
  53. #define PERF_SHIFTEND_COUNT 43
  54. #define PERF_RGETTEXT_COUNT 44
  55. #define PERF_RSETTEXT_COUNT 45
  56. #define PERF_ANCHOR_SHIFT 46
  57. #define PERF_KEYDOWN_COUNT 47
  58. #ifdef PERF_DUMP
  59. BOOL Perf_Init();
  60. void Perf_DumpStats();
  61. #define PERF_STROKE_DOWN 0
  62. #define PERF_STROKE_UP 1
  63. #define PERF_STROKE_TESTDOWN 2
  64. #define PERF_STROKE_TESTUP 3
  65. #define PERF_STROKE_GETMSG 4
  66. #define PERF_STROKE_ARRAYSIZE 5
  67. void Perf_StartStroke(UINT iIndex);
  68. void Perf_EndStroke(UINT iIndex);
  69. #else
  70. #define Perf_Init()
  71. #define Perf_DumpStats()
  72. #define Perf_StartStroke(iIndex)
  73. #define Perf_EndStroke(iIndex)
  74. #endif // PERF_DUMP
  75. #ifdef DEBUG
  76. //
  77. // debug
  78. //
  79. extern DBG_MEM_COUNTER g_rgPerfObjCounters[];
  80. __inline void Perf_IncCounter(int iCounter) { g_rgPerfObjCounters[iCounter].uCount++; }
  81. #else
  82. //
  83. // retail
  84. //
  85. #define Perf_IncCounter(iCounter)
  86. #endif // DEBUG
  87. #endif // PERFCOUNT_H