Re: [PATCH 04/23] perf dwarf-aux: Add die_find_func_rettype()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH 04/23] perf dwarf-aux: Add die_find_func_rettype()
- From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
- Date: Tue, 19 Mar 2024 15:19:14 -0300
- Cc: Ian Rogers <irogers@xxxxxxxxxx>, Jiri Olsa <jolsa@xxxxxxxxxx>, Adrian Hunter <adrian.hunter@xxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, linux-perf-users@xxxxxxxxxxxxxxx, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Stephane Eranian <eranian@xxxxxxxxxx>, Masami Hiramatsu <mhiramat@xxxxxxxxxx>, linux-toolchains@xxxxxxxxxxxxxxx, linux-trace-devel@xxxxxxxxxxxxxxx
- In-reply-to: <CAM9d7chdEcA7qFS3k=DGfeXcdZP1xWvdory_-Q0WFPfGi0St_Q@mail.gmail.com>
- References: <20240319055115.4063940-1-namhyung@kernel.org> <20240319055115.4063940-5-namhyung@kernel.org> <ZfmZobDmVFxEQ6hU@x1> <CAM9d7chdEcA7qFS3k=DGfeXcdZP1xWvdory_-Q0WFPfGi0St_Q@mail.gmail.com>
On Tue, Mar 19, 2024 at 10:42:00AM -0700, Namhyung Kim wrote:
> On Tue, Mar 19, 2024 at 6:56 AM Arnaldo Carvalho de Melo
> > > + return NULL;
> > > +
> > > + if (die_get_real_type(&tmp_die, die_mem) == NULL)
> > > + return NULL;
> >
> >
> > Here you check die_get_real_type() return, may I go and do the same for
> > the previous patch to address my review comment?
>
> Sure thing! :)
Ack?
- Arnaldo
diff --git a/tools/perf/util/dwarf-aux.c b/tools/perf/util/dwarf-aux.c
index cd9364d296b6bf42..09fd6f1f0ed8eac3 100644
--- a/tools/perf/util/dwarf-aux.c
+++ b/tools/perf/util/dwarf-aux.c
@@ -1856,7 +1856,10 @@ static int __die_find_member_offset_cb(Dwarf_Die *die_mem, void *arg)
if (offset == loc)
return DIE_FIND_CB_END;
- die_get_real_type(die_mem, &type_die);
+ if (die_get_real_type(die_mem, &type_die) == NULL) {
+ // TODO: add a pr_debug_dtp() later for this unlikely failure
+ return DIE_FIND_CB_SIBLING;
+ }
if (dwarf_aggregate_size(&type_die, &size) < 0)
size = 0;
[Index of Archives]
[Linux USB Development]
[Linux USB Development]
[Linux Audio Users]
[Yosemite Hiking]
[Linux Kernel]
[Linux SCSI]