ihk_os_getrusage(): Compile LWK-specific results in mcctrl

1. User asks mcctrl for the result via ihk_os_getrusage() with passing void *
2. mcctrl compiles the results and passes them to the user
3. User interprets it by using the type defined in the LWK-specific header
This commit is contained in:
Masamichi Takagi
2017-08-17 22:06:49 +09:00
parent 5664125e57
commit aa7cb970c4
28 changed files with 567 additions and 386 deletions

View File

@@ -7,7 +7,7 @@
#define IHK_OS_PGSIZE_2MB 1
#define IHK_OS_PGSIZE_1GB 2
extern struct ihk_os_monitor *monitor;
extern struct rusage_global *rusage;
extern int sprintf(char * buf, const char *fmt, ...);

View File

@@ -24,7 +24,7 @@
#include <page.h>
#include <cls.h>
#include <kmalloc.h>
#include <rusage.h>
#include <rusage_private.h>
//#define DEBUG
@@ -2050,7 +2050,7 @@ retry:
dkprintf("set_range_l2(%lx,%lx,%lx):"
"2MiB page. %d %lx\n",
base, start, end, error, *ptep);
// call memory_stat_rss_add() here because pgshift is resolved here
// Call memory_stat_rss_add() here because pgshift is resolved here
if (rusage_memory_stat_add(args->range, phys, PTL2_SIZE, PTL2_SIZE)) {
dkprintf("%lx+,%s: calling memory_stat_rss_add(),base=%lx,phys=%lx,size=%ld,pgsize=%ld\n", phys, __FUNCTION__, base, phys, PTL2_SIZE, PTL2_SIZE);
} else {