linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Leo Yan <leo.yan@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-perf-users@vger.kernel.org,
	Kan Liang <kan.liang@linux.intel.com>,
	Ravi Bangoria <ravi.bangoria@amd.com>
Subject: Re: [PATCH] perf mem: Fix -C option behavior for perf mem record
Date: Fri, 14 Oct 2022 12:20:09 -0300	[thread overview]
Message-ID: <Y0l+KXH9tBnjoil4@kernel.org> (raw)
In-Reply-To: <Yz5vUmZtQzYNRt73@leoy-yangtze.lan>

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


      reply	other threads:[~2022-10-14 15:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-04 20:02 [PATCH] perf mem: Fix -C option behavior for perf mem record Namhyung Kim
2022-10-06  6:01 ` Leo Yan
2022-10-14 15:20   ` Arnaldo Carvalho de Melo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y0l+KXH9tBnjoil4@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).