Kinfo counts lock_notify() and lock_send() calls.
This commit is contained in:
parent
8d9c0886cd
commit
852008d669
3 changed files with 8 additions and 2 deletions
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue