public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <kernel@kyup.com>
To: Peter Zijlstra <peterz@infradead.org>, jolsa@redhat.com
Cc: "Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
	andi@firstfloor.org
Subject: Strange behavior of perf top with PEBS
Date: Wed, 20 Jul 2016 16:28:34 +0300	[thread overview]
Message-ID: <578F7C82.6090500@kyup.com> (raw)

Hello,

Running perf version 4.4.14.g0cb188d (no modification to the PMU/perf
code) I observed that "perf top" counts no cycles and produces no
output. After a bit of head scratching and testing I figured that
running "perf top -e cycles" actually works whereas the default option
is equivalent to running "perf top -e cycles:p". So the latter version
seems to not work on my machine.

Here is what my CPU is:

cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Xeon(R) CPU           E5450  @ 3.00GHz
stepping	: 6
microcode	: 0x60f
cpu MHz		: 2992.637
cache size	: 6144 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 4
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
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 lm
constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64
monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 lahf_lm
dtherm tpr_shadow vnmi flexpriority

And the PEBS that is detected:
Performance Events: PEBS fmt0+, 4-deep LBR, Core2 events, Intel PMU driver

Looking at the code in arch/x86/kernel/cpu/perf_event_intel_ds.c it
seems that the number after the fmt decides the level (according to
http://man7.org/linux/man-pages/man1/perf-list.1.html#EVENT%C2%A0MODIFIERS)
So in this case fmt0 should means that :p is not supported but perf top
doesn't give any error. Increasing the number of
p's : "perf top -e cycles:pp" shows the following error:

'precise' request may not be supported. Try removing 'p' modifier.

In this case shouldn't adding even a single :p modifier cause the
aforementioned error to be printed?

             reply	other threads:[~2016-07-20 13:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-20 13:28 Nikolay Borisov [this message]
2016-07-20 14:34 ` Strange behavior of perf top with PEBS Jiri Olsa
2016-07-20 14:36   ` Nikolay Borisov
2016-07-20 14:38   ` Jiri Olsa
2016-07-26 11:30     ` Nikolay Borisov
2016-08-04 15:29       ` Jiri Olsa
2016-08-05  9:30         ` Nikolay Borisov
2016-08-05 10:23           ` Jiri Olsa
2016-08-08 13:03             ` Peter Zijlstra
2016-08-08 13:19               ` Greg Kroah-Hartman

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=578F7C82.6090500@kyup.com \
    --to=kernel@kyup.com \
    --cc=andi@firstfloor.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox