syscall/offload tracker: clean-up and support process-wise aggregation
This commit is contained in:
@ -232,8 +232,6 @@ enum mpol_rebind_step {
|
||||
#include <waitq.h>
|
||||
#include <futex.h>
|
||||
|
||||
//#define TRACK_SYSCALLS
|
||||
|
||||
struct resource_set;
|
||||
struct process_hash;
|
||||
struct thread_hash;
|
||||
@ -244,6 +242,28 @@ struct process_vm;
|
||||
struct vm_regions;
|
||||
struct vm_range;
|
||||
|
||||
//#define TRACK_SYSCALLS
|
||||
|
||||
#ifdef TRACK_SYSCALLS
|
||||
#define TRACK_SYSCALLS_MAX 300
|
||||
#define __NR_track_syscalls 701
|
||||
|
||||
#define TRACK_SYSCALLS_CLEAR 0x01
|
||||
#define TRACK_SYSCALLS_ON 0x02
|
||||
#define TRACK_SYSCALLS_OFF 0x04
|
||||
#define TRACK_SYSCALLS_PRINT 0x08
|
||||
#define TRACK_SYSCALLS_PRINT_PROC 0x10
|
||||
|
||||
void track_syscalls_print_thread_stats(struct thread *thread);
|
||||
void track_syscalls_print_proc_stats(struct process *proc);
|
||||
void track_syscalls_accumulate_counters(struct thread *thread,
|
||||
struct process *proc);
|
||||
void track_syscalls_alloc_counters(struct thread *thread);
|
||||
void track_syscalls_dealloc_thread_counters(struct thread *thread);
|
||||
void track_syscalls_dealloc_proc_counters(struct process *proc);
|
||||
#endif // TRACK_SYSCALLS
|
||||
|
||||
|
||||
#define HASH_SIZE 73
|
||||
|
||||
struct resource_set {
|
||||
@ -539,6 +559,13 @@ struct process {
|
||||
#define PP_COUNT 2
|
||||
#define PP_STOP 3
|
||||
struct mc_perf_event *monitoring_event;
|
||||
#ifdef TRACK_SYSCALLS
|
||||
mcs_lock_node_t st_lock;
|
||||
uint64_t *syscall_times;
|
||||
uint32_t *syscall_cnts;
|
||||
uint64_t *offload_times;
|
||||
uint32_t *offload_cnts;
|
||||
#endif // TRACK_SYSCALLS
|
||||
};
|
||||
|
||||
void hold_thread(struct thread *ftn);
|
||||
@ -612,7 +639,7 @@ struct thread {
|
||||
int in_syscall_offload;
|
||||
|
||||
#ifdef TRACK_SYSCALLS
|
||||
int socc_enabled;
|
||||
int track_syscalls;
|
||||
uint64_t *syscall_times;
|
||||
uint32_t *syscall_cnts;
|
||||
uint64_t *offload_times;
|
||||
|
||||
Reference in New Issue
Block a user