lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151218085538.GE30339@gmail.com>
Date:	Fri, 18 Dec 2015 09:55:38 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	linux-kernel@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	David Ahern <dsahern@...il.com>, Jiri Olsa <jolsa@...nel.org>,
	Kan Liang <kan.liang@...el.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Wang Nan <wangnan0@...wei.com>
Subject: Re: [GIT PULL 00/43] perf/core new feature: 'perf stat record/report'


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

> 
> * Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
> 
> > From: Arnaldo Carvalho de Melo <acme@...hat.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@...andy 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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ