System statistical and call profiling

support by Rogier Meurs <rogier@meurs.org>.
This commit is contained in:
Ben Gras
2006-10-30 15:53:38 +00:00
parent fa0ba56bc9
commit 7195fe3325
76 changed files with 2650 additions and 77 deletions
+2
View File
@@ -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 \
+16
View File
@@ -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);
}
+17
View File
@@ -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);
}