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.

138 lines
2.4 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. perfmtrp.h
  5. Abstract:
  6. This module contains NT/Win32 Perfmtr private data and types
  7. Author:
  8. Mark Enstrom (marke) 28-Mar-1991
  9. Revision History:
  10. --*/
  11. #ifndef _CALCPERFH_INCLUDED_
  12. #define _CALCPERFH_INCLUDED_
  13. #define MAX_PROCESSORS 32
  14. #define DATA_LIST_LENGTH 100
  15. #define DELAY_SECONDS 2
  16. //
  17. // display const
  18. //
  19. #define BORDER_WIDTH 2
  20. #define INDENT_WIDTH 8
  21. #define GRAPH_WIDTH 130
  22. #define GRAPH_HEIGHT 40
  23. //
  24. // time constant for sampling performance
  25. //
  26. #define PERF_TIME_DELAY 1000
  27. //
  28. // types of display modes
  29. //
  30. #define DISPLAY_MODE_TOTAL 0
  31. #define DISPLAY_MODE_BREAKDOWN 1
  32. #define DISPLAY_MODE_PER_PROCESSOR 2
  33. //
  34. // This info packet is associated with each
  35. // performance item
  36. //
  37. typedef struct tagDISPLAYITEM
  38. {
  39. HDC MemoryDC;
  40. HBITMAP MemoryBitmap;
  41. struct tagDISPLAYITEM *Next;
  42. ULONG sort;
  43. PULONG MaxToUse;
  44. ULONG Max;
  45. ULONG PositionX;
  46. ULONG PositionY;
  47. ULONG Width;
  48. ULONG Height;
  49. ULONG CurrentDrawingPos;
  50. ULONG Mega;
  51. RECT Border;
  52. RECT GraphBorder;
  53. RECT TextBorder;
  54. BOOL ChangeScale;
  55. BOOL DeleteMe;
  56. BOOL Display;
  57. BOOL AutoTotal;
  58. BOOL IsPercent;
  59. BOOL IsCalc;
  60. UCHAR na[2];
  61. ULONG DisplayMode;
  62. struct tagDISPLAYITEM *CalcPercent[2];
  63. ULONG CalcPercentId[2];
  64. ULONG CalcId;
  65. UCHAR PerfName[80];
  66. UCHAR DispName[80];
  67. ULONG DispNameLen;
  68. VOID (*SnapData)(struct tagDISPLAYITEM *pItem);
  69. ULONG SnapParam1;
  70. ULONG SnapParam2;
  71. ULONG LastAccumulator [MAX_PROCESSORS+1];
  72. ULONG CurrentDataPoint [MAX_PROCESSORS+1];
  73. PULONG DataList [MAX_PROCESSORS+1];
  74. } DISPLAY_ITEM,*PDISPLAY_ITEM;
  75. //
  76. // flag to activate each menu selection
  77. //
  78. #define DISPLAY_INACTIVE 0
  79. #define DISPLAY_ACTIVE 1
  80. VOID
  81. SetCounterEvents (PVOID Events, ULONG length);
  82. // this function is really found in pperf.h but is
  83. // used in calcperf.c so it'd prototyped here
  84. VOID
  85. InitPossibleEventList();
  86. BOOL
  87. UpdatePerfInfo(
  88. PULONG DataPointer,
  89. ULONG NewDataValue,
  90. PULONG OldMaxValue
  91. );
  92. VOID
  93. UpdatePerfInfo1(
  94. PULONG DataPointer,
  95. ULONG NewDataValue
  96. );
  97. VOID
  98. UpdateInternalStats (
  99. VOID
  100. );
  101. VOID
  102. InitListData(
  103. PDISPLAY_ITEM PerfListItem,
  104. ULONG NumberOfItems
  105. );
  106. #endif /* _CALCPERFH_INCLUDED */
  107. 
  108.