From: Namhyung Kim <namhyung@kernel.org>
To: Andi Kleen <ak@linux.intel.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf report: Prevent segfault with --no-parent
Date: Tue, 30 Jan 2024 16:16:58 -0800 [thread overview]
Message-ID: <CAM9d7choHiivk9i3_iKLPCwRwEyrc-tSereLt4Aw7orzW2x3Ew@mail.gmail.com> (raw)
In-Reply-To: <20240130185552.150578-1-ak@linux.intel.com>
Hi Andi,
On Tue, Jan 30, 2024 at 10:56 AM Andi Kleen <ak@linux.intel.com> wrote:
>
> Prevent a perf report segfault with the (non sensical) --no-parent
> option
>
> Signed-off-By: Andi Kleen <ak@linux.intel.com>
Acked-by: Namhyung <namhyung@kernel.org>
Thanks,
Namhyung
> ---
> tools/perf/util/sort.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
> index 30254eb63709..92a1bd695e8a 100644
> --- a/tools/perf/util/sort.c
> +++ b/tools/perf/util/sort.c
> @@ -3372,7 +3372,7 @@ int sort_dimension__add(struct perf_hpp_list *list, const char *tok,
> sort_dimension_add_dynamic_header(sd);
> }
>
> - if (sd->entry == &sort_parent) {
> + if (sd->entry == &sort_parent && parent_pattern) {
> int ret = regcomp(&parent_regex, parent_pattern, REG_EXTENDED);
> if (ret) {
> char err[BUFSIZ];
> --
> 2.43.0
>
>
next prev parent reply other threads:[~2024-01-31 0:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 18:55 [PATCH] perf report: Prevent segfault with --no-parent Andi Kleen
2024-01-31 0:16 ` Namhyung Kim [this message]
2024-02-02 20:57 ` Namhyung Kim
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=CAM9d7choHiivk9i3_iKLPCwRwEyrc-tSereLt4Aw7orzW2x3Ew@mail.gmail.com \
--to=namhyung@kernel.org \
--cc=ak@linux.intel.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).