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.

72 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. setlog.c
  5. Abstract:
  6. This module contains code to enable/disable performance logging. This
  7. routine is platform specific to optimize cache usage.
  8. Author:
  9. David N. Cutler (davec) 8-Sep-2001
  10. Environment:
  11. Kernel mode only.
  12. Revision History:
  13. --*/
  14. #include "perfp.h"
  15. VOID
  16. PerfSetLogging (
  17. IN PVOID MaskAddress
  18. )
  19. /*++
  20. Routine Description:
  21. This function is called to enable (MaskAddress is nonNULL) or disable
  22. (MaskAddress is NULL) performance data collection at context switches.
  23. Arguments:
  24. MaskAddress - Supplies a pointer to the performance logging mask or
  25. NULL.
  26. Return Value:
  27. None.
  28. --*/
  29. {
  30. ULONG Index;
  31. PKPRCB Prcb;
  32. //
  33. // Store the specified mask address in the stack limit field of the PCR
  34. // for each processor in the configuation.
  35. //
  36. for (Index = 0; Index < (ULONG)KeNumberProcessors; Index += 1) {
  37. Prcb = KiProcessorBlock[Index];
  38. //
  39. // What even is needed.
  40. //
  41. Prcb->SpareHotData[1] = MaskAddress;
  42. }
  43. return;
  44. }