profile: fix definition of PROFILE_ENABLE and __NR_profile

Change-Id: I3f9f5870f8380d3668e1ccb06fd0f6d3307e3fa4
This commit is contained in:
Masamichi Takagi
2021-01-05 00:50:49 -05:00
committed by Masamichi Takagi
parent df37d6867f
commit d726bd3d11
5 changed files with 12 additions and 7 deletions

View File

@@ -1,9 +1,6 @@
#ifndef __PROCESS_PROFILE_H_
#define __PROCESS_PROFILE_H_
/* Uncomment this to enable profiling */
#define PROFILE_ENABLE
#ifdef PROFILE_ENABLE
#define PROFILE_SYSCALL_MAX 2000
#define PROFILE_OFFLOAD_MAX (PROFILE_SYSCALL_MAX << 1)
@@ -58,8 +55,6 @@ enum profile_event_type {
PROFILE_EVENT_MAX /* Should be the last event type */
};
#define __NR_profile PROFILE_EVENT_MAX
#ifdef __KERNEL__
struct thread;
struct process;
@@ -79,6 +74,8 @@ void profile_dealloc_proc_events(struct process *proc);
#include <unistd.h>
#include <sys/syscall.h>
#define __NR_profile PROFILE_EVENT_MAX
/* Per-thread */
static inline void mckernel_profile_thread_on(void)
{

View File

@@ -20,6 +20,7 @@
#include <ihk/ikc.h>
#include <rlimit.h>
#include <time.h>
#include <profile.h>
#define NUM_SYSCALLS 255