lkml.org 
[lkml]   [2022]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf mem: Fix -C option behavior for perf mem record
Em Thu, Oct 06, 2022 at 02:01:54PM +0800, Leo Yan escreveu:
> On Tue, Oct 04, 2022 at 01:02:11PM -0700, Namhyung Kim wrote:
> > The -C/--cpu option was maily for report but it also affected record as
> > it ate the option. So users needed to use "--" after perf mem record to
> > pass the info to the perf record properly.
> >
> > Check if this option is set for record, and pass it to the actual perf
> > record.
> >
> > Before)
> > $ sudo perf --debug perf-event-open mem record -C 0 2>&1 | grep -a sys_perf_event_open
> > ...
> > sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 = 4
> > sys_perf_event_open: pid -1 cpu 1 group_fd -1 flags 0x8 = 5
> > sys_perf_event_open: pid -1 cpu 2 group_fd -1 flags 0x8 = 6
> > sys_perf_event_open: pid -1 cpu 3 group_fd -1 flags 0x8 = 7
> > sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 = 8
> > sys_perf_event_open: pid -1 cpu 1 group_fd -1 flags 0x8 = 9
> > sys_perf_event_open: pid -1 cpu 2 group_fd -1 flags 0x8 = 10
> > sys_perf_event_open: pid -1 cpu 3 group_fd -1 flags 0x8 = 11
> > ...
> >
> > After)
> > $ sudo perf --debug perf-event-open mem record -C 0 2>&1 | grep -a sys_perf_event_open
> > ...
> > sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 = 4
> > sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 = 5
> > sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 = 6
> > sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 = 7
> >
> > Cc: Leo Yan <leo.yan@linaro.org>
> > Reported-by: Ravi Bangoria <ravi.bangoria@amd.com>
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
>
> The change LGTM:
>
> Reviewed-by: Leo Yan <leo.yan@linaro.org>
> Tested-by: Leo Yan <leo.yan@linaro.org>

Thanks, applied.

- Arnaldo

\
 
 \ /
  Last update: 2022-10-14 17:21    [W:0.042 / U:0.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site