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:
@ -16,7 +16,7 @@
|
||||
|
||||
#include <arch-lock.h>
|
||||
#include <ihk/memconst.h>
|
||||
#include <ihk/kmsg.h>
|
||||
#include <ihk/ihk_debug.h>
|
||||
|
||||
#ifdef POSTK_DEBUG_ARCH_DEP_9 /* want to add a static assertion */
|
||||
|
||||
|
||||
@ -227,6 +227,7 @@ int ihk_set_kmsg(unsigned long addr, unsigned long size);
|
||||
char *ihk_get_kargs();
|
||||
|
||||
int ihk_set_monitor(unsigned long addr, unsigned long size);
|
||||
int ihk_set_rusage(unsigned long addr, unsigned long size);
|
||||
int ihk_set_nmi_mode_addr(unsigned long addr);
|
||||
|
||||
extern void (*__tlb_flush_handler)(int vector);
|
||||
|
||||
8
lib/include/ihk/monitor.h
Normal file
8
lib/include/ihk/monitor.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef MONITOR_H_INCLUDED
|
||||
#define MONITOR_H_INCLUDED
|
||||
|
||||
#include <ihk/ihk_monitor.h>
|
||||
|
||||
extern struct ihk_os_monitor *monitor;
|
||||
|
||||
#endif /* !defined(MONITOR_H_INCLUDED) */
|
||||
@ -1,65 +0,0 @@
|
||||
#ifndef __IHK_RUSAGE_H
|
||||
#define __IHK_RUSAGE_H
|
||||
|
||||
#include <arch/rusage.h>
|
||||
#include <ihk/monitor.h>
|
||||
|
||||
enum RUSAGE_MEMBER {
|
||||
RUSAGE_RSS,
|
||||
RUSAGE_CACHE,
|
||||
RUSAGE_RSS_HUGE,
|
||||
RUSAGE_MAPPED_FILE,
|
||||
RUSAGE_MAX_USAGE,
|
||||
RUSAGE_KMEM_USAGE,
|
||||
RUSAGE_KMAX_USAGE,
|
||||
RUSAGE_NUM_NUMA_NODES,
|
||||
RUSAGE_NUMA_STAT,
|
||||
RUSAGE_HUGETLB ,
|
||||
RUSAGE_HUGETLB_MAX ,
|
||||
RUSAGE_STAT_SYSTEM ,
|
||||
RUSAGE_STAT_USER ,
|
||||
RUSAGE_USAGE ,
|
||||
RUSAGE_USAGE_PER_CPU ,
|
||||
RUSAGE_NUM_THREADS ,
|
||||
RUSAGE_MAX_NUM_THREADS
|
||||
};
|
||||
|
||||
struct r_data{
|
||||
unsigned long pid;
|
||||
unsigned long rss;
|
||||
unsigned long cache;
|
||||
unsigned long rss_huge;
|
||||
unsigned long mapped_file;
|
||||
unsigned long max_usage;
|
||||
unsigned long kmem_usage;
|
||||
unsigned long kmax_usage;
|
||||
unsigned long hugetlb;
|
||||
unsigned long hugetlb_max;
|
||||
unsigned long stat_system;
|
||||
unsigned long stat_user;
|
||||
unsigned long usage;
|
||||
struct r_data *next;
|
||||
} ;
|
||||
|
||||
enum ihk_os_status {
|
||||
IHK_STATUS_INACTIVE,
|
||||
IHK_STATUS_BOOTING,
|
||||
IHK_STATUS_RUNNING,
|
||||
IHK_STATUS_SHUTDOWN,
|
||||
IHK_STATUS_PANIC,
|
||||
IHK_STATUS_HUNGUP,
|
||||
IHK_STATUS_FREEZING,
|
||||
IHK_STATUS_FROZEN,
|
||||
};
|
||||
|
||||
enum sys_delegate_state_enum {
|
||||
ENTER_KERNEL,
|
||||
EXIT_KERNEL,
|
||||
};
|
||||
|
||||
extern struct ihk_os_monitor *monitor;
|
||||
|
||||
extern void ihk_mc_set_os_status(unsigned long st);
|
||||
extern unsigned long ihk_mc_get_os_status();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user