linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Petlan <Michael@redhat.com>
To: linux-perf-users@vger.kernel.org
Subject: hwcache events and kernel/userspace event modifiers - bug?
Date: Wed, 22 Jun 2016 16:16:29 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LRH.2.20.1606221605280.5594@Diego> (raw)

Hi,

when using the "k" and "u" event modifiers in order to exclude
kernel or userspace counting, the "hw" events print the modifier
along with the event names in results. When doing the same with
a "hwcache" event, the report shows events without modifiers.

$ perf stat -e cycles:u -e L1-dcache-loads:u -- true

  Performance counter stats for 'true':

            153,771      cycles:u
             24,457      L1-dcache-loads

        0.001813975 seconds time elapsed

While "cycles:u" has the ":u" modifier, "L1-dcache-loads" does
not. Despite that, the kernel/userspace excluding seem to work:

$ perf stat -e L1-dcache-loads:u -e L1-dcache-loads:k -e L1-dcache-loads:ku -- ls

  Performance counter stats for 'ls':

            146,714      L1-dcache-loads
            305,080      L1-dcache-loads
            451,794      L1-dcache-loads

        0.002221714 seconds time elapsed

Where 146714 + 305080 = 451794, so k+u is equal to ku.

This happens with the Arnaldo's latest perf/core perf, the same
as with the others.

Might that be a bug?
Thanks.

Michael

                 reply	other threads:[~2016-06-22 14:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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.LRH.2.20.1606221605280.5594@Diego \
    --to=michael@redhat.com \
    --cc=linux-perf-users@vger.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;
as well as URLs for NNTP newsgroup(s).