System statistical and call profiling
support by Rogier Meurs <rogier@meurs.org>.
This commit is contained in:
@@ -7,6 +7,7 @@ LIBRARIES=libc
|
||||
libc_FILES=" \
|
||||
_brk.c \
|
||||
_sbrk.c \
|
||||
_cprofile.c \
|
||||
_devctl.c \
|
||||
__pm_findproc.c \
|
||||
_getnpid.c \
|
||||
@@ -18,6 +19,7 @@ libc_FILES=" \
|
||||
_reboot.c \
|
||||
_seekdir.c \
|
||||
_sysuname.c \
|
||||
_sprofile.c \
|
||||
_svrctl.c \
|
||||
asynchio.c \
|
||||
basename.c \
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#include <lib.h>
|
||||
|
||||
#define cprofile _cprofile
|
||||
|
||||
PUBLIC int cprofile(int action, int size, char *ctl_ptr, int *mem_ptr)
|
||||
{
|
||||
message m;
|
||||
|
||||
m.PROF_ACTION = action;
|
||||
m.PROF_MEM_SIZE = size;
|
||||
m.PROF_CTL_PTR = (void *) ctl_ptr;
|
||||
m.PROF_MEM_PTR = (void *) mem_ptr;
|
||||
|
||||
return _syscall(MM, CPROF, &m);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#include <lib.h>
|
||||
|
||||
#define sprofile _sprofile
|
||||
|
||||
PUBLIC int sprofile(int action, int size, int freq, char *ctl_ptr, int *mem_ptr)
|
||||
{
|
||||
message m;
|
||||
|
||||
m.PROF_ACTION = action;
|
||||
m.PROF_MEM_SIZE = size;
|
||||
m.PROF_FREQ = freq;
|
||||
m.PROF_CTL_PTR = (void *) ctl_ptr;
|
||||
m.PROF_MEM_PTR = (void *) mem_ptr;
|
||||
|
||||
return _syscall(MM, SPROF, &m);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user