Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1724876

Re: [PATCH] perf record: enable multiplexing scaling via -R

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] perf record: enable multiplexing scaling via -R
Date 2017-09-01 10:40 +0200
Message-ID <ukPEC-1pS-3@gated-at.bofh.it> (permalink)
References (5 earlier) <ujxTs-16C-39@gated-at.bofh.it> <ujz8S-1KT-21@gated-at.bofh.it> <ukr9g-24P-5@gated-at.bofh.it> <ukP1V-TX-29@gated-at.bofh.it> <ukPuW-1kd-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] perf record: enable multiplexing scaling via -R Stephane Eranian <eranian@google.com> - 2017-08-28 21:30 +0200
  Re: [PATCH] perf record: enable multiplexing scaling via -R Andi Kleen <andi@firstfloor.org> - 2017-08-28 22:50 +0200
    Re: [PATCH] perf record: enable multiplexing scaling via -R Stephane Eranian <eranian@google.com> - 2017-08-31 08:30 +0200
      Re: [PATCH] perf record: enable multiplexing scaling via -R Jiri Olsa <jolsa@redhat.com> - 2017-09-01 10:00 +0200
        Re: [PATCH] perf record: enable multiplexing scaling via -R Stephane Eranian <eranian@google.com> - 2017-09-01 10:30 +0200
          Re: [PATCH] perf record: enable multiplexing scaling via -R Jiri Olsa <jolsa@redhat.com> - 2017-09-01 10:40 +0200
      Re: [PATCH] perf record: enable multiplexing scaling via -R Jiri Olsa <jolsa@redhat.com> - 2017-09-01 10:00 +0200

csiph-web