Branch: Tag:

2003-02-01

2003-02-01 15:43:51 by Martin Stjernholm <mast@lysator.liu.se>

Enabled some consistency checks in the gc when compiled without rtldebug
(only activated on debug level 1 or higher). Always define _verify_internals
to be able to use this.

Made it possible to turn on trace messages for the gc only with
trace(1,"gc"). This is the embryo of a facility based trace system. Still to
do: Raise all the global trace levels to make room for gc only trace at
level 1, and fix a framework for trace facilities.

Rev: src/array.c:1.137
Rev: src/builtin.cmod:1.113
Rev: src/builtin_functions.c:1.466
Rev: src/gc.c:1.199
Rev: src/gc.h:1.97
Rev: src/mapping.c:1.162
Rev: src/multiset.c:1.68
Rev: src/object.c:1.218
Rev: src/program.c:1.477

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: builtin_functions.c,v 1.465 2003/01/28 13:18:18 mast Exp $ + || $Id: builtin_functions.c,v 1.466 2003/02/01 15:43:50 mast Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.465 2003/01/28 13:18:18 mast Exp $"); + RCSID("$Id: builtin_functions.c,v 1.466 2003/02/01 15:43:50 mast Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
3769:    push_array(a);   }    -  - #ifdef PIKE_DEBUG +    /*! @decl void verify_internals()    *! @belongs Debug    *!
3781: Inside #if defined(PIKE_DEBUG)
   *! It is only used for debugging.    *!    *! @note -  *! This function is only available if the Pike runtime has been compiled -  *! with RTL debug. +  *! This function does a more thorough check if the Pike runtime has +  *! been compiled with RTL debug.    */   PMOD_EXPORT void f__verify_internals(INT32 args)   {
3790: Inside #if defined(PIKE_DEBUG)
   CHECK_SECURITY_OR_ERROR(SECURITY_BIT_SECURITY,    ("_verify_internals: permission denied.\n"));    d_flag=0x7fffffff; -  do_debug(); /* Runs gc too since d_flag > 3. */ + #ifdef PIKE_DEBUG +  do_debug(); /* Calls do_gc() since d_flag > 3. */ + #else +  do_gc(); + #endif    d_flag=tmp;    pop_n_elems(args);   }    -  + #ifdef PIKE_DEBUG +    /*! @decl int debug(int(0..) level)    *! @belongs Debug    *!
7885:    tFunc(tOr(tObj,tMapping),tInt)),OPT_TRY_OPTIMIZE);   #endif    - #ifdef PIKE_DEBUG -  +    /* function(:void) */    ADD_EFUN("_verify_internals",f__verify_internals,    tFunc(tNone,tVoid),OPT_SIDE_EFFECT|OPT_EXTERNAL_DEPEND);    -  + #ifdef PIKE_DEBUG +    /* function(int:int) */    ADD_EFUN("_debug",f__debug,    tFunc(tInt,tInt),OPT_SIDE_EFFECT|OPT_EXTERNAL_DEPEND);