From: Jorrit Herder Date: Fri, 27 May 2005 14:54:40 +0000 (+0000) Subject: Kinfo counts lock_notify() and lock_send() calls. X-Git-Tag: v3.1.0~808 X-Git-Url: http://zhaoyanbai.com/repos/tz-link.htm?a=commitdiff_plain;h=852008d669c4938ad34a4cfb34a5e30e6b17c9e7;p=minix.git Kinfo counts lock_notify() and lock_send() calls. --- diff --git a/include/minix/type.h b/include/minix/type.h index e661a86e7..ecde3aa74 100755 --- a/include/minix/type.h +++ b/include/minix/type.h @@ -103,6 +103,8 @@ struct kinfo { phys_bytes params_base; /* parameters passed by boot monitor */ phys_bytes params_size; long nr_ntf_pending; + long lock_notify; + long lock_send; int nr_procs; /* number of user processes */ int nr_tasks; /* number of kernel tasks */ char version[8]; /* kernel version number */ diff --git a/kernel/proc.c b/kernel/proc.c index 8f0051d6b..66f0bc795 100755 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -1,6 +1,6 @@ #define NEW_SCHED_Q 1 -#define OLD_SEND 1 -#define OLD_RECV 1 +#define OLD_SEND 0 +#define OLD_RECV 0 /* This file contains essentially all of the process and message handling. * It has one main entry point from the outside: * @@ -426,6 +426,7 @@ message *m_ptr; /* pointer to message buffer */ struct proc *caller_ptr; lock(); + kinfo.lock_notify ++; caller_ptr = (k_reenter >= 0) ? proc_addr(HARDWARE) : proc_ptr; result = mini_notify(caller_ptr, dst, m_ptr); unlock(); @@ -637,6 +638,7 @@ message *m_ptr; /* pointer to message buffer */ /* Safe gateway to mini_send() for tasks. */ int result; lock(); + kinfo.lock_send ++; result = mini_send(proc_ptr, dst, m_ptr, NON_BLOCKING); unlock(); return(result); diff --git a/servers/is/dmp.c b/servers/is/dmp.c index 18b8f645b..dfe8e36c6 100644 --- a/servers/is/dmp.c +++ b/servers/is/dmp.c @@ -336,6 +336,8 @@ PRIVATE void kenv_dmp() printf("- params_base: %5u\n", kinfo.params_base); printf("- params_size: %5u\n", kinfo.params_size); printf("- notify_pending:%8u\n", kinfo.nr_ntf_pending); + printf("- lock_notify: %6u\n", kinfo.lock_notify); + printf("- lock_send: %6u\n", kinfo.lock_send); printf("- nr_procs: %3u\n", kinfo.nr_procs); printf("- nr_tasks: %3u\n", kinfo.nr_tasks); printf("- version: %.6s\n", kinfo.version);