From: Ben Gras Date: Fri, 9 Jan 2009 21:44:52 +0000 (+0000) Subject: cprofile not conditional X-Git-Tag: v3.1.4~143 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=c27008fbcc1a684a7039d47c049538cdb9be2d51;p=minix.git cprofile not conditional --- diff --git a/kernel/glo.h b/kernel/glo.h index f893fff28..8e240324d 100755 --- a/kernel/glo.h +++ b/kernel/glo.h @@ -99,7 +99,7 @@ EXTERN int must_notify_vm; EXTERN int verbose_vm; /* Timing */ -EXTERN util_timingdata_t timingdata; +EXTERN util_timingdata_t timingdata[TIMING_CATEGORIES]; /* Variables that are initialized elsewhere are just extern here. */ extern struct boot_image image[]; /* system image processes */ diff --git a/kernel/main.c b/kernel/main.c index 800ce28a4..05bf762fd 100755 --- a/kernel/main.c +++ b/kernel/main.c @@ -37,8 +37,6 @@ PUBLIC void main() reg_t ktsb; /* kernel task stack base */ struct exec e_hdr; /* for a copy of an a.out header */ - do_serial_debug=0; - /* Clear the process table. Anounce each slot as empty and set up mappings * for proc_addr() and proc_nr() macros. Do the same for the table with * privilege structures for the system processes. @@ -174,9 +172,7 @@ PUBLIC void main() #if SPROFILE sprofiling = 0; /* we're not profiling until instructed to */ #endif /* SPROFILE */ -#if CPROFILE cprof_procs_no = 0; /* init nr of hash table slots used */ -#endif /* CPROFILE */ vm_running = 0; diff --git a/kernel/profile.c b/kernel/profile.c index da0001088..9f3f351e3 100644 --- a/kernel/profile.c +++ b/kernel/profile.c @@ -17,16 +17,12 @@ #include -#if SPROFILE || CPROFILE - #include #include #include "kernel.h" #include "profile.h" #include "proc.h" -#endif - #if SPROFILE #include @@ -126,8 +122,6 @@ irq_hook_t *hook; #endif /* SPROFILE */ -#if CPROFILE - /* * The following variables and functions are used by the procentry/ * procentry syslib functions when linked with kernelspace processes. @@ -177,5 +171,3 @@ void *tbl_ptr; cprof_procs_no++; } -#endif /* CPROFILE */ - diff --git a/kernel/profile.h b/kernel/profile.h index a8c29ed7d..e09847f35 100644 --- a/kernel/profile.h +++ b/kernel/profile.h @@ -1,9 +1,7 @@ #ifndef PROFILE_H #define PROFILE_H -#if SPROFILE || CPROFILE #include -#endif #if SPROFILE /* statistical profiling */ @@ -16,8 +14,6 @@ EXTERN endpoint_t sprof_ep; /* user process */ #endif /* SPROFILE */ -#if CPROFILE /* call profiling */ - EXTERN int cprof_mem_size; /* available user memory for data */ EXTERN struct cprof_info_s cprof_info; /* profiling info for user program */ EXTERN int cprof_procs_no; /* number of profiled processes */ @@ -30,7 +26,5 @@ EXTERN struct cprof_proc_info_s { /* info about profiled process */ } cprof_proc_info_inst; EXTERN struct cprof_proc_info_s cprof_proc_info[NR_SYS_PROCS]; -#endif /* CPROFILE */ - #endif /* PROFILE_H */ diff --git a/kernel/system.h b/kernel/system.h index 3f187ca70..10b4f4003 100644 --- a/kernel/system.h +++ b/kernel/system.h @@ -187,14 +187,7 @@ _PROTOTYPE( int do_sprofile, (message *m_ptr) ); #endif _PROTOTYPE( int do_cprofile, (message *m_ptr) ); -#if ! CPROFILE -#define do_cprofile do_unused -#endif - _PROTOTYPE( int do_profbuf, (message *m_ptr) ); -#if ! CPROFILE -#define do_profbuf do_unused -#endif _PROTOTYPE( int do_mapdma, (message *m_ptr) );