1 /* The kernel call that is implemented in this file:
4 * The parameters for this kernel call are:
5 * m7_p1: PROF_CTL_PTR (location of control struct)
6 * m7_p2: PROF_MEM_PTR (location of profiling table)
9 * 14 Aug, 2006 Created (Rogier Meurs)
12 #include "kernel/system.h"
16 /*===========================================================================*
18 *===========================================================================*/
19 int do_profbuf(struct proc
* caller
, message
* m_ptr
)
21 /* This kernel call is used by profiled system processes when Call
22 * Profiling is enabled. It is called on the first execution of procentry.
23 * By means of this kernel call, the profiled processes inform the kernel
24 * about the location of their profiling table and the control structure
25 * which is used to enable the kernel to have the tables cleared.
30 /* Store process name, control struct, table locations. */
31 if(!isokendpt(caller
->p_endpoint
, &proc_nr
))
34 if(cprof_procs_no
>= NR_SYS_PROCS
)
37 rp
= proc_addr(proc_nr
);
39 cprof_proc_info
[cprof_procs_no
].endpt
= caller
->p_endpoint
;
40 cprof_proc_info
[cprof_procs_no
].name
= rp
->p_name
;
42 cprof_proc_info
[cprof_procs_no
].ctl_v
= (vir_bytes
) m_ptr
->PROF_CTL_PTR
;
43 cprof_proc_info
[cprof_procs_no
].buf_v
= (vir_bytes
) m_ptr
->PROF_MEM_PTR
;