From: David van Moolenbroek Date: Thu, 28 Jan 2016 12:09:35 +0000 (+0100) Subject: Basic statistical profiling fixes X-Git-Url: http://zhaoyanbai.com/repos//%22http:/www.isc.org/%22?a=commitdiff_plain;h=373b793920deea2122e25de227b3388b5ad4716d;p=minix.git 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 --- diff --git a/minix/commands/sprofalyze/sprofalyze.c b/minix/commands/sprofalyze/sprofalyze.c index 5f31e4714..2b99814a3 100755 --- a/minix/commands/sprofalyze/sprofalyze.c +++ b/minix/commands/sprofalyze/sprofalyze.c @@ -20,10 +20,29 @@ static const char *default_binaries[] = { "kernel/kernel", "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 */ diff --git a/minix/include/minix/syslib.h b/minix/include/minix/syslib.h index 45b923649..6f884508d 100644 --- a/minix/include/minix/syslib.h +++ b/minix/include/minix/syslib.h @@ -253,7 +253,7 @@ int pci_get_bar(int devind, int port, u32_t *base, u32_t *size, int /* Profiling. */ 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 */ int sys_getmcontext(endpoint_t proc, vir_bytes mcp); diff --git a/minix/kernel/system/do_sprofile.c b/minix/kernel/system/do_sprofile.c index 581e35075..d84e22c95 100644 --- a/minix/kernel/system/do_sprofile.c +++ b/minix/kernel/system/do_sprofile.c @@ -77,7 +77,7 @@ int do_sprofile(struct proc * caller, message * m_ptr) break; case PROF_NMI: err = nmi_watchdog_start_profiling( - _ptr->m_lsys_krn_sys_sprof.freq); + m_ptr->m_lsys_krn_sys_sprof.freq); if (err) return err; break; diff --git a/minix/lib/libsys/sys_sprof.c b/minix/lib/libsys/sys_sprof.c index 5ac3550c8..a43b0fbb3 100644 --- a/minix/lib/libsys/sys_sprof.c +++ b/minix/lib/libsys/sys_sprof.c @@ -11,8 +11,8 @@ int size; /* available profiling memory */ int freq; /* sample frequency */ int type; endpoint_t endpt; /* caller endpoint */ -void *ctl_ptr; /* location of info struct */ -void *mem_ptr; /* location of profiling memory */ +vir_bytes ctl_ptr; /* location of info struct */ +vir_bytes mem_ptr; /* location of profiling memory */ { message m;