Branch: Tag:

2004-05-20

2004-05-20 20:13:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Various --with-profiling fixes:
* Now uses get_cpu_time() instead of gethrtime().
* Added PROFILING_DEBUG and corresponding DO_IF_PROFILING_DEBUG() (verbose).
* Renamed Pike_interpreter.time_base to Pike_interpreter.unlocked_time.
* Removed unused macro low_return_profiling().
* Profiling information is now updated by POP_PIKE_FRAME().
* Fixed various bugs causing negative self_time accounting.
* Added PIKE_DEBUG checks verifying positive profiling accounting.
* Removed unused field time_base from struct thread_state.

Rev: src/apply_low.h:1.28
Rev: src/builtin_functions.c:1.558
Rev: src/global.h:1.99
Rev: src/interpret.c:1.349
Rev: src/interpret.h:1.152
Rev: src/interpret_functions.h:1.168
Rev: src/pike_threadlib.h:1.54
Rev: src/program.h:1.203
Rev: src/threads.h:1.128

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: program.h,v 1.202 2004/04/18 02:16:06 mast Exp $ + || $Id: program.h,v 1.203 2004/05/20 20:13:38 grubba Exp $   */      #ifndef PROGRAM_H
15:   #include "svalue.h"   #include "time_stuff.h"   #include "program_id.h" + #include "pike_rusage.h"   #include "block_alloc_h.h"      /* Needed to support dynamic loading on NT */
231:    unsigned INT8 run_time_type; /* PIKE_T_??? */    unsigned INT16 opt_flags; /* OPT_??? */   #ifdef PROFILING -  unsigned INT32 num_calls; -  unsigned INT32 total_time; -  unsigned INT32 self_time; +  unsigned INT32 num_calls; /* Total number of calls. */ +  cpu_time_t total_time; /* Total time with children. */ +  cpu_time_t self_time; /* Total time excluding children. */   #endif /* PROFILING */    union idptr func;   };