From: Leo Yan <leo.yan@linaro.org>
To: "Adrián Herrera Arcila" <adrian.herrera@arm.com>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
acme@kernel.org, peterz@infradead.org, mingo@redhat.com,
mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
jolsa@kernel.org, namhyung@kernel.org, songliubraving@fb.com,
james.clark@arm.com
Subject: Re: [PATCH 2/2] perf stat: fix unexpected delay behaviour
Date: Mon, 1 Aug 2022 19:45:58 +0800 [thread overview]
Message-ID: <20220801114558.GB73228@leoy-ThinkPad-X240s> (raw)
In-Reply-To: <20220729161244.10522-2-adrian.herrera@arm.com>
On Fri, Jul 29, 2022 at 04:12:44PM +0000, Adrián Herrera Arcila wrote:
> The described --delay behaviour is to delay the enablement of events, but
> not the execution of the command, if one is passed, which is incorrectly
> the current behaviour.
>
> This patch decouples the enablement from the delay, and enables events
> before or after launching the workload dependent on the options passed
> by the user. This code structure is inspired by that in perf-record, and
> tries to be consistent with it.
>
> Link: https://lore.kernel.org/linux-perf-users/7BFD066E-B0A8-49D4-B635-379328F0CF4C@fb.com
> Fixes: d0a0a511493d ("perf stat: Fix forked applications enablement of counters")
> Signed-off-by: Adrián Herrera Arcila <adrian.herrera@arm.com>
bpf_counter() is not enabled for delay in this patch, but I think this
is purposed to keep the same behaviour with before. I would leave it
to Song for a call.
The patch LGTM and I tested with commands:
$ time ./perf stat --delay 2000 --quiet sleep 2
Events disabled
Events enabled
real 0m2.039s
user 0m0.007s
sys 0m0.016s
$ ./perf stat --delay 2000 --quiet echo "marking"
Events disabled
marking
Events enabled
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Tested-by: Leo Yan <leo.yan@linaro.org>
P.s. I took a bit time to get clear how 'perf stat' set enable_on_exec
flag, which is set in the function create_perf_stat_counter(), so this
can enable PMU event for the case when delay is zero, and this can
avoid losing PMU tracing for workload.
next prev parent reply other threads:[~2022-08-01 11:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-29 16:12 [PATCH 1/2] perf stat: refactor __run_perf_stat common code Adrián Herrera Arcila
2022-07-29 16:12 ` [PATCH 2/2] perf stat: fix unexpected delay behaviour Adrián Herrera Arcila
2022-08-01 8:20 ` James Clark
2022-12-13 14:44 ` Arnaldo Carvalho de Melo
2022-12-13 16:40 ` Namhyung Kim
2022-12-14 14:26 ` James Clark
2022-12-14 14:41 ` Arnaldo Carvalho de Melo
2022-12-14 15:57 ` Leo Yan
2022-12-14 17:35 ` Arnaldo Carvalho de Melo
2022-12-15 1:45 ` Leo Yan
2022-08-01 11:45 ` Leo Yan [this message]
2022-08-01 11:27 ` [PATCH 1/2] perf stat: refactor __run_perf_stat common code Leo Yan
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=20220801114558.GB73228@leoy-ThinkPad-X240s \
--to=leo.yan@linaro.org \
--cc=acme@kernel.org \
--cc=adrian.herrera@arm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=james.clark@arm.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=songliubraving@fb.com \
/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