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:   Mon, 27 Apr 2020 14:43:28 -0700
From:   Stephane Eranian <eranian@...gle.com>
To:     LKML <linux-kernel@...r.kernel.org>
Cc:     Peter Zijlstra <peterz@...radead.org>, mingo@...e.hu,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        Jiri Olsa <jolsa@...hat.com>, Ian Rogers <irogers@...gle.com>,
        Andi Kleen <ak@...ux.intel.com>,
        "Liang, Kan" <kan.liang@...el.com>
Subject: Re: [PATCH] perf/script: remove extraneous newline in perf_sample__fprintf_regs()

On Sat, Apr 18, 2020 at 4:19 PM Stephane Eranian <eranian@...gle.com> wrote:
>
> When printing iregs, there was a double newline printed because
> perf_sample__fprintf_regs() was printing its own and then at the
> end of all fields, perf script was adding one.
> This was causing blank line in the output:
>
> Before:
> $ perf script -Fip,iregs
>            401b8d ABI:2    DX:0x100    SI:0x4a8340    DI:0x4a9340
>
>            401b8d ABI:2    DX:0x100    SI:0x4a9340    DI:0x4a8340
>
>            401b8d ABI:2    DX:0x100    SI:0x4a8340    DI:0x4a9340
>
>            401b8d ABI:2    DX:0x100    SI:0x4a9340    DI:0x4a8340
>
> After:
> $ perf script -Fip,iregs
>            401b8d ABI:2    DX:0x100    SI:0x4a8340    DI:0x4a9340
>            401b8d ABI:2    DX:0x100    SI:0x4a9340    DI:0x4a8340
>            401b8d ABI:2    DX:0x100    SI:0x4a8340    DI:0x4a9340
>
> Signed-off-by: Stephane Eranian <eranian@...gle.com>


Ping?

>
> ---
>  tools/perf/builtin-script.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
> index 1f57a7ecdf3d0..0c0b6e807d06e 100644
> --- a/tools/perf/builtin-script.c
> +++ b/tools/perf/builtin-script.c
> @@ -604,8 +604,6 @@ static int perf_sample__fprintf_regs(struct regs_dump *regs, uint64_t mask,
>                 printed += fprintf(fp, "%5s:0x%"PRIx64" ", perf_reg_name(r), val);
>         }
>
> -       fprintf(fp, "\n");
> -
>         return printed;
>  }
>
> --
> 2.26.1.301.g55bc3eb7cb9-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ