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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 16, 2018 at 10:46:29AM +0100, Hendrik Brueckner wrote:

SNIP

> index 12dec6e..90ce14f 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -249,7 +249,7 @@ INC_FLAGS += -I$(srctree)/tools/arch/$(SRCARCH)/include/uapi
>  INC_FLAGS += -I$(srctree)/tools/arch/$(SRCARCH)/include/
>  INC_FLAGS += -I$(srctree)/tools/arch/$(SRCARCH)/
>  
> -# $(obj-perf)      for generated common-cmds.h
> +# $(obj-perf)      for generated common-cmds.h and errno-names.c
>  # $(obj-perf)/util for generated bison/flex headers
>  ifneq ($(OUTPUT),)
>  INC_FLAGS += -I$(obj-perf)/util
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 9fdefd7..332b4b4 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -518,6 +518,9 @@ $(OUTPUT)common-cmds.h: util/generate-cmdlist.sh command-list.txt
>  $(OUTPUT)common-cmds.h: $(wildcard Documentation/perf-*.txt)
>  	$(QUIET_GEN). util/generate-cmdlist.sh > $@+ && mv $@+ $@
>  
> +$(OUTPUT)util/errno-names.c: util/generate-errno-names.sh
> +	$(QUIET_GEN). util/generate-errno-names.sh "$(CC)" "$(srctree)/tools" > $@+ && mv $@+ $@

so this generates errno-names.c with following code:

const char *arch_errno_to_name(const char *arch, int err)
{
        if (!strcmp(arch, "alpha"))
                return errno_to_name__alpha(err);
        if (!strcmp(arch, "arm"))
                return errno_to_name__arm(err);
        if (!strcmp(arch, "arm64"))
                return errno_to_name__arm64(err);


is there a reason why we want all archs compiled in?
I'd think we just need the arch perf is built in

thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux