Add hooks for Ziggy's pc-sample profiler.
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 28 Aug 1993 22:46:44 +0000 (22:46 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 28 Aug 1993 22:46:44 +0000 (22:46 +0000)
13 files changed:
v7/src/microcode/dosenv.c
v7/src/microcode/fixobj.h
v7/src/microcode/intrpt.h
v7/src/microcode/ntenv.c
v7/src/microcode/osenv.h
v7/src/microcode/prosenv.c
v7/src/microcode/uxenv.c
v7/src/microcode/uxsig.c
v7/src/microcode/uxtrap.c
v7/src/microcode/uxtrap.h
v7/src/microcode/version.h
v8/src/microcode/fixobj.h
v8/src/microcode/version.h

index 3d92274f31c7aa36ef4bcbe732982db30cb63fdf..8137f15291569ca17ec25595535ba56f63e885e4 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: dosenv.c,v 1.5 1993/07/07 05:46:49 gjr Exp $
+$Id: dosenv.c,v 1.6 1993/08/28 22:46:35 gjr Exp $
 
 Copyright (c) 1992-1993 Massachusetts Institute of Technology
 
@@ -140,6 +140,20 @@ DEFUN_VOID (OS_process_timer_clear)
   return;
 }
 
+void
+DEFUN (OS_profile_timer_set, (first, interval),
+       clock_t first AND
+       clock_t interval)
+{
+  error_unimplemented_primitive ();
+}
+
+void
+DEFUN_VOID (OS_profile_timer_clear)
+{
+  return;
+}
+
 void
 DEFUN (OS_real_timer_set, (first, interval),
        clock_t first AND
index 8b8fc9fa6f669b381110ff472817b76cab2c8659..682c200af94eaf55f81ac9c7bbe2397a486a418b 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Id: fixobj.h,v 9.33 1993/08/23 22:25:54 cph Exp $
+$Id: fixobj.h,v 9.34 1993/08/28 22:46:36 gjr Exp $
 
-Copyright (c) 1987-93 Massachusetts Institute of Technology
+Copyright (c) 1987-1993 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -85,7 +85,9 @@ MIT in each case. */
                                           primitives. */
 
 /* Trampolines for various generic arithmetic operations.
-   These facilitate upwards compatibility and simplify compilation. */
+   These facilitate upwards compatibility and simplify compilation. 
+ */
+
 #define GENERIC_TRAMPOLINE_ZERO_P      0x24
 #define GENERIC_TRAMPOLINE_POSITIVE_P  0x25
 #define GENERIC_TRAMPOLINE_NEGATIVE_P  0x26
@@ -101,8 +103,27 @@ MIT in each case. */
 #define GENERIC_TRAMPOLINE_QUOTIENT    0x30
 #define GENERIC_TRAMPOLINE_REMAINDER   0x31
 #define GENERIC_TRAMPOLINE_MODULO      0x32
-
+\f
 #define ARITY_DISPATCHER_TAG           0x33
 
-#define NFixed_Objects         0x34
+/* Descartes profiling tables */
+
+#define PC_Sample_Builtin_Table                0x34 /* ``built in'' assembly code */
+#define PC_Sample_Utility_Table                0x35 /* Foreign func'n utilities */
+#define PC_Sample_Primitive_Table      0x36 /* Primitive proc samples */
+
+#define PC_Sample_Code_Block_Table     0x37 /* Compiled  proc samples */
+
+#define PC_Sample_PCB_Block_Buffer     0x38 /* Double buffer pure compiled */
+#define PC_Sample_PCB_Offset_Buffer    0x39 /* Double buffer pure comp offs */
+#define PC_Sample_HCB_Block_Buffer     0x3A /* Double buffer heathen comps */
+#define PC_Sample_HCB_Offset_Buffer    0x3B /* Double buffer heathen comps */
+
+#define PC_Sample_Interp_Proc_Buffer   0x3C /* Double buffer interp procs */
+
+#define PC_Sample_Prob_Comp_Table      0x3D /* Sure looked compiled ?! */
+#define PC_Sample_UFO_Table            0x3E /* Invalid ENV at sample time  */
+
+
 
+#define NFixed_Objects                 0x3F
index be975830532e1aa9e9617a3794e633c0a5ad128c..7c94fef4de7693944c3b5aa69cb232e133af47f8 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: intrpt.h,v 1.13 1993/08/21 02:28:59 gjr Exp $
+$Id: intrpt.h,v 1.14 1993/08/28 22:46:37 gjr Exp $
 
 Copyright (c) 1987-1993 Massachusetts Institute of Technology
 
@@ -48,10 +48,19 @@ MIT in each case. */
 #define INT_Global_Mask                \
   (INT_Global_GC | INT_Global_1 | INT_Global_3)
 
+/* Descartes profiling interrupts */
+
+#define INT_IPPB_Flush         512     /* Local interrupt */
+#define INT_IPPB_Extend               1024     /* Local interrupt */
+#define INT_PCBPB_Flush               2048     /* Local interrupt */
+#define INT_PCBPB_Extend       4096    /* Local interrupt */
+#define INT_HCBPB_Flush               8192     /* Local interrupt */
+#define INT_HCBPB_Extend      16384    /* Local interrupt */
+
 #define Global_GC_Level                1
 #define Global_1_Level         3
 #define Global_3_Level         7
-#define MAX_INTERRUPT_NUMBER   8
+#define MAX_INTERRUPT_NUMBER   14      /* 2^14 = 16384 = INT_HCBPB_Extend */
 
 #define INT_Mask               ((1 << (MAX_INTERRUPT_NUMBER + 1)) - 1)
 \f
index 337153eabf59b2dd5c3d581315f4923a476d767d..94479d032205cefc55e340657ed265eefac97a6e 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: ntenv.c,v 1.6 1993/08/21 03:21:19 gjr Exp $
+$Id: ntenv.c,v 1.7 1993/08/28 22:46:38 gjr Exp $
 
 Copyright (c) 1992-1993 Massachusetts Institute of Technology
 
@@ -114,6 +114,19 @@ DEFUN_VOID (OS_process_timer_clear)
   return;
 }
 
+void
+DEFUN (OS_profile_timer_set, (first, interval),
+       clock_t first AND clock_t interval)
+{
+  return;
+}
+
+void
+DEFUN_VOID (OS_profile_timer_clear)
+{
+  return;
+}
+
 void
 DEFUN (OS_real_timer_set, (first, interval),
        clock_t first AND clock_t interval)
index 41af186e934bafb8597aafc70af92b8ba7cb8486..ab80dd70d1082de2c6630432d650af0bcacdde63 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: osenv.h,v 1.4 1993/07/01 22:29:57 cph Exp $
+$Id: osenv.h,v 1.5 1993/08/28 22:46:39 gjr Exp $
 
 Copyright (c) 1990-1993 Massachusetts Institute of Technology
 
@@ -55,6 +55,8 @@ extern double EXFUN (OS_process_clock, (void));
 extern double EXFUN (OS_real_time_clock, (void));
 extern void EXFUN (OS_process_timer_set, (clock_t first, clock_t interval));
 extern void EXFUN (OS_process_timer_clear, (void));
+extern void EXFUN (OS_profile_timer_set, (clock_t first, clock_t interval));
+extern void EXFUN (OS_profile_timer_clear, (void));
 extern void EXFUN (OS_real_timer_set, (clock_t first, clock_t interval));
 extern void EXFUN (OS_real_timer_clear, (void));
 extern CONST char * EXFUN (OS_working_dir_pathname, (void));
index fd127075308cbfbefd451269fd33207c9f2cf839..d56e2ef45ede1fd6f75f1156284199a01154c31d 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: prosenv.c,v 1.9 1993/07/01 22:29:58 cph Exp $
+$Id: prosenv.c,v 1.10 1993/08/28 22:46:39 gjr Exp $
 
 Copyright (c) 1987-1993 Massachusetts Institute of Technology
 
@@ -172,6 +172,26 @@ Both arguments are in units of milliseconds.")
                     (arg_nonnegative_integer (2)));
   PRIMITIVE_RETURN (UNSPECIFIC);
 }
+\f
+DEFINE_PRIMITIVE ("PROFILE-TIMER-CLEAR", Prim_profile_timer_clear, 0, 0,
+  "Turn off the PC sample timer.")
+{
+  PRIMITIVE_HEADER (0);
+  OS_profile_timer_clear ();
+  PRIMITIVE_RETURN (UNSPECIFIC);
+}
+
+DEFINE_PRIMITIVE ("PROFILE-TIMER-SET", Prim_profile_timer_set, 2, 2,
+  "Set the PC sample timer.\n\
+First arg FIRST says how long to wait until the first interrupt;\n\
+second arg INTERVAL says how long to wait between interrupts after that.\n\
+Both arguments are in units of milliseconds.")
+{
+  PRIMITIVE_HEADER (2);
+  OS_profile_timer_set ((arg_nonnegative_integer (1)),
+                       (arg_nonnegative_integer (2)));
+  PRIMITIVE_RETURN (UNSPECIFIC);
+}
 
 DEFINE_PRIMITIVE ("SETUP-TIMER-INTERRUPT", Prim_setup_timer_interrupt, 2, 2,
   "This is an obsolete primitive; use `process-timer-set' instead.")
@@ -188,7 +208,7 @@ DEFINE_PRIMITIVE ("SETUP-TIMER-INTERRUPT", Prim_setup_timer_interrupt, 2, 2,
     }
   PRIMITIVE_RETURN (UNSPECIFIC);
 }
-\f
+
 DEFINE_PRIMITIVE ("WORKING-DIRECTORY-PATHNAME", Prim_working_dir_pathname, 0, 0,
   "Return the current working directory as a string.")
 {
index e2bc44baa155e9184b08a8d500b48779042c913e..9884d97addd9904abdbfe411812464d80b8012ff 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: uxenv.c,v 1.11 1993/07/01 22:29:59 cph Exp $
+$Id: uxenv.c,v 1.12 1993/08/28 22:46:40 gjr Exp $
 
 Copyright (c) 1990-1993 Massachusetts Institute of Technology
 
@@ -34,6 +34,7 @@ MIT in each case. */
 
 #include "ux.h"
 #include "osenv.h"
+#include "config.h"            /* For TRUE/FALSE & true/false */
 \f
 time_t
 DEFUN_VOID (OS_encoded_time)
@@ -239,6 +240,20 @@ DEFUN_VOID (OS_process_timer_clear)
   set_timer (ITIMER_VIRTUAL, 0, 0);
 }
 
+void
+DEFUN (OS_profile_timer_set, (first, interval),
+       clock_t first AND
+       clock_t interval)
+{
+  set_timer (ITIMER_PROF, first, interval);
+}
+
+void
+DEFUN_VOID (OS_profile_timer_clear)
+{
+  set_timer (ITIMER_PROF, 0, 0);
+}
+
 void
 DEFUN (OS_real_timer_set, (first, interval),
        clock_t first AND
@@ -274,6 +289,21 @@ DEFUN (OS_process_timer_set, (first, interval),
 void
 DEFUN_VOID (OS_process_timer_clear)
 {
+  return;
+}
+
+void
+DEFUN (OS_profile_timer_set, (first, interval),
+       clock_t first AND
+       clock_t interval)
+{
+  error_unimplemented_primitive ();
+}
+
+void
+DEFUN_VOID (OS_profile_timer_clear)
+{
+  return;
 }
 
 void
index 63e32fc05336f180e7d7d78dcd90e45e70c2e451..ac8575fcb15b996759c8c16229a01ac70e878b27 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: uxsig.c,v 1.26 1993/06/24 06:35:59 gjr Exp $
+$Id: uxsig.c,v 1.27 1993/08/28 22:46:42 gjr Exp $
 
 Copyright (c) 1990-1993 Massachusetts Institute of Technology
 
@@ -32,11 +32,13 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
+#include "config.h"
 #include "ux.h"
 #include "ossig.h"
 #include "osctty.h"
 #include "ostty.h"
 #include "uxtrap.h"
+#include "uxsig.h"
 #include "uxutil.h"
 #include "critsec.h"
 \f
@@ -56,7 +58,7 @@ DEFUN (current_handler, (signo), int signo)
 #define SA_SIGINFO 0
 #endif
 
-static void
+void
 DEFUN (INSTALL_HANDLER, (signo, handler),
        int signo AND
        Tsignal_handler handler)
@@ -81,13 +83,6 @@ DEFUN (current_handler, (signo), int signo)
   return (result);
 }
 
-#define INSTALL_HANDLER UX_sigset
-
-#define NEED_HANDLER_TRANSACTION
-#define ENTER_HANDLER(signo)
-#define ABORT_HANDLER(signo, handler) UX_sigrelse (signo)
-#define EXIT_HANDLER(signo, handler)
-
 #else /* not HAVE_SYSV3_SIGNALS */
 
 static Tsignal_handler
@@ -99,15 +94,19 @@ DEFUN (current_handler, (signo), int signo)
   return (result);
 }
 
-#define INSTALL_HANDLER UX_signal
-
-#define NEED_HANDLER_TRANSACTION
-#define ENTER_HANDLER(signo) UX_signal ((signo), SIG_IGN)
-#define ABORT_HANDLER UX_signal
-#define EXIT_HANDLER UX_signal
-
 #endif /* HAVE_SYSV3_SIGNALS */
 #endif /* HAVE_POSIX_SIGNALS */
+
+#ifdef NEED_HANDLER_TRANSACTION
+
+void
+DEFUN (ta_abort_handler, (ap), PTR ap)
+{
+  ABORT_HANDLER ((((struct handler_record *) ap) -> signo),
+                (((struct handler_record *) ap) -> handler));
+}
+
+#endif /* NEED_HANDLER_TRANSACTION */
 \f
 #ifdef HAVE_POSIX_SIGNALS
 
@@ -164,6 +163,20 @@ DEFUN_VOID (unblock_signals)
 }
 
 #endif /* not HAVE_POSIX_SIGNALS */
+
+void
+DEFUN (deactivate_handler, (signo), int signo)
+{
+  INSTALL_HANDLER (signo, SIG_IGN) ;
+}
+
+void
+DEFUN (activate_handler, (signo, handler),
+       int signo AND
+       Tsignal_handler handler)
+{
+  INSTALL_HANDLER (signo, handler) ;
+}
 \f
 /* Signal Descriptors */
 
@@ -316,75 +329,6 @@ DEFUN_VOID (initialize_signal_descriptors)
 #endif
 }
 \f
-/* Signal Handlers */
-
-#ifndef NEED_HANDLER_TRANSACTION
-
-#define DEFUN_STD_HANDLER(name, statement)                             \
-static Tsignal_handler_result                                          \
-DEFUN (name, (signo, info, pscp),                                      \
-       int signo AND                                                   \
-       SIGINFO_T info AND                                              \
-       struct SIGCONTEXT * pscp)                                       \
-{                                                                      \
-  int STD_HANDLER_abortp;                                              \
-  DECLARE_FULL_SIGCONTEXT (scp);                                       \
-  INITIALIZE_FULL_SIGCONTEXT (pscp, scp);                              \
-  STD_HANDLER_abortp = (enter_interruption_extent ());                 \
-  statement;                                                           \
-  if (STD_HANDLER_abortp)                                              \
-    exit_interruption_extent ();                                       \
-  SIGNAL_HANDLER_RETURN ();                                            \
-}
-
-#else /* NEED_HANDLER_TRANSACTION */
-
-struct handler_record
-{
-  int signo;
-  Tsignal_handler handler;
-};
-
-#define DEFUN_STD_HANDLER(name, statement)                             \
-static Tsignal_handler_result                                          \
-DEFUN (name, (signo, info, pscp),                                      \
-       int signo AND                                                   \
-       SIGINFO_T info AND                                              \
-       struct SIGCONTEXT * pscp)                                       \
-{                                                                      \
-  int STD_HANDLER_abortp;                                              \
-  DECLARE_FULL_SIGCONTEXT (scp);                                       \
-  INITIALIZE_FULL_SIGCONTEXT (pscp, scp);                              \
-  ENTER_HANDLER (signo);                                               \
-  STD_HANDLER_abortp = (enter_interruption_extent ());                 \
-  transaction_begin ();                                                        \
-  {                                                                    \
-    struct handler_record * record =                                   \
-      (dstack_alloc (sizeof (struct handler_record)));                 \
-    (record -> signo) = signo;                                         \
-    (record -> handler) = name;                                                \
-    transaction_record_action (tat_abort, ta_abort_handler, record);   \
-  }                                                                    \
-  statement;                                                           \
-  if (STD_HANDLER_abortp)                                              \
-    {                                                                  \
-      transaction_abort ();                                            \
-      exit_interruption_extent ();                                     \
-    }                                                                  \
-  transaction_commit ();                                               \
-  EXIT_HANDLER (signo, name);                                          \
-  SIGNAL_HANDLER_RETURN ();                                            \
-}
-
-static void
-DEFUN (ta_abort_handler, (ap), PTR ap)
-{
-  ABORT_HANDLER ((((struct handler_record *) ap) -> signo),
-                (((struct handler_record *) ap) -> handler));
-}
-
-#endif /* NEED_HANDLER_TRANSACTION */
-\f
 #define CONTROL_B_INTERRUPT_CHAR 'B'
 #define CONTROL_G_INTERRUPT_CHAR 'G'
 #define CONTROL_U_INTERRUPT_CHAR 'U'
@@ -410,23 +354,23 @@ DEFUN (echo_keyboard_interrupt, (c, dc), cc_t c AND cc_t dc)
   fflush (stdout);
 }
 
-DEFUN_STD_HANDLER (sighnd_control_g,
+static DEFUN_STD_HANDLER (sighnd_control_g,
   {
     echo_keyboard_interrupt ((OS_ctty_int_char ()), ALERT_CHAR);
     tty_set_next_interrupt_char (CONTROL_G_INTERRUPT_CHAR);
   })
 
-DEFUN_STD_HANDLER (sighnd_control_u,
+static DEFUN_STD_HANDLER (sighnd_control_u,
   {
     tty_set_next_interrupt_char (CONTROL_U_INTERRUPT_CHAR);
   })
 
-DEFUN_STD_HANDLER (sighnd_control_x,
+static DEFUN_STD_HANDLER (sighnd_control_x,
   {
     tty_set_next_interrupt_char (CONTROL_X_INTERRUPT_CHAR);
   })
 
-DEFUN_STD_HANDLER (sighnd_control_b,
+static DEFUN_STD_HANDLER (sighnd_control_b,
   {
     tty_set_next_interrupt_char (CONTROL_B_INTERRUPT_CHAR);
   })
@@ -434,7 +378,7 @@ DEFUN_STD_HANDLER (sighnd_control_b,
 static void EXFUN
   (interactive_interrupt_handler, (struct FULL_SIGCONTEXT * scp));
 
-DEFUN_STD_HANDLER (sighnd_interactive,
+static DEFUN_STD_HANDLER (sighnd_interactive,
   (interactive_interrupt_handler (scp)))
 
 void
@@ -484,7 +428,7 @@ void EXFUN ((*stop_signal_hook), (int signo));
 #  define IF_POSIX_SIGNALS(code) do {} while (0)
 #endif
 
-DEFUN_STD_HANDLER (sighnd_stop,
+static DEFUN_STD_HANDLER (sighnd_stop,
   IF_POSIX_SIGNALS(
   {
     sigset_t old_mask;
@@ -520,7 +464,7 @@ DEFUN_VOID (OS_restartable_exit)
 
 #ifdef HAVE_ITIMER
 
-DEFUN_STD_HANDLER (sighnd_timer,
+static DEFUN_STD_HANDLER (sighnd_timer,
   {
     request_timer_interrupt ();
   })
@@ -529,7 +473,7 @@ DEFUN_STD_HANDLER (sighnd_timer,
 
 extern void EXFUN (reschedule_alarm, (void));
 
-DEFUN_STD_HANDLER (sighnd_timer,
+static DEFUN_STD_HANDLER (sighnd_timer,
   {
     reschedule_alarm ();
     request_timer_interrupt ();
@@ -537,26 +481,26 @@ DEFUN_STD_HANDLER (sighnd_timer,
 
 #endif /* HAVE_ITIMER */
 
-DEFUN_STD_HANDLER (sighnd_save_then_terminate,
+static DEFUN_STD_HANDLER (sighnd_save_then_terminate,
   (request_suspend_interrupt ()))
 
-DEFUN_STD_HANDLER (sighnd_terminate,
+static DEFUN_STD_HANDLER (sighnd_terminate,
   (termination_signal
    ((! (option_emacs_subprocess && (signo == SIGHUP)))
     ? (find_signal_name (signo))
     : 0)))
 \f
-DEFUN_STD_HANDLER (sighnd_fpe,
+static DEFUN_STD_HANDLER (sighnd_fpe,
   {
     if (executing_scheme_primitive_p ())
       error_floating_point_exception ();
     trap_handler ("floating-point exception", signo, info, scp);
   })
 
-DEFUN_STD_HANDLER (sighnd_hardware_trap,
+static DEFUN_STD_HANDLER (sighnd_hardware_trap,
   (trap_handler ("hardware fault", signo, info, scp)))
 
-DEFUN_STD_HANDLER (sighnd_software_trap,
+static DEFUN_STD_HANDLER (sighnd_software_trap,
   (trap_handler ("system software fault", signo, info, scp)))
 
 #ifdef HAVE_NICE
@@ -565,7 +509,7 @@ DEFUN_STD_HANDLER (sighnd_software_trap,
 #define NICE_DELTA 5
 #endif
 
-DEFUN_STD_HANDLER (sighnd_renice,
+static DEFUN_STD_HANDLER (sighnd_renice,
   {
     fprintf (stderr, "\n;;; Renicing! New nice value = %d\n",
             ((nice (NICE_DELTA)) + 20));
@@ -600,7 +544,7 @@ void EXFUN ((*subprocess_death_hook), (pid_t pid, wait_status_t * status));
 #define BREAK break
 #endif
 
-DEFUN_STD_HANDLER (sighnd_dead_subprocess,
+static DEFUN_STD_HANDLER (sighnd_dead_subprocess,
   {
     while (1)
       {
index 978f2d3889543cc552d63d8ac79d10ffac99e40a..25b57f0902c52c74f7757da2ff1e0edd93e55e24 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: uxtrap.c,v 1.22 1993/07/29 07:02:51 gjr Exp $
+$Id: uxtrap.c,v 1.23 1993/08/28 22:46:05 gjr Exp $
 
 Copyright (c) 1990-1993 Massachusetts Institute of Technology
 
@@ -232,19 +232,6 @@ DEFUN (trap_handler, (message, signo, info, scp),
   }
 }
 \f
-#define STATE_UNKNOWN          (LONG_TO_UNSIGNED_FIXNUM (0))
-#define STATE_PRIMITIVE                (LONG_TO_UNSIGNED_FIXNUM (1))
-#define STATE_COMPILED_CODE    (LONG_TO_UNSIGNED_FIXNUM (2))
-#define STATE_PROBABLY_COMPILED        (LONG_TO_UNSIGNED_FIXNUM (3))
-
-struct trap_recovery_info
-{
-  SCHEME_OBJECT state;
-  SCHEME_OBJECT pc_info_1;
-  SCHEME_OBJECT pc_info_2;
-  SCHEME_OBJECT extra_trap_info;
-};
-
 static struct trap_recovery_info dummy_recovery_info =
 {
   STATE_UNKNOWN,
@@ -455,34 +442,7 @@ DEFUN (continue_from_trap, (signo, info, scp),
 #define STACK_ALIGNMENT_MASK           SCHEME_ALIGNMENT_MASK
 #define FREE_PARANOIA_MARGIN           0x100
 
-/* PCs must be aligned according to this. */
-
-#define PC_ALIGNMENT_MASK              ((1 << PC_ZERO_BITS) - 1)
-
-/* But they may have bits that can be masked by this. */
-
-#ifndef PC_VALUE_MASK
-#define PC_VALUE_MASK                  (~0)
-#endif
-
 #define C_STACK_SIZE                   0x01000000
-
-#ifdef HAS_COMPILER_SUPPORT
-#define ALLOW_ONLY_C 0
-#else
-#define ALLOW_ONLY_C 1
-#define PLAUSIBLE_CC_BLOCK_P(block) 0
-#endif
-
-static SCHEME_OBJECT * EXFUN
-  (find_block_address, (char * pc_value, SCHEME_OBJECT * area_start));
-
-#if !(defined (_NEXTOS) && (_NEXTOS_VERSION >= 20))
-#if !(defined (_HPUX) && (_HPUX_VERSION >= 80) && defined (hp9000s300))
-extern long etext;
-#endif
-#  define get_etext() (&etext)
-#endif
 \f
 static void
 DEFUN (continue_from_trap, (signo, info, scp),
@@ -581,7 +541,7 @@ DEFUN (continue_from_trap, (signo, info, scp),
     }
     else if (pc_in_builtin)
     {
-      (trinfo . state) = STATE_PROBABLY_COMPILED;
+      (trinfo . state) = STATE_BUILTIN;
       (trinfo . pc_info_1) = (LONG_TO_UNSIGNED_FIXNUM (builtin_index));
       (trinfo . pc_info_2) = SHARP_T;
     }
@@ -622,7 +582,7 @@ DEFUN (continue_from_trap, (signo, info, scp),
 
     if (pc_in_utility)
     {
-      (trinfo . state) = STATE_PROBABLY_COMPILED;
+      (trinfo . state) = STATE_UTILITY;
       (trinfo . pc_info_1) = (LONG_TO_UNSIGNED_FIXNUM (utility_index));
       (trinfo . pc_info_2) = UNSPECIFIC;
     }
@@ -683,7 +643,7 @@ static SCHEME_OBJECT * EXFUN
 
 #define MINIMUM_SCAN_RANGE             2048
 
-static SCHEME_OBJECT *
+SCHEME_OBJECT *
 DEFUN (find_block_address, (pc_value, area_start),
        char * pc_value AND
        SCHEME_OBJECT * area_start)
index 1d1dfd95938a19ab6d74a46093e81bb40f72e033..5e8d06307dc89c1e140768cf04c3f5dfdb4a5836 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: uxtrap.h,v 1.20 1993/07/29 07:02:52 gjr Exp $
+$Id: uxtrap.h,v 1.21 1993/08/28 22:46:43 gjr Exp $
 
 Copyright (c) 1990-1993 Massachusetts Institute of Technology
 
@@ -37,6 +37,8 @@ MIT in each case. */
 
 #include "os.h"
 \f
+/* Machine/OS-dependent section (long) */
+
 #ifdef hp9000s300
 
 #include <sys/sysmacros.h>
@@ -519,7 +521,33 @@ struct full_sigcontext
 #ifndef INITIALIZE_UX_SIGNAL_CODES
 #define INITIALIZE_UX_SIGNAL_CODES()
 #endif
+
+/* PCs must be aligned according to this. */
+
+#define PC_ALIGNMENT_MASK              ((1 << PC_ZERO_BITS) - 1)
+
+/* But they may have bits that can be masked by this. */
+
+#ifndef PC_VALUE_MASK
+#define PC_VALUE_MASK                  (~0)
+#endif
+
+#ifdef HAS_COMPILER_SUPPORT
+# define ALLOW_ONLY_C 0
+#else
+# define ALLOW_ONLY_C 1
+# define PLAUSIBLE_CC_BLOCK_P(block) 0
+#endif
+
+#if !(defined (_NEXTOS) && (_NEXTOS_VERSION >= 20))
+#if !(defined (_HPUX) && (_HPUX_VERSION >= 80) && defined (hp9000s300))
+extern long etext;
+#endif
+#  define get_etext() (&etext)
+#endif
 \f
+/* Machine/OS-independent section */
+
 enum trap_state
 {
   trap_state_trapped,
@@ -542,4 +570,22 @@ extern void EXFUN
 extern void EXFUN (hard_reset, (struct FULL_SIGCONTEXT * scp));
 extern void EXFUN (soft_reset, (void));
 
+#define STATE_UNKNOWN          (LONG_TO_UNSIGNED_FIXNUM (0))
+#define STATE_PRIMITIVE                (LONG_TO_UNSIGNED_FIXNUM (1))
+#define STATE_COMPILED_CODE    (LONG_TO_UNSIGNED_FIXNUM (2))
+#define STATE_PROBABLY_COMPILED        (LONG_TO_UNSIGNED_FIXNUM (3))
+#define STATE_BUILTIN          (LONG_TO_UNSIGNED_FIXNUM (4))
+#define STATE_UTILITY          (LONG_TO_UNSIGNED_FIXNUM (5))  /* CommGas? */
+
+struct trap_recovery_info
+{
+  SCHEME_OBJECT state;
+  SCHEME_OBJECT pc_info_1;
+  SCHEME_OBJECT pc_info_2;
+  SCHEME_OBJECT extra_trap_info;
+};
+
+extern SCHEME_OBJECT * EXFUN
+  (find_block_address, (char * pc_value, SCHEME_OBJECT * area_start));
+
 #endif /* SCM_UXTRAP_H */
index 1ac7e237224e11e4301b8a1b896f4e7ab2fa3f92..41668ed78e9342fe5ad7174df1bd8aad181b3bf1 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: version.h,v 11.139 1993/08/28 05:45:25 gjr Exp $
+$Id: version.h,v 11.140 1993/08/28 22:46:44 gjr Exp $
 
 Copyright (c) 1988-1993 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     139
+#define SUBVERSION     140
 #endif
index 8b8fc9fa6f669b381110ff472817b76cab2c8659..682c200af94eaf55f81ac9c7bbe2397a486a418b 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Id: fixobj.h,v 9.33 1993/08/23 22:25:54 cph Exp $
+$Id: fixobj.h,v 9.34 1993/08/28 22:46:36 gjr Exp $
 
-Copyright (c) 1987-93 Massachusetts Institute of Technology
+Copyright (c) 1987-1993 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -85,7 +85,9 @@ MIT in each case. */
                                           primitives. */
 
 /* Trampolines for various generic arithmetic operations.
-   These facilitate upwards compatibility and simplify compilation. */
+   These facilitate upwards compatibility and simplify compilation. 
+ */
+
 #define GENERIC_TRAMPOLINE_ZERO_P      0x24
 #define GENERIC_TRAMPOLINE_POSITIVE_P  0x25
 #define GENERIC_TRAMPOLINE_NEGATIVE_P  0x26
@@ -101,8 +103,27 @@ MIT in each case. */
 #define GENERIC_TRAMPOLINE_QUOTIENT    0x30
 #define GENERIC_TRAMPOLINE_REMAINDER   0x31
 #define GENERIC_TRAMPOLINE_MODULO      0x32
-
+\f
 #define ARITY_DISPATCHER_TAG           0x33
 
-#define NFixed_Objects         0x34
+/* Descartes profiling tables */
+
+#define PC_Sample_Builtin_Table                0x34 /* ``built in'' assembly code */
+#define PC_Sample_Utility_Table                0x35 /* Foreign func'n utilities */
+#define PC_Sample_Primitive_Table      0x36 /* Primitive proc samples */
+
+#define PC_Sample_Code_Block_Table     0x37 /* Compiled  proc samples */
+
+#define PC_Sample_PCB_Block_Buffer     0x38 /* Double buffer pure compiled */
+#define PC_Sample_PCB_Offset_Buffer    0x39 /* Double buffer pure comp offs */
+#define PC_Sample_HCB_Block_Buffer     0x3A /* Double buffer heathen comps */
+#define PC_Sample_HCB_Offset_Buffer    0x3B /* Double buffer heathen comps */
+
+#define PC_Sample_Interp_Proc_Buffer   0x3C /* Double buffer interp procs */
+
+#define PC_Sample_Prob_Comp_Table      0x3D /* Sure looked compiled ?! */
+#define PC_Sample_UFO_Table            0x3E /* Invalid ENV at sample time  */
+
+
 
+#define NFixed_Objects                 0x3F
index 1ac7e237224e11e4301b8a1b896f4e7ab2fa3f92..41668ed78e9342fe5ad7174df1bd8aad181b3bf1 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: version.h,v 11.139 1993/08/28 05:45:25 gjr Exp $
+$Id: version.h,v 11.140 1993/08/28 22:46:44 gjr Exp $
 
 Copyright (c) 1988-1993 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     139
+#define SUBVERSION     140
 #endif