information, see Section <ref name="Using ``ticky-ticky'' profiling
(for implementors)" id="ticky-ticky">.
+<tag>@-xc@:</tag>
+<nidx>-xc RTS option</nidx>
+<nidx>cost centre display on exception</nidx>
+Display the current cost centre stack whenever an exception is
+raised. The program must have been compiled with profiling turned on:
+see Section <ref name="Profiling" id="profiling">. This feature is
+experimental; one day it will display the information only on
+<em>uncaught</em> exceptions.
+
<tag>@-D<num>@:</tag>
<nidx>-D RTS option</nidx>
An RTS debugging flag; varying quantities of output depending on which
/* -----------------------------------------------------------------------------
- * $Id: RtsFlags.c,v 1.20 1999/11/02 15:06:00 simonmar Exp $
+ * $Id: RtsFlags.c,v 1.21 1999/11/29 12:02:44 keithw Exp $
*
* (c) The AQUA Project, Glasgow University, 1994-1997
* (c) The GHC Team, 1998-1999
#ifdef PROFILING
RtsFlags.ProfFlags.doHeapProfile = rtsFalse;
+ RtsFlags.ProfFlags.showCCSOnException = rtsFalse;
RtsFlags.ProfFlags.ccSelector = NULL;
RtsFlags.ProfFlags.modSelector = NULL;
" The selection logic used is summarised as follows:",
" ([-c] or [-m] or [-g]) and ([-d] or [-y] or [-k]) and [-a]",
" where an option is true if not specified",
+"",
+" -xc Show current cost centre stack on raising an exception",
# endif
"",
" -z<tbl><size> set hash table <size> for <tbl> (C, M, G, D or Y)",
TICKY-only (same order as defined in RtsFlags.lh);
within those groups, mostly in case-insensitive
alphabetical order.
+ Final group is x*, which allows for more options.
*/
#ifdef TICKY_TICKY
if (RtsFlags.TickyFlags.tickyFile == NULL) error = rtsTrue;
) break;
+ /* =========== EXTENDED OPTIONS =================== */
+
+ case 'x': /* Extend the argument space */
+ switch(rts_argv[arg][2]) {
+ case '\0':
+ fprintf(stderr, "setupRtsFlags: Incomplete RTS option: %s\n",rts_argv[arg]);
+ error = rtsTrue;
+ break;
+
+ case 'c': /* Debugging tool: show current cost centre on an exception */
+ PROFILING_BUILD_ONLY(
+ RtsFlags.ProfFlags.showCCSOnException = rtsTrue;
+ ) break;
+
+ /* The option prefix '-xx' is reserved for future extension. KSW 1999-11. */
+
+ default:
+ fprintf(stderr, "setupRtsFlags: Unknown RTS option: %s\n",rts_argv[arg]);
+ error = rtsTrue;
+ break;
+ }
+ break; /* defensive programming */
+
/* =========== OH DEAR ============================ */
default:
fprintf(stderr, "setupRtsFlags: Unknown RTS option: %s\n",rts_argv[arg]);
/* -----------------------------------------------------------------------------
- * $Id: Updates.hc,v 1.22 1999/11/12 10:18:59 simonmar Exp $
+ * $Id: Updates.hc,v 1.23 1999/11/29 12:02:46 keithw Exp $
*
* (c) The GHC Team, 1998-1999
*
FB_
/* args : R1 = error */
+#if defined(PROFILING)
+
+ /* Debugging tool: on raising an exception, show where we are. */
+
+ /* ToDo: currently this is a hack. Would be much better if
+ * the info was only displayed for an *uncaught* exception.
+ */
+ if (RtsFlags.ProfFlags.showCCSOnException) {
+ STGCALL2(print_ccs,stderr,CCCS);
+ }
+
+#endif
+
p = Su;
/* This closure represents the expression 'raise# E' where E