Re: [PATCH 3/5] perf util: Introduce architecture specific errno/name mapping

Hendrik Brueckner
2018-01-17T08:49:35Z

On Tue, Jan 16, 2018 at 10:58:48AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jan 16, 2018 at 10:46:29AM +0100, Hendrik Brueckner escreveu:
> > Introduce a script that generates a mapping of errno numbers to
> > their names for each architecture that is supported by perf (i.e.
> > has a subdirectory in tools/perf/arch/).
> >
> > The file is generated as util/errno-names.c. A corresponding
> > header file util/errno-names.h is provided that defines the
> > arch_errno_to_name() function. Use arch_errno_to_name() to
> > lookup an errno value to obtain the errno name (e.g. ENOENT)
> > for a particular architecture.
> >
> > This is to be used by perf trace.
>
> Ok, this is almost there, one nit I think needs to be fixed, instead of
> generating it on $(OUTPUT)util/errno-names.c we can generate it here:
>
[...]
>
> I.e. all these are beautifier routines generated by shell scripts from
> kernel header copies, so I think this new one, for errno, belongs there,
> ok?

At the moment, just perf trace use this interface. Hence, putting it to
the trace beautifiers makes sense. Will update the patch accordingly and
re-post a v2 of the patch again.

Additional feedback is welcome... so I can decide whether to post the
single patch or an updated series.

Thanks and kind regards,
Hendrik