linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Adrian Hunter <adrian.hunter@intel.com>,
	Borislav Petkov <bp@suse.de>, David Ahern <dsahern@gmail.com>,
	Don Zickus <dzickus@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	He Kuang <hekuang@huawei.com>, Jiri Olsa <jolsa@redhat.com>,
	Li Zhang <zhlcindy@linux.vnet.ibm.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Naohiro Aota <naota@elisp.net>,
	Peter Zijlstra <peterz@infradead.org>,
	pi3orama@163.com, Stephane Eranian <eranian@google.com>,
	Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>,
	Wang Nan <wangnan0@huawei.com>, Zefan Li <lizefan@huawei.com>
Subject: Re: [RFC] hotkey for disabling/enabling events in 'perf top' TUI was Re: [GIT PULL 0/8] perf/core improvements and fixes
Date: Mon, 22 Jun 2015 11:52:56 -0300	[thread overview]
Message-ID: <20150622145256.GD13937@kernel.org> (raw)
In-Reply-To: <20150619230540.GA8876@gmail.com>

Em Sat, Jun 20, 2015 at 01:05:40AM +0200, Ingo Molnar escreveu:
> * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > Em Fri, Jun 19, 2015 at 08:27:11AM +0200, Ingo Molnar escreveu:
> > > * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > > > Em Thu, Jun 18, 2015 at 10:58:13PM +0200, Ingo Molnar escreveu:
> > > > > * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > > > > > z             Toggle zeroing of samples 
> > > > > > /             Filter symbol by name 

> > > > > Is 'f' (for 'freeze') still available?

> > > > It is available in both the 'report'/'top' (aka the "hists" browser) and in the 
> > > > annotate browser, so I'll go with it, and leave CTRL+z alone, then make it it 
> > > > suspend.

> > > Sounds good to me!

> > I'm fixing these issues now and a mildly crazy idea ocurred to me: now we can go 
> > from 'top' to 'report' and back, but only if we start in 'perf top', but I think 
> > we could go from 'perf report' to 'perf top' mode too, i.e. start with a 
> > perf.data file, then enable collecting more samples that would then be added to 
> > the existing histograms, etc.
> > 
> > Unsure if this would be useful tho ;-) Its just that it may be easy to do and 
> > would be another step into having it all integrated.
> 
> So I think the following would be useful for perf report: if we recorded the 
> precise command line used, in the perf.data.
> 
> So if someone types:
> 
>     perf record -e cache-misses make -j16 kernel
> 
> then we'd have the whole command line in the perf.data:
> 
>     "perf record -e cache-misses make -j16 kernel"
> 
> and if there was a hotkey to take new samples, using the exact same workload.
> 
> This is non-trivial though.

Right, can be tricky, but we could start with the low hanging fruit:
system wide sessions, then to the other more focussed "live targets",
i.e. existing pids (thread "families"), tids (single threads), CPUs,
cgroups, etc.

Easier because we don't have to recreate a workload, where we may need
to be at a particular cwd, etc.
 
> Going from 'perf report' to 'perf top' would be intuitive if the 'perf record' 
> before was 'perf top' alike, for example:
> 
>     perf record -a sleep 10
> 
> or:
> 
>     perf record -a
>     <Ctrl-C>
> 
> in that case going to 'perf top' is a natural extension of the profiling session.

Agreed, wrote the low hanging fruit part before reading the rest of the
message, obviously ;-)

I.e. ultimately what I would like to achieve would be to merge
builtin-top.c with buildin-report.c and make just the tool name decide
if it starts dynamicly or statically.

At some point 'record' would get merged too, and fully integrated in the
workflow, i.e. one could have at least the following modes:

- record: do nothing more than store the ring buffer in a safe place for
          later processing, be fast at that!

- top: do not record anything, process it straight away and put it into
       histogram buckets according to --sort

- report: do not record anything, process something recorded previously,
          according to --sort

- record + top: do both of these, allow stopping both and looking at
                the last session, or previous ones, allow creating
                slices, etc.

Annotate is already integrated in all this, you can go from either
dynamic or static to annotation and it will show the percentages/periods
per line both staticly and dynamicly.

For slicing, 'probe' integration will come in handy, but the plate is
full already for a while 8-)

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

      reply	other threads:[~2015-06-22 14:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 21:22 [GIT PULL 0/8] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-06-17 21:22 ` [PATCH 1/8] perf tools: Ignore .config-detected in .gitignore Arnaldo Carvalho de Melo
2015-06-17 21:22 ` [PATCH 2/8] perf tools: Fix a problem when opening old perf.data with different byte order Arnaldo Carvalho de Melo
2015-06-17 21:22 ` [PATCH 3/8] perf tools: Move libtraceevent dynamic list to separated LDFLAGS variable Arnaldo Carvalho de Melo
2015-06-17 21:22 ` [PATCH 4/8] perf probe: Show usage even if the last event is skipped Arnaldo Carvalho de Melo
2015-06-17 21:22 ` [PATCH 5/8] perf probe: Speed up perf probe --list by caching debuginfo Arnaldo Carvalho de Melo
2015-06-17 21:22 ` [PATCH 6/8] perf trace: Fix race condition at the end of started workloads Arnaldo Carvalho de Melo
2015-06-17 21:22 ` [PATCH 7/8] perf evlist: Add toggle_enable() method Arnaldo Carvalho de Melo
2015-06-17 21:22 ` [PATCH 8/8] perf top: Allow disabling/enabling events dynamicly Arnaldo Carvalho de Melo
2015-06-18  7:40 ` [GIT PULL 0/8] perf/core improvements and fixes Ingo Molnar
2015-06-18 20:18   ` [RFC] hotkey for disabling/enabling events in 'perf top' TUI was " Arnaldo Carvalho de Melo
2015-06-18 20:58     ` Ingo Molnar
2015-06-18 21:39       ` Arnaldo Carvalho de Melo
2015-06-19  6:27         ` Ingo Molnar
2015-06-19 20:07           ` Arnaldo Carvalho de Melo
2015-06-19 23:05             ` Ingo Molnar
2015-06-22 14:52               ` 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=20150622145256.GD13937@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=bp@suse.de \
    --cc=dsahern@gmail.com \
    --cc=dzickus@redhat.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=hekuang@huawei.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=naota@elisp.net \
    --cc=peterz@infradead.org \
    --cc=pi3orama@163.com \
    --cc=sukadev@linux.vnet.ibm.com \
    --cc=wangnan0@huawei.com \
    --cc=zhlcindy@linux.vnet.ibm.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).