lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9d7ciXtbi1auv5W=gk3M4zeSyFUG3K=bQz14-4YnoUpEX+eQ@mail.gmail.com>
Date: Tue, 6 Feb 2024 15:06:24 -0800
From: Namhyung Kim <namhyung@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>, Jiri Olsa <jolsa@...nel.org>, 
	Adrian Hunter <adrian.hunter@...el.com>, Peter Zijlstra <peterz@...radead.org>, 
	Ingo Molnar <mingo@...nel.org>, LKML <linux-kernel@...r.kernel.org>, 
	linux-perf-users@...r.kernel.org, 
	Linus Torvalds <torvalds@...ux-foundation.org>, Stephane Eranian <eranian@...gle.com>, 
	Masami Hiramatsu <mhiramat@...nel.org>, linux-toolchains@...r.kernel.org, 
	linux-trace-devel@...r.kernel.org
Subject: Re: [PATCH 06/14] perf annotate-data: Maintain variable type info

On Fri, Feb 2, 2024 at 6:45 PM Ian Rogers <irogers@...gle.com> wrote:
>
> On Fri, Feb 2, 2024 at 2:05 PM Namhyung Kim <namhyung@...nel.org> wrote:
> >
> > As it collected basic block and variable information in each scope, it
> > now can build a state table to find matching variable at the location.
> >
> > The struct type_state is to keep the type info saved in each register
> > and stack slot.  The update_var_state() updates the table when it finds
> > variables in the current address.  It expects die_collect_vars() filled
> > a list of variables with type info and starting address.
> >
> > Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> > ---
> >  tools/perf/util/annotate-data.c | 155 ++++++++++++++++++++++++++++++++
> >  tools/perf/util/annotate-data.h |  29 ++++++
> >  tools/perf/util/dwarf-aux.c     |   4 +
> >  3 files changed, 188 insertions(+)
> >
> > diff --git a/tools/perf/util/annotate-data.c b/tools/perf/util/annotate-data.c
> > index b8e60c42af8c..f8768c224bcc 100644
> > --- a/tools/perf/util/annotate-data.c
> > +++ b/tools/perf/util/annotate-data.c
> > @@ -23,6 +23,57 @@
> >  #include "symbol.h"
> >  #include "symbol_conf.h"
> >
> > +/* Type information in a register, valid when ok is true */
> > +struct type_state_reg {
> > +       Dwarf_Die type;
> > +       bool ok;
> > +       bool scratch;
> > +};
> > +
> > +/* Type information in a stack location, dynamically allocated */
> > +struct type_state_stack {
> > +       struct list_head list;
> > +       Dwarf_Die type;
> > +       int offset;
> > +       int size;
> > +       bool compound;
> > +};
> > +
> > +/* FIXME: This should be arch-dependent */
> > +#define TYPE_STATE_MAX_REGS  16
>
> Perhaps 32, presumably 16 won't work on Arm64.

Right, but right now I'm targeting x86_64 only.
Maybe we can change it later when it supports Arm64.

Thanks,
Namhyung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ