Re: [PATCH V4 6/6] csky: Fix perf record in kernel/user space

2019-06-04 Thread Guo Ren
Just move attr.exclude_user after switch, like this: OK? diff --git a/arch/csky/kernel/perf_event.c b/arch/csky/kernel/perf_event.c index 376c972..3470cfa 100644 --- a/arch/csky/kernel/perf_event.c +++ b/arch/csky/kernel/perf_event.c @@ -844,15 +844,6 @@ static int csky_pmu_event_init(struct

[PATCH V4 6/6] csky: Fix perf record in kernel/user space

2019-06-03 Thread Mao Han
csky_pmu_event_init is called several times during the perf record initialzation. After configure the event counter in either kernel space or user space, csky_pmu_event_init is called twice with no attr specified. Configuration will be overwritten with sampling in both kernel space and user space.