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 "../system.h"
16 /*===========================================================================*
18 *===========================================================================*/
19 PUBLIC
int do_profbuf(m_ptr
)
20 register message
*m_ptr
; /* pointer to request message */
22 /* This kernel call is used by profiled system processes when Call
23 * Profiling is enabled. It is called on the first execution of procentry.
24 * By means of this kernel call, the profiled processes inform the kernel
25 * about the location of their profiling table and the control structure
26 * which is used to enable the kernel to have the tables cleared.
32 /* Store process name, control struct, table locations. */
33 isokendpt(m_ptr
->m_source
, &proc_nr
);
34 rp
= proc_addr(proc_nr
);
36 cprof_proc_info
[cprof_procs_no
].endpt
= who_e
;
37 cprof_proc_info
[cprof_procs_no
].name
= rp
->p_name
;
39 len
= (phys_bytes
) sizeof (void *);
41 vir_dst
= (vir_bytes
) m_ptr
->PROF_CTL_PTR
;
42 cprof_proc_info
[cprof_procs_no
].ctl
=
43 numap_local(proc_nr
, vir_dst
, len
);
45 vir_dst
= (vir_bytes
) m_ptr
->PROF_MEM_PTR
;
46 cprof_proc_info
[cprof_procs_no
].buf
=
47 numap_local(proc_nr
, vir_dst
, len
);