Add ENABLE_PERF macros so that perf support can be toggled
Change-Id: Ic50c8b329af63e63579b6a60b9557344100eaac4
This commit is contained in:
@@ -1634,6 +1634,7 @@ struct thread *arch_switch_context(struct thread *prev, struct thread *next)
|
|||||||
/* Set up new TLS.. */
|
/* Set up new TLS.. */
|
||||||
ihk_mc_init_user_tlsbase(next->uctx, next->tlsblock_base);
|
ihk_mc_init_user_tlsbase(next->uctx, next->tlsblock_base);
|
||||||
|
|
||||||
|
#ifdef ENABLE_PERF
|
||||||
/* Performance monitoring inherit */
|
/* Performance monitoring inherit */
|
||||||
if(next->proc->monitoring_event) {
|
if(next->proc->monitoring_event) {
|
||||||
if(next->proc->perf_status == PP_RESET)
|
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);
|
perf_start(next->proc->monitoring_event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PROFILE_ENABLE
|
#ifdef PROFILE_ENABLE
|
||||||
if (prev && prev->profile && prev->profile_start_ts != 0) {
|
if (prev && prev->profile && prev->profile_start_ts != 0) {
|
||||||
|
|||||||
@@ -154,7 +154,9 @@ SYSCALL_HANDLED(279, move_pages)
|
|||||||
SYSCALL_DELEGATED(281, epoll_pwait)
|
SYSCALL_DELEGATED(281, epoll_pwait)
|
||||||
SYSCALL_HANDLED(282, signalfd)
|
SYSCALL_HANDLED(282, signalfd)
|
||||||
SYSCALL_HANDLED(289, signalfd4)
|
SYSCALL_HANDLED(289, signalfd4)
|
||||||
|
#ifdef ENABLE_PERF
|
||||||
SYSCALL_HANDLED(298, perf_event_open)
|
SYSCALL_HANDLED(298, perf_event_open)
|
||||||
|
#endif
|
||||||
#ifdef DCFA_KMOD
|
#ifdef DCFA_KMOD
|
||||||
SYSCALL_HANDLED(303, mod_call)
|
SYSCALL_HANDLED(303, mod_call)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user