Add ENABLE_PERF macros so that perf support can be toggled

Change-Id: Ic50c8b329af63e63579b6a60b9557344100eaac4
This commit is contained in:
Balazs Gerofi
2019-11-26 09:15:05 +09:00
parent 37ea770f8c
commit 621533bbd3
2 changed files with 4 additions and 0 deletions

View File

@ -1634,6 +1634,7 @@ struct thread *arch_switch_context(struct thread *prev, struct thread *next)
/* Set up new TLS.. */
ihk_mc_init_user_tlsbase(next->uctx, next->tlsblock_base);
#ifdef ENABLE_PERF
/* Performance monitoring inherit */
if(next->proc->monitoring_event) {
if(next->proc->perf_status == PP_RESET)
@ -1643,6 +1644,7 @@ struct thread *arch_switch_context(struct thread *prev, struct thread *next)
perf_start(next->proc->monitoring_event);
}
}
#endif
#ifdef PROFILE_ENABLE
if (prev && prev->profile && prev->profile_start_ts != 0) {

View File

@ -154,7 +154,9 @@ SYSCALL_HANDLED(279, move_pages)
SYSCALL_DELEGATED(281, epoll_pwait)
SYSCALL_HANDLED(282, signalfd)
SYSCALL_HANDLED(289, signalfd4)
#ifdef ENABLE_PERF
SYSCALL_HANDLED(298, perf_event_open)
#endif
#ifdef DCFA_KMOD
SYSCALL_HANDLED(303, mod_call)
#endif