Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2649064rwd; Mon, 15 May 2023 14:59:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5gnK475bQIfptHQrrYGXlEfTS28eHTsuV0zW+/JFBWOdQtASuYwn0X6/2vxoRY4izQQbAN X-Received: by 2002:a17:902:b946:b0:1a9:9a18:3458 with SMTP id h6-20020a170902b94600b001a99a183458mr35761886pls.31.1684187960081; Mon, 15 May 2023 14:59:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684187960; cv=none; d=google.com; s=arc-20160816; b=VzdPo4iCL/vDRgIwro4NqUDVeWbiVdcZv7OHgsUwihJYTCcmJ4Wp0ZbjZ6YLZ+/xuM WOgXyXTAYmINstT926KTOySMshODF/GspHmw58V8pizg3z8I5A9YjDFWH9ykmuzebRDJ D/etEko4VRx/8e7SS85l3+kmT1pESSxfF+bINamKCIKUGpgvMyZe6mMCEzuTaW0eif1c zdCdI0JYIhLMZjIND+9eEILHizWwn8xqPz44mLPxMKEY8Mdt/K4fz35q9nSwbGqSsxDP gMflemvbDfBVpYqA3a7u7Kco3XBRZFZFzA/k/8gklAqtt+i3gd4g5ZSeyQBC/RX+bKNA OUGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JdVMd6Ihaw/Ueab1VWxV1BJBHU0mHKvjatm/X9GAmms=; b=YcInoQTFkcrn5HEDoCUAC3bR3Db63zTHiHRFdWIsLQ64d1aafFIX5vBFsIPlhl8iua G0ZYadwh74MDv/kso/AcBQ84FxnY66dn2rN6jv8iyFTA/k1xaoIYdIazidCOPUfuhN06 g3wyTOO0sznQgbz9szeJN+OzCiw5YLKPbeFT2SSDMGTncBQNr4zfFpRFo46X/K6x2JLd 6WKYgMXOWe2Eox/u8i25XQiXP5c/Ldy9K87hRVhhmpQ+GHtuM47Q/f+ChF4L7I8orXJj igMqF2E7ademr5iP9gYWUmt672gRSNsAHdjgQ7vogWqtTqRMRO6XTNHHEF+X3/h2gVu2 JWoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZA6wtW41; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q13-20020a170902bd8d00b001a6b5a7db52si16264706pls.596.2023.05.15.14.59.04; Mon, 15 May 2023 14:59:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZA6wtW41; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245579AbjEOVaZ (ORCPT + 99 others); Mon, 15 May 2023 17:30:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245587AbjEOVaX (ORCPT ); Mon, 15 May 2023 17:30:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B9D440E4; Mon, 15 May 2023 14:30:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D793C614CB; Mon, 15 May 2023 21:30:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15FEEC433D2; Mon, 15 May 2023 21:30:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684186220; bh=PrSt0VkkDgvVp93ERiJnCl7qNmkpl0JS4c8ZrbTuJgs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZA6wtW41N2r0S4jWDxUdN0IXtwdlAHsPr/WFyKWb8y36ou9CxQ5DxNdo87wuZiAxy 18d4AYbPru/KwTULzBq8nEdMer0Iq/6sAPFoGFfeZaFuS/8vdwemNR04Gm+71h7w9l M1nTzvOFw88hC7wgkOqp8V9Od4EgQgcIMGaMVGWfQp1I4EO7RGUgPIWCA+86zaxYkw SBZMCv1ED+iVc5zRKEmjDwSS7zX6LYCmaP506FyPxKy246geO/m6lhrppVghokqtYO jejKHj+BZ55TTFIkDBDbxMQDELXhNqvSvxZjeEBvi65EyktVRPPJ7HggHuLeTChmaq KpNTTQ3/dOKnQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id B3D7A403B5; Mon, 15 May 2023 18:30:17 -0300 (-03) Date: Mon, 15 May 2023 18:30:17 -0300 From: Arnaldo Carvalho de Melo To: Changbin Du Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf: ftrace: flush output after each writing Message-ID: References: <20230513074000.733550-1-changbin.du@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230513074000.733550-1-changbin.du@huawei.com> X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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