From: Kan Liang <kan.liang@intel.com>
To: acme@kernel.org
Cc: a.p.zijlstra@chello.nl, 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 V4 0/7] Freq/CPU%/CORE_BUSY% support
Date: Tue, 18 Aug 2015 10:16:34 -0400 [thread overview]
Message-ID: <1439907401-37226-1-git-send-email-kan.liang@intel.com> (raw)
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.
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
Changes since V2:
- Introduce generic FEAT for CPU related data stored
- Make cpu max freq and msr type part of perf_session_env
- rename cpu_u to cpu_util
- Don't save sample value in perf_sample and discards new iterator.
Calculating the freq_perf_info in add_entry_cb callback
- Introduce symbol_conf.freq_perf_type for related hpp column visibility
Changes since V3:
- add a identifier 'tag' for CPU attributes, max frequency.
- add backpointers to evlist for env, and evsel for evlist.
- Use bitmask for freq_perf_type
- Replace macros by functions to caculate freq, cpu_util and core_busy
- Move all caculation codes under symbol_conf.show_freq_perf condition.
Arnaldo Carvalho de Melo (1):
perf evsel: Add a backpointer to the evlist a evsel is in
Kan Liang (6):
perf,tools: introduce generic FEAT for CPU attributes
perf,tools: read msr pmu type from header.
perf,tools: rename perf_session_env and add backpointer to evlist
perf,tools: Dump per-sample freq/CPU%/CORE_BUSY% in report -D
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/arch/common.c | 4 +-
tools/perf/arch/common.h | 2 +-
tools/perf/builtin-report.c | 56 +++++++++++++++++++++++++
tools/perf/ui/browser.h | 4 +-
tools/perf/ui/browsers/header.c | 2 +-
tools/perf/ui/browsers/hists.c | 12 +++---
tools/perf/ui/hist.c | 71 +++++++++++++++++++++++++++++---
tools/perf/util/cpumap.c | 32 ++++++++++++++
tools/perf/util/cpumap.h | 1 +
tools/perf/util/evlist.c | 2 +
tools/perf/util/evlist.h | 1 +
tools/perf/util/evsel.c | 2 +
tools/perf/util/evsel.h | 4 ++
tools/perf/util/header.c | 54 ++++++++++++++++++++++++
tools/perf/util/header.h | 12 +++++-
tools/perf/util/hist.h | 7 +++-
tools/perf/util/session.c | 36 +++++++++++++---
tools/perf/util/session.h | 64 ++++++++++++++++++++++++++++
tools/perf/util/sort.c | 3 ++
tools/perf/util/sort.h | 3 ++
tools/perf/util/symbol.c | 4 +-
tools/perf/util/symbol.h | 16 +++++--
23 files changed, 373 insertions(+), 31 deletions(-)
--
1.8.3.1
next reply other threads:[~2015-08-18 21:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-18 14:16 Kan Liang [this message]
2015-08-18 14:16 ` [PATCH V4 1/7] perf,tools: introduce generic FEAT for CPU attributes Kan Liang
2015-08-21 8:55 ` Jiri Olsa
2015-08-21 8:57 ` Jiri Olsa
2015-08-21 14:22 ` Liang, Kan
2015-08-18 14:16 ` [PATCH V4 2/7] perf,tools: read msr pmu type from header Kan Liang
2015-08-18 14:16 ` [PATCH V4 3/7] perf,tools: rename perf_session_env and add backpointer to evlist Kan Liang
2015-08-18 14:16 ` [PATCH V4 4/7] perf evsel: Add a backpointer to the evlist a evsel is in Kan Liang
2015-08-18 14:16 ` [PATCH V4 5/7] perf,tools: Dump per-sample freq/CPU%/CORE_BUSY% in report -D Kan Liang
2015-08-18 14:16 ` [PATCH V4 6/7] perf,tools: caculate and save freq/CPU%/CORE_BUSY% in he_stat Kan Liang
2015-08-18 14:16 ` [PATCH V4 7/7] perf,tools: Show freq/CPU%/CORE_BUSY% in perf report --stdio Kan Liang
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=1439907401-37226-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