home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mitsch75.zip / scheme-7_5_17-src.zip / scheme-7.5.17 / src / microcode / zones.h < prev   
C/C++ Source or Header  |  1999-01-02  |  2KB  |  65 lines

  1. /* -*-C-*-
  2.  
  3. Copyright (c) 1987, 1988, 1999 Massachusetts Institute of Technology
  4.  
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or (at
  8. your option) any later version.
  9.  
  10. This program is distributed in the hope that it will be useful, but
  11. WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13. General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */
  19.  
  20. /* $Id: zones.h,v 9.26 1999/01/02 06:11:34 cph Exp $
  21.  *
  22.  * Metering stuff.
  23.  * We break all times into time zones suitable for external analysis.
  24.  * Primitives may be included for accessing this information if desired
  25.  * by supplying additional files.
  26.  */
  27.  
  28. #ifdef METERING
  29. extern long New_Time, Old_Time, Time_Meters[], Current_Zone;
  30.  
  31. #ifdef ENABLE_DEBUGGING_TOOLS
  32. #define Set_Time_Zone(Zone)                        \
  33. {                                    \
  34.   New_Time = (OS_process_clock ());                    \
  35.   Time_Meters[Current_Zone] += New_Time-Old_Time;            \
  36.   Old_Time = New_Time;                            \
  37.   Current_Zone = Zone;                            \
  38. }
  39. #else
  40. #define Set_Time_Zone(Zone) Current_Zone = Zone;
  41. #endif
  42.  
  43. #define Save_Time_Zone(Zone)    Saved_Zone = Current_Zone; Set_Time_Zone(Zone);
  44. #define Restore_Time_Zone()    Set_Time_Zone(Saved_Zone);
  45. #else
  46. #define Set_Time_Zone(Zone)
  47. #define Save_Time_Zone(Zone)
  48. #define Restore_Time_Zone()
  49. #endif
  50.  
  51. #define Zone_Working 0
  52. #define Zone_GetWork 1
  53. #define Zone_TTY_IO 2
  54. #define Zone_Disk_IO 3
  55. #define Zone_Purify 4
  56. #define Zone_GCLoop 5
  57. #define Zone_Global_Int 6
  58. #define Zone_Store_Lock 7
  59. #define Zone_Math 8
  60. #define Zone_GCIdle 9
  61. #define Zone_Lookup 10
  62. #define Zone_Scheduler 11
  63.  
  64. #define Max_Meters 20
  65.