mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH V2 0/6] Freq/CPU%/CORE_BUSY% support
@ 2015-07-24 13:48 kan.liang
  2015-07-24 13:48 ` [PATCH V2 1/6] perf,tools: save cpu max freq in perf header kan.liang
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: kan.liang @ 2015-07-24 13:48 UTC (permalink / raw)
  To: a.p.zijlstra, acme
  Cc: luto, mingo, eranian, ak, mark.rutland, adrian.hunter, jolsa,
	namhyung, linux-kernel, Kan Liang

From: Kan Liang <kan.liang@intel.com>

This patch set supports per-sample freq/CPU%/CORE_BUSY% print in perf
report -D and --stdio.
For printing these information, the perf.data file must have been obtained
by group read and using special events cycles, ref-cycles, msr/tsc/,
msr/aperf/ or msr/mperf/.

 - Freq (MHz): The frequency during the sample interval. Needs cycles
   ref-cycles event.
 - CPU%: CPU utilization during the sample interval. Needs ref-cycles and
   msr/tsc/ events.
 - CORE_BUSY%: actual percent performance (APERF/MPERF%) during the
   sample interval. Needs msr/aperf/ and msr/mperf/ events.

For printing CPU% and CORE_BUSY%, please also apply the kernel patch.
http://marc.info/?l=linux-kernel&m=143747254926369&w=2

Here is an example:

$ perf record -e
'{cycles,ref-cycles,msr/tsc/,msr/mperf/,msr/aperf/}:S' ~/tchain_edit

$ perf report --stdio --group --show-freq-perf

                                 Overhead   FREQ MHz   CPU%  CORE_BUSY%
Command      Shared Object     Symbol
 ........................................  .........  .....  ..........
...........  ................  ......................

    99.54%  99.54%  99.53%  99.53%  99.53%       2301     96         99
tchain_edit  tchain_edit       [.] f3
     0.20%   0.20%   0.20%   0.20%   0.20%       2301     98         99
tchain_edit  tchain_edit       [.] f2
     0.05%   0.05%   0.05%   0.05%   0.05%       2300     98         99
tchain_edit  [kernel.vmlinux]  [k] read_tsc

Changes since V1:
 - Save cpu max freq to header when recording
 - Read cpu max freq and msr type from header when reporting

Kan Liang (6):
  perf,tools: save cpu max freq in perf header
  perf,tools: read cpu max freq and msr type from header
  perf,tools: Dump per-sample freq/CPU%/CORE_BUSY% in report -D
  perf,tools: save misc sample read value in struct perf_sample
  perf,tools: caculate and save freq/CPU%/CORE_BUSY% in he_stat
  perf,tools: Show freq/CPU%/CORE_BUSY% in perf report --stdio

 tools/perf/Documentation/perf-report.txt | 12 ++++++
 tools/perf/builtin-annotate.c            |  2 +-
 tools/perf/builtin-diff.c                |  2 +-
 tools/perf/builtin-report.c              | 22 ++++++++++
 tools/perf/perf.h                        |  1 +
 tools/perf/tests/hists_link.c            |  4 +-
 tools/perf/ui/hist.c                     | 71 +++++++++++++++++++++++++++++---
 tools/perf/util/cpumap.c                 | 32 ++++++++++++++
 tools/perf/util/cpumap.h                 |  2 +
 tools/perf/util/event.h                  | 11 +++++
 tools/perf/util/header.c                 | 56 +++++++++++++++++++++++++
 tools/perf/util/header.h                 |  4 ++
 tools/perf/util/hist.c                   | 51 ++++++++++++++++++++---
 tools/perf/util/hist.h                   |  5 +++
 tools/perf/util/session.c                | 49 +++++++++++++++++++---
 tools/perf/util/session.h                | 29 +++++++++++++
 tools/perf/util/sort.c                   |  3 ++
 tools/perf/util/sort.h                   |  3 ++
 tools/perf/util/symbol.h                 |  9 +++-
 tools/perf/util/util.c                   |  2 +
 20 files changed, 349 insertions(+), 21 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2015-07-28 13:55 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-24 13:48 [PATCH V2 0/6] Freq/CPU%/CORE_BUSY% support kan.liang
2015-07-24 13:48 ` [PATCH V2 1/6] perf,tools: save cpu max freq in perf header kan.liang
2015-07-26 16:31   ` Jiri Olsa
2015-07-26 16:32   ` Jiri Olsa
2015-07-24 13:48 ` [PATCH V2 2/6] perf,tools: read cpu max freq and msr type from header kan.liang
2015-07-24 13:48 ` [PATCH V2 3/6] perf,tools: Dump per-sample freq/CPU%/CORE_BUSY% in report -D kan.liang
2015-07-26 16:31   ` Jiri Olsa
2015-07-24 13:48 ` [PATCH V2 4/6] perf,tools: save misc sample read value in struct perf_sample kan.liang
2015-07-26 16:31   ` Jiri Olsa
2015-07-27 22:24     ` Liang, Kan
2015-07-28 13:55       ` Jiri Olsa
2015-07-24 13:48 ` [PATCH V2 5/6] perf,tools: caculate and save freq/CPU%/CORE_BUSY% in he_stat kan.liang
2015-07-26 16:31   ` Jiri Olsa
2015-07-27 17:19     ` Liang, Kan
2015-07-27 17:27       ` Jiri Olsa
2015-07-27 22:34     ` Liang, Kan
2015-07-28 13:50       ` Jiri Olsa
2015-07-26 16:31   ` Jiri Olsa
2015-07-27 17:11     ` Liang, Kan
2015-07-27 17:16       ` Jiri Olsa
2015-07-24 13:48 ` [PATCH V2 6/6] perf,tools: Show freq/CPU%/CORE_BUSY% in perf report --stdio kan.liang
2015-07-26 16:32   ` Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®