Branch: Tag:

2016-02-11

2016-02-11 19:14:56 by Martin Nilsson <nilsson@fastmail.com>

DO_IF_PROFILING was only used for debug printouts, so rewrite it as such.

595: Inside #if defined(PROFILING)
  #ifdef PROFILING    if (!ts->swapped) {    cpu_time_t now = get_cpu_time(); - #ifdef PROFILING_DEBUG -  fprintf(stderr, "%p: Swap out at: %" PRINT_CPU_TIME +  W_PROFILING_DEBUG("%p: Swap out at: %" PRINT_CPU_TIME    " unlocked: %" PRINT_CPU_TIME "\n",    ts, now, ts->state.unlocked_time); - #endif +     ts->state.unlocked_time -= now;    }   #endif
626: Inside #if defined(PROFILING)
  #ifdef PROFILING    if (ts->swapped) {    cpu_time_t now = get_cpu_time(); - #ifdef PROFILING_DEBUG -  fprintf(stderr, "%p: Swap in at: %" PRINT_CPU_TIME +  W_PROFILING_DEBUG("%p: Swap in at: %" PRINT_CPU_TIME    " unlocked: %" PRINT_CPU_TIME "\n",    ts, now, ts->state.unlocked_time); - #endif - /* This will not work, since Pike_interpreter_pointer is always null here... */ - /* #ifdef PIKE_DEBUG */ - /* if (now < -Pike_interpreter.unlocked_time) { */ - /* pike_fatal_dloc("Time at swap in is before time at swap out." */ - /* " %" PRINT_CPU_TIME " < %" PRINT_CPU_TIME */ - /* "\n", now, -Pike_interpreter.unlocked_time); */ - /* } */ - /* #endif */ +  +  /* Pike_interpreter_pointer is always null here... */    ts->state.unlocked_time += now;    }   #endif