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] [day] [month] [year] [list]
Message-ID: <ZGKkaROtXT9Wq2ai@kernel.org>
Date:   Mon, 15 May 2023 18:30:17 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Changbin Du <changbin.du@...wei.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Ian Rogers <irogers@...gle.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf: ftrace: flush output after each writing

Em Sat, May 13, 2023 at 03:40:00PM +0800, Changbin Du escreveu:
> The pager will result stdout in full buffering mode instead of line
> buffering. We need to make the trace visible timely.

Thanks, applied.

- Arnaldo

 
> Signed-off-by: Changbin Du <changbin.du@...wei.com>
> ---
>  tools/perf/builtin-ftrace.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
> index 810e3376c7d6..ad2a9ae041f6 100644
> --- a/tools/perf/builtin-ftrace.c
> +++ b/tools/perf/builtin-ftrace.c
> @@ -650,6 +650,8 @@ static int __cmd_ftrace(struct perf_ftrace *ftrace)
>  				break;
>  			if (fwrite(buf, n, 1, stdout) != 1)
>  				break;
> +			/* flush output since stdout is in full buffering mode due to pager */
> +			fflush(stdout);
>  		}
>  	}
>  
> -- 
> 2.25.1
> 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ