mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kan.liang@intel.com
To: a.p.zijlstra@chello.nl, acme@kernel.org
Cc: luto@kernel.org, mingo@redhat.com, eranian@google.com,
	ak@linux.intel.com, mark.rutland@arm.com,
	adrian.hunter@intel.com, jolsa@kernel.org, namhyung@kernel.org,
	linux-kernel@vger.kernel.org, Kan Liang <kan.liang@intel.com>
Subject: [PATCH 0/5] Freq/CPU%/CORE_BUSY% support
Date: Thu, 23 Jul 2015 07:49:38 -0400	[thread overview]
Message-ID: <1437652183-62080-1-git-send-email-kan.liang@intel.com> (raw)

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

(Re-send. Missed "From: Kan Liang <kan.liang@intel.com>" in last mail)
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

Kan Liang (5):
  perf,tools: introduce get_cpu_max_freq
  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              | 24 +++++++++++
 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/hist.c                   | 51 ++++++++++++++++++++---
 tools/perf/util/hist.h                   |  5 +++
 tools/perf/util/pmu.h                    |  2 +
 tools/perf/util/session.c                | 50 +++++++++++++++++++---
 tools/perf/util/session.h                | 28 +++++++++++++
 tools/perf/util/sort.c                   |  3 ++
 tools/perf/util/sort.h                   |  3 ++
 tools/perf/util/symbol.h                 |  9 +++-
 tools/perf/util/util.c                   |  2 +
 19 files changed, 293 insertions(+), 21 deletions(-)

-- 
1.8.3.1


             reply	other threads:[~2015-07-23 19:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23 11:49 kan.liang [this message]
2015-07-23 11:49 ` [PATCH 1/5] perf,tools: introduce get_cpu_max_freq kan.liang
2015-07-23 11:49 ` [PATCH 2/5] perf,tools: Dump per-sample freq/CPU%/CORE_BUSY% in report -D kan.liang
2015-07-23 11:49 ` [PATCH 3/5] perf,tools: save misc sample read value in struct perf_sample kan.liang
2015-07-23 11:49 ` [PATCH 4/5] perf,tools: caculate and save freq/CPU%/CORE_BUSY% in he_stat kan.liang
2015-07-23 11:49 ` [PATCH 5/5] perf,tools: Show freq/CPU%/CORE_BUSY% in perf report --stdio kan.liang
  -- strict thread matches above, loose matches on Subject: below --
2015-07-23 11:46 [PATCH 0/5] Freq/CPU%/CORE_BUSY% support Kan Liang
2015-07-23 19:10 ` Stephane Eranian

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=1437652183-62080-1-git-send-email-kan.liang@intel.com \
    --to=kan.liang@intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    /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

Powered by JetHome