[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250204183847.mr2dnge55simbmkl@jpoimboe>
Date: Tue, 4 Feb 2025 10:38:47 -0800
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Indu Bhagat <indu.bhagat@...cle.com>
Cc: x86@...nel.org, Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...nel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
linux-kernel@...r.kernel.org, Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-perf-users@...r.kernel.org, Mark Brown <broonie@...nel.org>,
linux-toolchains@...r.kernel.org, Jordan Rome <jordalgo@...a.com>,
Sam James <sam@...too.org>, linux-trace-kernel@...r.kernel.org,
Andrii Nakryiko <andrii.nakryiko@...il.com>,
Jens Remus <jremus@...ux.ibm.com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Florian Weimer <fweimer@...hat.com>,
Andy Lutomirski <luto@...nel.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Weinan Liu <wnliu@...gle.com>
Subject: Re: [PATCH v4 19/39] unwind_user/sframe: Add support for reading
.sframe contents
On Thu, Jan 30, 2025 at 07:07:32AM -0800, Indu Bhagat wrote:
> On 1/21/25 6:31 PM, Josh Poimboeuf wrote:
> > + for (i = 0; i < fde->fres_num; i++) {
> > + int ret;
> > +
> > + /*
> > + * Alternate between the two fre_addr[] entries for 'fre' and
> > + * 'prev_fre'.
> > + */
> > + fre = which ? fres : fres + 1;
> > + which = !which;
> > +
> > + ret = __read_fre(sec, fde, fre_addr, fre);
> > + if (ret)
> > + return ret;
> > +
>
> It should be possible to only read the ip_off and info from FRE and defer
> the reading of offsets (as done in __read_fre) until later when you do need
> the offsets. See below.
>
> We can find the relevant FRE with the following pieces of information:
> - ip_off
> - fre_size (this will mean we need to read the uin8_t info in the FRE)
Indeed, I'll skip reading the offsets until after the loop.
--
Josh
Powered by blists - more mailing lists