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


Groups > linux.kernel > #1294539

Re: [GIT PULL 00/43] perf/core new feature: 'perf stat record/report'

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [GIT PULL 00/43] perf/core new feature: 'perf stat record/report'
Date 2015-12-18 10:00 +0100
Message-ID <qGZ3m-3mL-51@gated-at.bofh.it> (permalink)
References <qGMIN-3MF-3@gated-at.bofh.it> <qGYTE-3jm-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* Ingo Molnar <mingo@kernel.org> wrote:

> 
> * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> 
> > From: Arnaldo Carvalho de Melo <acme@redhat.com>
> > 
> > Hi Ingo,
> > 
> > 	Please consider pulling, cool new feature! This is on top of the
> > perf-core-for-mingo-2.1 tag, with that RHEL6.7 bugfix, I had also to go
> > over this one fixing stuff in many spots :-\
> > 
> > - Arnaldo
> > 
> > The following changes since commit 1843b4e057b7717db21a3ad96fa16d6b4ee8f6c4:
> > 
> >   tools subcmd: Rename subcmd header include guards (2015-12-17 14:27:14 -0300)
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-3
> > 
> > for you to fetch changes up to 89af4e05c21d68f22e07fe66940ea675615a49ed:
> > 
> >   perf stat report: Allow to override aggr_mode (2015-12-17 16:30:30 -0300)
> > 
> > ----------------------------------------------------------------
> > perf/core improvement.
> > 
> > User visible:
> > 
> > - Generate perf.data files from 'perf stat', to tap into the scripting
> >   capabilities perf has instead of defining a 'perf stat' specific scripting
> >   support to calculate event ratios, etc. Simple example:
> > 
> >   $ perf stat record -e cycles usleep 1
> > 
> >    Performance counter stats for 'usleep 1':
> > 
> >          1,134,996      cycles
> > 
> >        0.000670644 seconds time elapsed
> > 
> >   $ perf stat report
> > 
> >    Performance counter stats for '/home/acme/bin/perf stat record -e cycles usleep 1':
> > 
> >          1,134,996      cycles
> > 
> >        0.000670644 seconds time elapsed
> > 
> >   $
> > 
> >   It generates PERF_RECORD_ userspace records to store the details:
> > 
> >   $ perf report -D | grep PERF_RECORD
> >   0xf0 [0x28]: PERF_RECORD_THREAD_MAP nr: 1 thread: 27637
> >   0x118 [0x12]: PERF_RECORD_CPU_MAP nr: 1 cpu: 65535
> >   0x12a [0x40]: PERF_RECORD_STAT_CONFIG
> >   0x16a [0x30]: PERF_RECORD_STAT
> >   -1 -1 0x19a [0x40]: PERF_RECORD_MMAP -1/0: [0xffffffff81000000(0x1f000000) @ 0xffffffff81000000]: x [kernel.kallsyms]_text
> >   0x1da [0x18]: PERF_RECORD_STAT_ROUND
> >   [acme@ssdandy linux]$
> > 
> >   An effort was made to make perf.data files generated like this to not
> >   generate cryptic messages when processed by older tools.
> > 
> >   The 'perf script' bits need rebasing, will go up later.
> 
> Nice feature!

I tried it out, and it works as expected, cool stuff!

Btw., a very small usability observation: maybe 'perf report' should be enhanced 
to recognize 'stat record' generated perf.data files, and display a matching 
message?

Right now if I do 'perf report' on such a perf.data then I'll get a "no samples" 
TUI message, which is technically correct but somewhat misleading.

It's no big deal - and maybe you guys can think of a better solution than 
displaying an error message: maybe 'perf report' should automatically switch to 
'perf stat report'?

It would be a bit shorter to type as well and would continue to strengthen the 
very nice level of integration that the various subcommands already have today.

But maybe it would be confusing - don't know.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[GIT PULL 00/43] perf/core new feature: 'perf stat record/report' Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 08/43] perf cpu_map: Add perf_event__fprintf_cpu_map function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 06/43] perf cpu_map: Add cpu_map event synthesize function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 10/43] perf tools: Add stat config event synthesize function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 19/43] perf tools: Add event_update event unit type Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 09/43] perf tools: Add stat config user level event Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 25/43] perf tools: Introduce stat perf.data header feature Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 24/43] perf report: Display newly added events in raw dump Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 07/43] perf cpu_map: Add cpu_map__new_event function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 40/43] perf stat report: Move csv_sep initialization before report command Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 05/43] perf cpu_map: Add cpu_map user level event Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 18/43] perf tools: Add event_update user level event Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 22/43] perf tools: Add event_update event cpus type Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 29/43] perf evlist: Export id_add_fd() Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 01/43] perf thread_map: Add thread_map user level event Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 17/43] perf tools: Add stat events fprintf functions Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 39/43] perf stat report: Add support to initialize aggr_map from file Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 36/43] perf stat report: Add report command Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 03/43] perf thread_map: Add thread_map__new_event function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 16/43] perf tools: Add stat round event synthesize function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 28/43] perf stat record: Synthesize stat record data Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 35/43] perf stat record: Synthesize event update events Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 13/43] perf tools: Add stat event synthesize function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 26/43] perf stat record: Add record command Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 15/43] perf tools: Add stat round user level event Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 21/43] perf tools: Add event_update event name type Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 20/43] perf tools: Add event_update event scale type Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 33/43] perf stat record: Write stat round events on record Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 14/43] perf tools: Add stat event read function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
  [PATCH 02/43] perf thread_map: Add thread_map event sythesize function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:10 +0100
  [PATCH 04/43] perf thread_map: Add perf_event__fprintf_thread_map function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:10 +0100
  Re: [GIT PULL 00/43] perf/core new feature: 'perf stat record/report' Ingo Molnar <mingo@kernel.org> - 2015-12-18 09:50 +0100
    Re: [GIT PULL 00/43] perf/core new feature: 'perf stat record/report' Ingo Molnar <mingo@kernel.org> - 2015-12-18 10:00 +0100
      Re: [GIT PULL 00/43] perf/core new feature: 'perf stat record/report' Jiri Olsa <jolsa@redhat.com> - 2015-12-18 11:20 +0100

csiph-web