mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yang Jihong <yangjihong1@huawei.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: <mingo@redhat.com>, <acme@kernel.org>, <mark.rutland@arm.com>,
	<alexander.shishkin@linux.intel.com>, <jolsa@kernel.org>,
	<namhyung@kernel.org>, <tglx@linutronix.de>, <bp@alien8.de>,
	<dave.hansen@linux.intel.com>, <x86@kernel.org>, <hpa@zytor.com>,
	<linux-perf-users@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf/x86: Unify format of events sysfs show
Date: Fri, 25 Mar 2022 09:38:47 +0800	[thread overview]
Message-ID: <a4a0758f-b183-8244-d59c-10d31d8e0a3a@huawei.com> (raw)
In-Reply-To: <20220324101107.GC8939@worktop.programming.kicks-ass.net>

Hi Peter,

On 2022/3/24 18:11, Peter Zijlstra wrote:
> On Thu, Mar 24, 2022 at 11:19:57AM +0800, Yang Jihong wrote:
>> Sysfs show formats of files in /sys/devices/cpu/events/ are not unified,
>> some end with "\n", and some do not. Modify sysfs show format of events
>> defined by EVENT_ATTR_STR to end with "\n".
> 
> Did you test all the userspace that consumes these fields to make sure
> none of them break? I suppose it's mostly perf tool, but I'm fairly sure
> there's others out there as well.
> 
Yes, I tested "perf record" and "perf stat" commands on my machine 
against the modified events, and the results are as follows:

$ perf stat -e 
topdown-fetch-bubbles,topdown-recovery-bubbles,topdown-slots-issued,topdown-slots-retired,topdown-total-slots 
-a sleep 1

  Performance counter stats for 'system wide':

            2356235      topdown-fetch-bubbles     #   1211.9% frontend 
bound
             226132      topdown-recovery-bubbles  #    182.9% bad 
speculation
            1073595      topdown-slots-issued      #  -1780.4% backend bound
             944133      topdown-slots-retired     #    485.6% retiring
             194420      topdown-total-slots

        0.987394388 seconds time elapsed


$ perf record -e 
topdown-fetch-bubbles,topdown-recovery-bubbles,topdown-slots-issued,topdown-slots-retired,topdown-total-slots 
-a sleep 1
Lowering default frequency rate from 4000 to 3000.
Please consider tweaking /proc/sys/kernel/perf_event_max_sample_rate.
Couldn't synthesize bpf events.
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.300 MB perf.data (2620 samples) ]

$ perf evlist
topdown-fetch-bubbles
topdown-recovery-bubbles
topdown-slots-issued
topdown-slots-retired
topdown-total-slots
dummy:HG

.


Thanks,
Jihong
> .
> 

  reply	other threads:[~2022-03-25  1:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24  3:19 Yang Jihong
2022-03-24 10:11 ` Peter Zijlstra
2022-03-25  1:38   ` Yang Jihong [this message]
2022-03-28 10:25     ` Peter Zijlstra
2022-04-05  8:36 ` [tip: perf/core] " tip-bot2 for Yang Jihong

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=a4a0758f-b183-8244-d59c-10d31d8e0a3a@huawei.com \
    --to=yangjihong1@huawei.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@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

all inboxes | Powered by JetHome®