From 809d7c6303a85a078bcd6484bbe7dd1e03e2d66f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Fri, 20 Nov 1998 11:05:46 -0800 Subject: [PATCH] I will get profiling to work, even if it is the last thing I do! Rev: src/interpret.c:1.110 Rev: src/threads.h:1.58 --- src/interpret.c | 4 ++-- src/threads.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/interpret.c b/src/interpret.c index d743242ad2..580448b472 100644 --- a/src/interpret.c +++ b/src/interpret.c @@ -4,7 +4,7 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: interpret.c,v 1.109 1998/11/20 18:57:42 hubbe Exp $"); +RCSID("$Id: interpret.c,v 1.110 1998/11/20 19:01:06 hubbe Exp $"); #include "interpret.h" #include "object.h" #include "program.h" @@ -1810,7 +1810,7 @@ void mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2) unsigned INT32 self_time_base; if(start_time < 0) { - fatal("gethrtime() shrunk\n start_time=%ld\n gethrtime()\n time_base=%ld\n", + fatal("gethrtime() shrunk\n start_time=%ld\n gethrtime()=%ld\n time_base=%ld\n", (long)(start_time/100000), (long)(gethrtime()/100000), (long)(time_base/100000)); diff --git a/src/threads.h b/src/threads.h index 89af21e376..269619d526 100644 --- a/src/threads.h +++ b/src/threads.h @@ -1,5 +1,5 @@ /* - * $Id: threads.h,v 1.57 1998/11/20 18:38:46 hubbe Exp $ + * $Id: threads.h,v 1.58 1998/11/20 19:05:46 hubbe Exp $ */ #ifndef THREADS_H #define THREADS_H @@ -370,8 +370,8 @@ struct thread_state { (_tmp)->thread_id=thread_id;\ DO_IF_PROFILING( (_tmp)->accounted_time=accounted_time; ) \ DO_IF_PROFILING( (_tmp)->time_base = gethrtime() - time_base; ) \ - DO_IF_DEBUG( DO_IF_PROFILING( if(accounted_time<0) fatal("Accounted time out of whack!\n");)) \ - DO_IF_DEBUG( DO_IF_PROFILING( if((_tmp)->time_base<0) fatal("time base out of whack!\n");)) \ + DO_IF_DEBUG( DO_IF_PROFILING( if(accounted_time<0) fatal("Accounted time out of whack at swap out!\n");)) \ + DO_IF_DEBUG( DO_IF_PROFILING( if((_tmp)->time_base<0) fatal("time base out of whack at swap out!\n");)) \ SWAP_OUT_TRACE(_tmp); \ } while(0) @@ -388,9 +388,9 @@ struct thread_state { stack_top=(_tmp)->stack_top;\ thread_id=(_tmp)->thread_id;\ DO_IF_PROFILING( accounted_time=(_tmp)->accounted_time; ) \ - DO_IF_PROFILING( time_base = (_tmp)->time_base + gethrtime(); ) \ - DO_IF_DEBUG( DO_IF_PROFILING( if(accounted_time<0) fatal("Accounted time out of whack!\n");)) \ - DO_IF_DEBUG( DO_IF_PROFILING( if(time_base<0) fatal("time base out of whack!\n");)) \ + DO_IF_PROFILING( time_base = gethrtime() - (_tmp)->time_base; ) \ + DO_IF_DEBUG( DO_IF_PROFILING( if(accounted_time<0) fatal("Accounted time out of whack at swap in!\n");)) \ + DO_IF_DEBUG( DO_IF_PROFILING( if(time_base<0) fatal("time base out of whack at swap in!\n");)) \ SWAP_IN_TRACE(_tmp); \ } while(0) -- GitLab