Branch: Tag:

1999-02-01

1999-02-01 06:13:16 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

approximately 20% speedup when running PIKE_DEBUG but not -d

Rev: src/interpret.c:1.114
Rev: src/interpreter.h:1.1
Rev: src/las.c:1.74
Rev: src/threads.h:1.63

1:   /* -  * $Id: threads.h,v 1.62 1999/02/01 04:11:37 hubbe Exp $ +  * $Id: threads.h,v 1.63 1999/02/01 06:13:16 hubbe Exp $    */   #ifndef THREADS_H   #define THREADS_H
278:   #define THREAD_RUNNING 0   #define THREAD_EXITED 1    + #ifdef PIKE_SECURITY + extern struct object *current_creds; + #define DO_IF_SECURITY(X) X + #else + #define DO_IF_SECURITY(X) + #endif +    struct thread_state {    char swapped;    char status;
295:    JMP_BUF *recoveries;    struct object * thread_id;    char *stack_top; +  DO_IF_SECURITY(struct object *current_creds;)      #ifdef PROFILING   #ifdef HAVE_GETHRTIME
370:    (_tmp)->thread_id=thread_id;\    DO_IF_PROFILING( (_tmp)->accounted_time=accounted_time; ) \    DO_IF_PROFILING( (_tmp)->time_base = gethrtime() - time_base; ) \ +  DO_IF_SECURITY( (_tmp)->current_creds = current_creds ;) \    SWAP_OUT_TRACE(_tmp); \    } while(0)   
387:    thread_id=(_tmp)->thread_id;\    DO_IF_PROFILING( accounted_time=(_tmp)->accounted_time; ) \    DO_IF_PROFILING( time_base = gethrtime() - (_tmp)->time_base; ) \ +  DO_IF_SECURITY( current_creds = (_tmp)->current_creds ;) \    SWAP_IN_TRACE(_tmp); \    } while(0)