home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / MPW / Miscellaneous / MrPlus / Interfaces / ProfileLib.h
Encoding:
C/C++ Source or Header  |  1998-06-30  |  2.8 KB  |  122 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        ProfileLib.h
  3.  
  4.     Contains:    ProfileLib API for dumping and clearing profiling counters
  5.  
  6.     Version:    1.0
  7.  
  8.     Copyright:    © 1997 by Apple Computer, Inc., all rights reserved.
  9.  
  10. */
  11.  
  12. #ifndef __PROFILELIB__
  13. #define __PROFILELIB__
  14.  
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. #endif
  18. #ifndef __ERRORS__
  19. #include <Errors.h>
  20. #endif
  21. #ifndef __FILES__
  22. #include <Files.h>
  23. #endif
  24. #ifndef __PROCESSES__
  25. #include <Processes.h>
  26. #endif
  27.  
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31.  
  32. #if PRAGMA_IMPORT_SUPPORTED
  33. #pragma import on
  34. #endif
  35.  
  36. #if PRAGMA_ALIGN_SUPPORTED
  37. #pragma options align=mac68k
  38. #endif
  39.  
  40. /* Error codes */
  41.  
  42. enum {
  43.     kProfRegistryBusy         = -30769, 
  44.     kDataMergeMismatch         = -30768
  45. };
  46.  
  47.  
  48. /*--------------------------------------------------------------------------------------------*/
  49. /* Calls to clear/dump counters for a specific registered connection of a fragment */
  50. /* by a specific process */
  51. /*--------------------------------------------------------------------------------------------*/
  52.  
  53. extern OSStatus 
  54. ProfClearCounters(
  55.     ConstStr63Param             fragmentName, 
  56.     const ProcessSerialNumber     *processNumber);
  57.  
  58. extern OSStatus 
  59. ProfDumpCounters(
  60.     ConstStr63Param             fragmentName, 
  61.     const ProcessSerialNumber     *processNumber, 
  62.     Boolean                     mergeData, 
  63.     ConstStr63Param             dumpFileName);
  64.  
  65.  
  66. /*--------------------------------------------------------------------------------------------*/
  67. /* Calls to clear/dump counters for all registered connections of a fragment */
  68. /*--------------------------------------------------------------------------------------------*/
  69.  
  70. extern OSStatus 
  71. ProfClearFragmentCounters(
  72.     ConstStr63Param             fragmentName);
  73.  
  74. extern OSStatus 
  75. ProfDumpFragmentCounters(
  76.     ConstStr63Param             fragmentName, 
  77.     Boolean                     mergeData, 
  78.     ConstStr63Param             dumpFileName);
  79.  
  80. /*--------------------------------------------------------------------------------------------*/
  81. /* Calls to clear/dump counters for the specified process */
  82. /*--------------------------------------------------------------------------------------------*/
  83.  
  84. extern OSStatus 
  85. ProfClearProcessCounters(
  86.     const ProcessSerialNumber     *processNumber);
  87.  
  88. extern OSStatus 
  89. ProfDumpProcessCounters(
  90.     const ProcessSerialNumber     *processNumber, 
  91.     Boolean                     mergeData, 
  92.     ConstStr63Param             dumpFileName);
  93.  
  94. /*--------------------------------------------------------------------------------------------*/
  95. /* Calls to clear/dump counters for all registered items */
  96. /*--------------------------------------------------------------------------------------------*/
  97.  
  98. extern OSStatus 
  99. ProfClearAllCounters(void);
  100.  
  101. extern OSStatus 
  102. ProfDumpAllCounters(
  103.     Boolean                     mergeData, 
  104.     ConstStr63Param             dumpFileName);
  105.     
  106.     
  107.  
  108. #if PRAGMA_ALIGN_SUPPORTED
  109. #pragma options align=reset
  110. #endif
  111.  
  112. #if PRAGMA_IMPORT_SUPPORTED
  113. #pragma import off
  114. #endif
  115.  
  116. #ifdef __cplusplus
  117. }
  118. #endif
  119.  
  120. #endif /* __PROFILELIB__ */
  121.  
  122.