mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vince Weaver <vincent.weaver@maine.edu>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: perf: rdpmc mmap page time_enabled issue
Date: Tue, 14 Mar 2017 23:41:10 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.2.20.1703142321360.29558@macbook-air> (raw)


So another obscure rdpmc problem, turned up by the PAPI regression tests.

If you use rdpmc, and your event is attached measuring another process,
and then you ENABLE/DISABLE/ENABLE/rdpmc the event

somehow the userpg->time_enabled field gets a weird value and that 
completely confuses code expecting enabled!=running to mean multiplexing 
is happening.

Example:

Trying attach:
	* RDPMC 1 Event 0 -- count: 1058381 enabled ffe6935332c70240 running: 9d14f
	* RDPMC 1 Event 1 -- count: 623980 enabled ffe6935332c829b3 running: 9d350

the rdpmc count and running values are expected, but the enabled value is way 
off, it should match the running value.

If you want to test this out, I have a test case in perf_event_tests, 
(github.com/deater/perf_event_tests.git)
	tests/rdpmc/rdpmc_multiattach_papi

Vince

             reply	other threads:[~2017-03-15  3:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15  3:41 Vince Weaver [this message]
2017-03-17 14:37 ` perf: negative " Vince Weaver

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=alpine.DEB.2.20.1703142321360.29558@macbook-air \
    --to=vincent.weaver@maine.edu \
    --cc=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.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 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®