* [PATCH] perf report: Prevent segfault with --no-parent
@ 2024-01-30 18:55 Andi Kleen
2024-01-31 0:16 ` Namhyung Kim
2024-02-02 20:57 ` Namhyung Kim
0 siblings, 2 replies; 3+ messages in thread
From: Andi Kleen @ 2024-01-30 18:55 UTC (permalink / raw)
To: linux-perf-users; +Cc: Andi Kleen
Prevent a perf report segfault with the (non sensical) --no-parent
option
Signed-off-By: Andi Kleen <ak@linux.intel.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf report: Prevent segfault with --no-parent
2024-01-30 18:55 [PATCH] perf report: Prevent segfault with --no-parent Andi Kleen
@ 2024-01-31 0:16 ` Namhyung Kim
2024-02-02 20:57 ` Namhyung Kim
1 sibling, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2024-01-31 0:16 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-perf-users
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
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perf report: Prevent segfault with --no-parent
2024-01-30 18:55 [PATCH] perf report: Prevent segfault with --no-parent Andi Kleen
2024-01-31 0:16 ` Namhyung Kim
@ 2024-02-02 20:57 ` Namhyung Kim
1 sibling, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2024-02-02 20:57 UTC (permalink / raw)
To: linux-perf-users, Andi Kleen
On Tue, 30 Jan 2024 10:55:52 -0800, Andi Kleen wrote:
> Prevent a perf report segfault with the (non sensical) --no-parent
> option
>
>
Applied to perf-tools-next, thanks!
Best regards,
--
Namhyung Kim <namhyung@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-02 20:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30 18:55 [PATCH] perf report: Prevent segfault with --no-parent Andi Kleen
2024-01-31 0:16 ` Namhyung Kim
2024-02-02 20:57 ` Namhyung Kim
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.