From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
Ian Rogers <irogers@google.com>, Jiri Olsa <jolsa@kernel.org>,
Juri Lelli <juri.lelli@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] perf test task_exit: No need for a cycles event to check if we get an PERF_RECORD_EXIT
Date: Fri, 14 Jul 2023 15:44:40 -0300 [thread overview]
Message-ID: <ZLGXmMuNRpx1ubFm@kernel.org> (raw)
In-Reply-To: <ZLGWWgROetPjRn2C@kernel.org>
Forgot to CC lkml :-\
Em Fri, Jul 14, 2023 at 03:39:22PM -0300, Arnaldo Carvalho de Melo escreveu:
> The intent of this test is to check we get a PERF_RECORD_EXIT as asked
> for by setting perf_event_attr.task=1.
>
> When the test was written we didn't have the "dummy" event so we went
> with the default event, "cycles".
>
> There were reports of this test failing sometimes, one of these reports
> was with a PREEMPT_RT_FULL kernel, but I noticed it failing sometimes
> on an aarch64 Firefly board.
>
> In the kernel the call to perf_event_task_output(), that generates the
> PERF_RECORD_EXIT may fail when there is not enough memory in the ring
> buffer, if the ring buffer is paused, etc.
>
> So switch to using the "dummy" event to use the ring buffer just for
> what the test was designed for, avoiding uneeded PERF_RECORD_SAMPLEs.
>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Ian Rogers <irogers@google.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Juri Lelli <juri.lelli@redhat.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
> tools/perf/tests/task-exit.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c
> index 25f075fa9125bd53..968dddde6ddaf0be 100644
> --- a/tools/perf/tests/task-exit.c
> +++ b/tools/perf/tests/task-exit.c
> @@ -58,9 +58,9 @@ static int test__task_exit(struct test_suite *test __maybe_unused, int subtest _
>
> signal(SIGCHLD, sig_handler);
>
> - evlist = evlist__new_default();
> + evlist = evlist__new_dummy();
> if (evlist == NULL) {
> - pr_debug("evlist__new_default\n");
> + pr_debug("evlist__new_dummy\n");
> return -1;
> }
>
> --
> 2.37.1
>
--
- Arnaldo
parent reply other threads:[~2023-07-14 18:44 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <ZLGWWgROetPjRn2C@kernel.org>]
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=ZLGXmMuNRpx1ubFm@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@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