Basic statistical profiling fixes

At least it works again now.  Sprofalyze should be made aware of the
kernel information page, though (i.e., /proc/ipcvecs).

Change-Id: Id4e5f6417ad152607c4e53b323b6f65ea4b10c6e
This commit is contained in:
David van Moolenbroek 2016-01-28 13:09:35 +01:00
parent 1d80a87694
commit 373b793920
4 changed files with 25 additions and 6 deletions

View File

@ -20,10 +20,29 @@
static const char *default_binaries[] = { static const char *default_binaries[] = {
"kernel/kernel", "kernel/kernel",
"servers/", "servers/",
"drivers/", /* XXX this should not be necessary */
"drivers/audio/",
"drivers/bus/",
"drivers/clock/",
"drivers/eeprom/",
"drivers/examples/",
"drivers/hid/",
"drivers/iommu/",
"drivers/net/",
"drivers/power/",
"drivers/printer/",
"drivers/sensors/",
"drivers/storage/",
"drivers/system/",
"drivers/tty/",
"drivers/usb/",
"drivers/video/",
"drivers/vmm_guest/",
"fs/",
"net/",
}; };
static const char *src_path = "/usr/src"; static const char *src_path = "/usr/src/minix";
/* types */ /* types */

View File

@ -253,7 +253,7 @@ int pci_get_bar(int devind, int port, u32_t *base, u32_t *size, int
/* Profiling. */ /* Profiling. */
int sys_sprof(int action, int size, int freq, int type, endpoint_t int sys_sprof(int action, int size, int freq, int type, endpoint_t
endpt, void *ctl_ptr, void *mem_ptr); endpt, vir_bytes ctl_ptr, vir_bytes mem_ptr);
/* machine context */ /* machine context */
int sys_getmcontext(endpoint_t proc, vir_bytes mcp); int sys_getmcontext(endpoint_t proc, vir_bytes mcp);

View File

@ -77,7 +77,7 @@ int do_sprofile(struct proc * caller, message * m_ptr)
break; break;
case PROF_NMI: case PROF_NMI:
err = nmi_watchdog_start_profiling( err = nmi_watchdog_start_profiling(
_ptr->m_lsys_krn_sys_sprof.freq); m_ptr->m_lsys_krn_sys_sprof.freq);
if (err) if (err)
return err; return err;
break; break;

View File

@ -11,8 +11,8 @@ int size; /* available profiling memory */
int freq; /* sample frequency */ int freq; /* sample frequency */
int type; int type;
endpoint_t endpt; /* caller endpoint */ endpoint_t endpt; /* caller endpoint */
void *ctl_ptr; /* location of info struct */ vir_bytes ctl_ptr; /* location of info struct */
void *mem_ptr; /* location of profiling memory */ vir_bytes mem_ptr; /* location of profiling memory */
{ {
message m; message m;