linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Stephane Eranian <eranian@google.com>
Cc: Andi Kleen <andi@firstfloor.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	"mingo@elte.hu" <mingo@elte.hu>,
	"Liang, Kan" <kan.liang@intel.com>
Subject: Re: [PATCH] perf record: enable multiplexing scaling via -R
Date: Fri, 1 Sep 2017 10:31:43 +0200	[thread overview]
Message-ID: <20170901083143.GA20459@krava> (raw)
In-Reply-To: <CABPqkBRsKQaENz_6+9bnaHD93tPcAeCrrUfjAWv7d6Kgc_C_5A@mail.gmail.com>

On Fri, Sep 01, 2017 at 01:21:03AM -0700, Stephane Eranian wrote:

SNIP

> >> I am also surprised to see that perf record keep inherit=1 in
> >> system-wide mode. I don't think this
> >> is relavant in this mode. But the kernel this fails in this case,
> >> which I think is a bug. In system-wide
> >> mode, the attr-.no_inherit should be ignored. We can fix perf record
> >> to avoid this in system-wide.
> >>
> >> The cmdline above works for both per-thread and system-wide modes.
> >>
> >> So I think we do not need my patch or variations thereof, everything
> >> is there, though a bit difficult
> >> to combine.
> >
> > hum, how about we introduce new modifier to attach timing info, like:
> >   $ perf record -e cycles:T ....
> >
> > modifiers might be scares resource, but we don't add them every day,
> > and this requirement looks generic
> >
> It is not just a matter of modifier, you need to have the kernel
> record just what you want.
> AFAIK, the only way for the the kernel to record timings on sampling events
> is to force PERF_SAMPLE_READ. So the T modifier would have to also set
> that format,
> at which point, I wonder how useful it is compared to S.

well :S is meant to be used for leader sampling,
so in addition to what you described it also
disables sampling on all other group members,
which I don't think you want

> 
> Alternatively, we could improve the kernel to support recording timing with
> PERF_SAMPLE_TIMINGS as a pair of u64 to represent time_enabled, time_running.
> That would avoid the whole PERF_SAMPLE_READ and the extra u64 it records.
> Recording the value of the sampling event is not very useful because
> it keeps being
> reset for each period.

sounds good.. or if we mind taking another bit out of the sample_type
for this we could have new read_format bit PERF_FORMAT_NO_COUNT, which
would omit the count values

jirka

      reply	other threads:[~2017-09-01  8:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-21 19:14 [PATCH] perf record: enable multiplexing scaling via -R Stephane Eranian
2017-08-21 23:02 ` Andi Kleen
2017-08-22  0:13   ` Stephane Eranian
2017-08-22  1:25     ` Andi Kleen
2017-08-22  7:03       ` Jiri Olsa
2017-08-22  7:24         ` Stephane Eranian
2017-08-28 19:27           ` Stephane Eranian
2017-08-28 20:41             ` Andi Kleen
2017-08-31  6:21               ` Stephane Eranian
2017-09-01  7:55                 ` Jiri Olsa
2017-09-01  7:59                 ` Jiri Olsa
2017-09-01  8:21                   ` Stephane Eranian
2017-09-01  8:31                     ` Jiri Olsa [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=20170901083143.GA20459@krava \
    --to=jolsa@redhat.com \
    --cc=acme@redhat.com \
    --cc=andi@firstfloor.org \
    --cc=eranian@google.com \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    /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).