spp.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /*++
  2. Copyright (c) 2013 Minoca Corp.
  3. This file is licensed under the terms of the GNU General Public License
  4. version 3. Alternative licensing terms are available. Contact
  5. info@minocacorp.com for details. See the LICENSE file at the root of this
  6. project for complete licensing information.
  7. Module Name:
  8. spp.h
  9. Abstract:
  10. This header contains privates definitions for the System Profiler.
  11. Author:
  12. Chris Stevens 1-Jul-2013
  13. --*/
  14. //
  15. // ------------------------------------------------------------------- Includes
  16. //
  17. //
  18. // ---------------------------------------------------------------- Definitions
  19. //
  20. //
  21. // ------------------------------------------------------ Data Type Definitions
  22. //
  23. //
  24. // -------------------------------------------------------------------- Globals
  25. //
  26. //
  27. // Stores a value indicating which types of profiling are enabled.
  28. //
  29. extern ULONG SpEnabledFlags;
  30. //
  31. // Stores a pointer to a queued lock protecting access to the profiling status
  32. // variables.
  33. //
  34. extern PQUEUED_LOCK SpProfilingQueuedLock;
  35. //
  36. // -------------------------------------------------------- Function Prototypes
  37. //
  38. KSTATUS
  39. SppStartSystemProfiler (
  40. ULONG Flags
  41. );
  42. /*++
  43. Routine Description:
  44. This routine starts the system profiler. This routine must be called at low
  45. level. It assumes the profiler queued lock is held.
  46. Arguments:
  47. Flags - Supplies a set of flags representing the types of profiling that
  48. should be started.
  49. Return Value:
  50. Status code.
  51. --*/
  52. KSTATUS
  53. SppStopSystemProfiler (
  54. ULONG Flags
  55. );
  56. /*++
  57. Routine Description:
  58. This routine stops the system profiler and destroys the profiling data
  59. structures. This routine must be called at low level. It assumes the
  60. profiler queued lock is held.
  61. Arguments:
  62. Flags - Supplies a set of flags representing the types of profiling that
  63. should be stopped.
  64. Return Value:
  65. Status code.
  66. --*/
  67. KSTATUS
  68. SppArchGetKernelStackData (
  69. PTRAP_FRAME TrapFrame,
  70. PVOID *CallStack,
  71. PULONG CallStackSize
  72. );
  73. /*++
  74. Routine Description:
  75. This routine retrieves the kernel stack and its size in the given data
  76. fields.
  77. Arguments:
  78. TrapFrame - Supplies a pointer to the trap frame.
  79. CallStack - Supplies a pointer that receives an array of return addresses
  80. in the call stack.
  81. CallStackSize - Supplies a pointer to the size of the given call stack
  82. array. On return, it contains the size of the produced call stack, in
  83. bytes.
  84. Return Value:
  85. Status code.
  86. --*/