2006-10-30 16:53:38 +01:00
|
|
|
/*
|
|
|
|
* Library function used by system profiling.
|
|
|
|
*
|
|
|
|
* The variables and functions in this file are used by the procentry/
|
|
|
|
* procentry syslib functions when linked with userspace processes. For
|
|
|
|
* kernel processes, the same variables and function are defined
|
|
|
|
* elsewhere. This enables different functionality and variable sizes,
|
|
|
|
* which is needed is a few cases.
|
|
|
|
*
|
|
|
|
* Changes:
|
|
|
|
* 14 Aug, 2006 Created (Rogier Meurs)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <lib.h>
|
|
|
|
|
|
|
|
#include <minix/profile.h>
|
|
|
|
#include <minix/syslib.h>
|
|
|
|
|
|
|
|
/* A regular sized table is declared for the userspace processes. */
|
|
|
|
struct cprof_tbl_s cprof_tbl[CPROF_TABLE_SIZE_OTHER];
|
|
|
|
|
|
|
|
/* Function that returns table size. */
|
2012-03-25 20:25:53 +02:00
|
|
|
int profile_get_tbl_size(void)
|
2006-10-30 16:53:38 +01:00
|
|
|
{
|
|
|
|
return CPROF_TABLE_SIZE_OTHER;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Function that returns on which execution of procentry to announce. */
|
2012-03-25 20:25:53 +02:00
|
|
|
int profile_get_announce(void)
|
2006-10-30 16:53:38 +01:00
|
|
|
{
|
|
|
|
return CPROF_ANNOUNCE_OTHER;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Userspace processes announce their control struct and table locations
|
|
|
|
* to the kernel through this function.
|
|
|
|
*/
|
2012-03-25 20:25:53 +02:00
|
|
|
void profile_register(ctl_ptr, tbl_ptr)
|
2006-10-30 16:53:38 +01:00
|
|
|
void *ctl_ptr;
|
|
|
|
void *tbl_ptr;
|
|
|
|
{
|
|
|
|
sys_profbuf(ctl_ptr, tbl_ptr);
|
|
|
|
}
|
|
|
|
|