From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, David Ahern <dsahern@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@gmail.com>,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH V4 18/24] perf tools: Add Intel BTS support
Date: Wed, 6 May 2015 10:35:50 -0300 [thread overview]
Message-ID: <20150506133550.GA5203@kernel.org> (raw)
In-Reply-To: <5549BF5C.7070906@intel.com>
Em Wed, May 06, 2015 at 10:14:36AM +0300, Adrian Hunter escreveu:
> On 06/05/15 00:09, Arnaldo Carvalho de Melo wrote:
> > Em Tue, May 05, 2015 at 04:51:41PM -0300, Arnaldo Carvalho de Melo escreveu:
> >> c3278f0231e8 perf auxtrace: Add a hashtable for caching
> >> 73f75fb1bdc5 perf auxtrace: Add processing for AUX area tracing events
> >> [acme@ssdandy linux]$
> >> Will try processing these BTS first, i.e. do the reorder here,
> > Not that easy...
> I am not sure what can be done.
> Any version of perf will accept a PMU event, so users can select
> intel_bts or intel_pt even though the tools have no support :-(
> For example, a v4.0 perf with no auxtrace/intel_bs/intel_pt support
> but with a kernel that does support intel_bts or intel_pt
> gives:
> $ tools/perf/perf record -e intel_bts//u ls
> arch COPYING crypto drivers fs init Kbuild kernel MAINTAINERS mm perf.data README samples security tools virt
> block CREDITS Documentation firmware include ipc Kconfig lib Makefile net perf.data.old REPORTING-BUGS scripts sound usr
> [ perf record: Woken up 1 times to write data ]
> 0x1f00 [0x20]: failed to process type: 12
> Warning:
> Found 1 unknown events!
>
> Is this an older tool processing a perf.data file generated by a more recent tool?
Well, it is the tip/perf/core tool, that at the time was my
acme/perf/core branch.
I.e. if I try to follow the example, it will "work" and will
run, but no samples will be produced:
[root@ssdandy ~]# perf record -a -e intel_bts//u sleep 2
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.184 MB perf.data ]
[root@ssdandy ~]# perf evlist -v
intel_bts//u: type: 7, size: 112, { sample_period, sample_freq }: 4000,
sample_type: IP|TID|TIME|CPU|PERIOD, disabled: 1, inherit: 1,
exclude_kernel: 1, exclude_hv: 1, mmap: 1, comm: 1, freq: 1, task: 1,
sample_id_all: 1, mmap2: 1, comm_exec: 1
[root@ssdandy ~]# perf script
[root@ssdandy ~]# perf report --stdio --header
Error:
The perf.data file has no samples!
# ========
# captured on: Wed May 6 10:30:06 2015
# hostname : ssdandy.ghostprotocols.net
# os release : 4.0.0-rc6+
# perf version : 4.0.rc6.g3698da
# arch : x86_64
# nrcpus online : 8
# nrcpus avail : 8
# cpudesc : Intel(R) Core(TM) i7-2920XM CPU @ 2.50GHz
# cpuid : GenuineIntel,6,42,7
# total memory : 16318708 kB
# cmdline : /home/acme/bin/perf record -a -e intel_bts//u sleep 2
# event : name = intel_bts//u, , type = 7, size = 112, { sample_period,
# sample_freq } = 4000, sample_type = IP|TID|TIME|CPU|PERIOD, disabled =
# 1, inherit = 1, exclude_kernel = 1, exclude_hv
# HEADER_CPU_TOPOLOGY info available, use -I to display
# HEADER_NUMA_TOPOLOGY info available, use -I to display
# pmu mappings: cpu = 4, intel_bts = 7, software = 1, power = 6,
# tracepoint = 2, breakpoint = 5
# ========
#
[root@ssdandy ~]#
But...:
[root@ssdandy ~]# grep bts /proc/cpuinfo | head -1
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology
nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx
smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt
tsc_deadline_timer aes xsave avx lahf_lm ida arat epb pln pts dtherm
tpr_shadow vnmi flexpriority ept vpid xsaveopt
[root@ssdandy ~]#
BTS is there and:
[root@ssdandy ~]# grep -i model /proc/cpuinfo | head -2
model : 42
model name : Intel(R) Core(TM) i7-2920XM CPU @ 2.50GHz
[root@ssdandy ~]#
[ 0.055674] smpboot: CPU0: Intel(R) Core(TM) i7-2920XM CPU @ 2.50GHz (fam: 06, model: 2a, stepping: 07)
[ 0.055697] Performance Events: PEBS fmt1+, 16-deep LBR, SandyBridge events, full-width counters, Intel PMU driver.
[ 0.055714] perf_event_intel: PEBS disabled due to CPU errata, please upgrade microcode
[ 0.055716] ... version: 3
[ 0.055717] ... bit width: 48
[ 0.055718] ... generic registers: 4
[ 0.055719] ... value mask: 0000ffffffffffff
[ 0.055720] ... max period: 0000ffffffffffff
[ 0.055720] ... fixed-purpose events: 3
[ 0.055721] ... event mask: 000000070000000f
[ 0.056454] x86: Booting SMP configuration:
[ 0.056456] .... node #0, CPUs: #1
[ 0.067656] Disabled fast string operations
[ 0.069850] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
<SNIP>
[ 0.169495] perf_event_intel: PMU erratum BJ122, BV98, HSD29 worked around, HT is on
Probably I need some firmware upgrade? Forgot where to pick those, will search
later :-\
> If that is not the case, consider reporting to linux-kernel@vger.kernel.org.
>
> [ perf record: Captured and wrote 0.009 MB perf.data ]
> $ tools/perf/perf report --header --stdio
> Warning:
> Found 1 unknown events!
>
> Is this an older tool processing a perf.data file generated by a more recent tool?
>
> If that is not the case, consider reporting to linux-kernel@vger.kernel.org.
>
> # ========
> # captured on: Wed May 6 09:55:00 2015
> # hostname : bdw03
> # os release : 4.0.0-rc6+
> # perf version : 4.0.g39a880
> # arch : x86_64
> # nrcpus online : 4
> # nrcpus avail : 4
> # cpudesc : Intel(R) Core(TM) i5-5###U CPU @ 2.20GHz
> # cpuid : GenuineIntel,6,61,4
> # total memory : 3960092 kB
> # cmdline : /home/ahunter/git/linux/tools/perf/perf record -e intel_bts//u ls
> # event : name = intel_bts//u, type = 7, config = 0x0, config1 = 0x0, config2 = 0x0, excl_usr = 0, excl_kern = 1, excl_host = 0, excl_guest = 0, precise_ip = 0, attr_mmap2 = 1, attr_mmap = 1, attr_mm
> # HEADER_CPU_TOPOLOGY info available, use -I to display
> # HEADER_NUMA_TOPOLOGY info available, use -I to display
> # pmu mappings: cpu = 4, intel_bts = 7, software = 1, tracepoint = 2, breakpoint = 5, intel_pt = 6
> # ========
> #
>
>
> Perhaps we should disallow intel_bts and intel_pt PMU events
> explicitly and put that change back to v4.1 stable at least?
>
> I tried adding:
>
> diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
> index 244c66f..5d3ab7c 100644
> --- a/tools/perf/util/pmu.c
> +++ b/tools/perf/util/pmu.c
> @@ -442,6 +442,10 @@ static struct perf_pmu *pmu_lookup(const char *name)
> LIST_HEAD(aliases);
> __u32 type;
>
> + /* No support for intel_bts or intel_pt so disallow them */
> + if (!strcmp(name, "intel_bts") || !strcmp(name, "intel_pt"))
> + return NULL;
> +
> /*
> * The pmu data we store & need consists of the pmu
> * type value and format definitions. Load both right
>
>
> And now I get:
>
> $ tools/perf/perf record -e intel_bts//u ls
> invalid or unsupported event: 'intel_bts//u'
> Run 'perf list' for a list of valid events
Unsure, when did we start accepting intel_bts in event names? In this patchkit?
- Arnaldo
> usage: perf record [<options>] [<command>]
> or: perf record [<options>] -- <command> [<options>]
>
> -e, --event <event> event selector. use 'perf list' to list available events
>
>
next prev parent reply other threads:[~2015-05-06 16:21 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-30 14:37 [PATCH V4 00/24] perf tools: Introduce an abstraction for AUX Area and Instruction Tracing Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 01/24] perf report: Fix placement of itrace option in documentation Adrian Hunter
2015-05-06 3:15 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 02/24] perf tools: Add AUX area tracing index Adrian Hunter
2015-05-04 20:02 ` Jiri Olsa
2015-05-06 3:16 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 03/24] perf tools: Hit all build ids when AUX area tracing Adrian Hunter
2015-05-04 20:03 ` Jiri Olsa
2015-05-06 3:16 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 04/24] perf tools: Add build option NO_AUXTRACE to exclude " Adrian Hunter
2015-05-04 20:06 ` Jiri Olsa
2015-05-06 3:16 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 05/24] perf auxtrace: Add option to synthesize events for transactions Adrian Hunter
2015-05-04 20:08 ` Jiri Olsa
2015-05-06 3:17 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 06/24] perf tools: Add support for PERF_RECORD_AUX Adrian Hunter
2015-05-04 20:09 ` Jiri Olsa
2015-05-06 3:17 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 07/24] perf tools: Add support for PERF_RECORD_ITRACE_START Adrian Hunter
2015-05-04 20:10 ` Jiri Olsa
2015-05-06 3:17 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 08/24] perf tools: Add AUX area tracing Snapshot Mode Adrian Hunter
2015-05-04 20:10 ` Jiri Olsa
2015-05-06 3:17 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 09/24] perf record: Add AUX area tracing Snapshot Mode support Adrian Hunter
2015-05-04 20:11 ` Jiri Olsa
2015-05-06 3:18 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 10/24] perf auxtrace: Add Intel PT as an AUX area tracing type Adrian Hunter
2015-05-04 20:11 ` Jiri Olsa
2015-04-30 14:37 ` [PATCH V4 11/24] perf tools: Add Intel PT packet decoder Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 12/24] perf tools: Add Intel PT instruction decoder Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 13/24] perf tools: Add Intel PT log Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 14/24] perf tools: Add Intel PT decoder Adrian Hunter
2015-05-11 13:22 ` Arnaldo Carvalho de Melo
2015-05-21 12:58 ` Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 15/24] perf tools: Add Intel PT support Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 16/24] perf tools: Take Intel PT into use Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 17/24] perf tools: Allow auxtrace data alignment Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 18/24] perf tools: Add Intel BTS support Adrian Hunter
2015-05-05 19:51 ` Arnaldo Carvalho de Melo
2015-05-05 21:09 ` Arnaldo Carvalho de Melo
2015-05-06 7:14 ` Adrian Hunter
2015-05-06 13:35 ` Arnaldo Carvalho de Melo [this message]
2015-05-07 7:05 ` Adrian Hunter
2015-05-08 19:41 ` Arnaldo Carvalho de Melo
2015-04-30 14:37 ` [PATCH V4 19/24] perf tools: Output sample flags and insn_len from intel_pt Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 20/24] perf tools: Output sample flags and insn_len from intel_bts Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 21/24] perf tools: Intel PT to always update thread stack trace number Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 22/24] perf tools: Intel BTS " Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 23/24] perf tools: Add example call-graph script Adrian Hunter
2015-04-30 14:37 ` [PATCH V4 24/24] perf tools: Put itrace options into an asciidoc include Adrian Hunter
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=20150506133550.GA5203@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@gmail.com \
--cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.