Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2287007ybt; Fri, 3 Jul 2020 05:39:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9RApfI7d0/8XPZfcDbpP+J5qxycqYd1sfFW8654j0Of63zdWmadqN3HUOeDyK1dKCJ4cj X-Received: by 2002:a17:906:ce51:: with SMTP id se17mr31059833ejb.503.1593779973376; Fri, 03 Jul 2020 05:39:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593779973; cv=none; d=google.com; s=arc-20160816; b=Je1NPY5nOA5PlBIr12TB8IRIKupxZITrm2ure91k5RYGKxrOkr/MOgjepJm09ijbZs QeFTSCC7C8siuGg6dLGzOfoL643Wrg8+SYCvVNurTNvUNOgLGELCCAlzVTsy5ih4yQaR NtdFlU78qkBqvNcLbk7co6QaQ97zBd7d8UwUR1TuwgWJGTwFsIFoHuJRJu7mK7y/3TLQ w8wK81MXVyBfCBe9Nly12a0Ax8H4LOtcEj3UQxy/WUt1ismHquy43a5mCl4wpMPWXSBB 70w+vDWNTspJW/iFYrWLAN5BJC7+SaoIF5joFWmC2S6dO4NUJJi9HxpM3J33xhPxCkS+ 2OBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ZFlB5uTH+pbLkULK4uRRZmWqgn5L7wq9yD7F1l2TFZY=; b=wQekKPU3hBSnm8ohyZMsvcKbDgGiezrnMK6bexwIIkzBNmMaxdH6wduQOYJT/LgztZ g4LJ4vxnlUeBGue9vznuMSvLvJRJJ6LjKb1jnH96iLMOqsacI28Fy9iK8XSrtW/7TBpF 1u/zHUwijkkHOoiHr/F4/F7FnyI+4cS0eLmVDwXXg7By3XJ6PMlQzWJEk5ZaA8bj/MRV GgcV5b3u3sYihywhYEXgbJzddq4nJHXRBsE4BI/gDRFhyzpqpFvbtXngNsf+m8SpYHcO 0EUYdtCafL1IK8RyX9+ByfSOpUjmYWIpulQKWxiE1zyzHbCbIUCI8hyWWN8IWLuDlOgE yndQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=U1v1esYl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a41si9500028edf.30.2020.07.03.05.39.10; Fri, 03 Jul 2020 05:39:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=U1v1esYl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726157AbgGCMf5 (ORCPT + 99 others); Fri, 3 Jul 2020 08:35:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:38830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbgGCMf5 (ORCPT ); Fri, 3 Jul 2020 08:35:57 -0400 Received: from quaco.ghostprotocols.net (unknown [179.162.131.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B17C120782; Fri, 3 Jul 2020 12:35:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593779757; bh=tL3CENMyMSVhcnuZZSAH3vg2XT4EA/QiHNOa1OKF+Co=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=U1v1esYl4bZsVqCg1P1m9wHjIWH+ytQux5tZ4Vv8UBJ1GGc3CNRIFOEbCBF0GOxQg Hv+q65nvcxBVfP3xrZE2oKbtsyhL5WHpd6Hc0GmH6M82Q4sa+Kh92ROkzfulcQAqqr t0vwrH6ZYHHFywIVtR6V0yPzZ4VOW5dwrQLxHpTQ= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 584A3405FF; Fri, 3 Jul 2020 09:35:53 -0300 (-03) Date: Fri, 3 Jul 2020 09:35:53 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Changbin Du , Jiri Olsa , Peter Zijlstra , Ingo Molnar , Steven Rostedt , linux-kernel Subject: Re: [PATCH v2 07/15] perf ftrace: show trace column header Message-ID: <20200703123553.GH1320@kernel.org> References: <20200627133654.64863-1-changbin.du@gmail.com> <20200627133654.64863-8-changbin.du@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Jul 03, 2020 at 03:20:15PM +0900, Namhyung Kim escreveu: > On Sat, Jun 27, 2020 at 10:38 PM Changbin Du wrote: > > > > This makes perf-ftrace display column header before printing trace. > > > > $ sudo perf ftrace > > \# tracer: function > > \# > > \# entries-in-buffer/entries-written: 0/0 #P:8 > > \# > > \# TASK-PID CPU# TIMESTAMP FUNCTION > > \# | | | | | > > <...>-9246 [006] 10726.262760: mutex_unlock <-rb_simple_write > > <...>-9246 [006] 10726.262764: __fsnotify_parent <-vfs_write > > <...>-9246 [006] 10726.262765: fsnotify <-vfs_write > > <...>-9246 [006] 10726.262766: __sb_end_write <-vfs_write > > <...>-9246 [006] 10726.262767: fpregs_assert_state_consistent <-do_syscall_64 > > You'd better indent the example output by 2 spaces to prevent > the # signs commented out. Yes, all examples need to be two spaces to the right, to avoid things like that. - Arnaldo > Thanks > Namhyung > > > > > > Signed-off-by: Changbin Du > > --- > > tools/perf/builtin-ftrace.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c > > index e45496012611..686d744d5025 100644 > > --- a/tools/perf/builtin-ftrace.c > > +++ b/tools/perf/builtin-ftrace.c > > @@ -430,6 +430,9 @@ static int __cmd_ftrace(struct perf_ftrace *ftrace, int argc, const char **argv) > > fcntl(trace_fd, F_SETFL, O_NONBLOCK); > > pollfd.fd = trace_fd; > > > > + /* display column headers */ > > + read_tracing_file_to_stdout("trace"); > > + > > if (!ftrace->initial_delay) { > > if (write_tracing_file("tracing_on", "1") < 0) { > > pr_err("can't enable tracing\n"); > > -- > > 2.25.1 > > -- - Arnaldo