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]
Date:   Thu, 27 May 2021 08:52:47 -0700
From:   Ian Rogers <irogers@...gle.com>
To:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        linux-perf-users <linux-perf-users@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Riccardo Mancini <rickyman7@...il.com>
Subject: Re: [PATCH] perf beauty: Reuse the generic switch.

On Wed, May 12, 2021 at 11:04 PM Ian Rogers <irogers@...gle.com> wrote:
>
> Previously the code would see if, for example,
> tools/perf/arch/arm/include/uapi/asm/errno.h exists and if not generate
> a "generic" switch statement using the asm-generic/errno.h. This creates
> multiple identical "generic" switch statements before the default
> generic switch statement for an unknown architecture. By simplifying the
> archlist to be only for architectures that are not "generic" the amount
> of generated code can be reduced from 14 down to 6 functions.
>
> Remove the special case of x86, instead reverse the architecture names
> so that it comes first.
>
> Signed-off-by: Ian Rogers <irogers@...gle.com>

Ping.

Thanks!
Ian

> ---
>  tools/perf/trace/beauty/arch_errno_names.sh | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/tools/perf/trace/beauty/arch_errno_names.sh b/tools/perf/trace/beauty/arch_errno_names.sh
> index 9f9ea45cddc4..2c5f72fa8108 100755
> --- a/tools/perf/trace/beauty/arch_errno_names.sh
> +++ b/tools/perf/trace/beauty/arch_errno_names.sh
> @@ -87,14 +87,13 @@ cat <<EoHEADER
>
>  EoHEADER
>
> -# Create list of architectures and ignore those that do not appear
> -# in tools/perf/arch
> +# Create list of architectures that have a specific errno.h.
>  archlist=""
> -for arch in $(find $toolsdir/arch -maxdepth 1 -mindepth 1 -type d -printf "%f\n" | grep -v x86 | sort); do
> -       test -d $toolsdir/perf/arch/$arch && archlist="$archlist $arch"
> +for arch in $(find $toolsdir/arch -maxdepth 1 -mindepth 1 -type d -printf "%f\n" | sort -r); do
> +       test -f $toolsdir/arch/$arch/include/uapi/asm/errno.h && archlist="$archlist $arch"
>  done
>
> -for arch in x86 $archlist generic; do
> +for arch in generic $archlist; do
>         process_arch "$arch"
>  done
> -create_arch_errno_table_func "x86 $archlist" "generic"
> +create_arch_errno_table_func "$archlist" "generic"
> --
> 2.31.1.751.gd2f1c929bd-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ