From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753396AbbFXSht (ORCPT ); Wed, 24 Jun 2015 14:37:49 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:60017 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752161AbbFXShn (ORCPT ); Wed, 24 Jun 2015 14:37:43 -0400 From: Omar Sandoval To: Steven Rostedt , CC: Omar Sandoval Subject: [PATCH] trace-cmd: annotate function durations like the kernel Date: Wed, 24 Jun 2015 11:36:54 -0700 Message-ID: <05162f43fb6322f4c46722403449ffdab134e3d2.1435170824.git.osandov@fb.com> X-Mailer: git-send-email 2.4.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.52.123] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-06-24_07:2015-06-23,2015-06-24,1970-01-01 signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since kernel commit, 8e1e1df29d83 ("tracing: Add additional marks to signal very large time deltas") the kernel annotates durations longer than 1000 usecs with # and longer than 1 sec with $. Update trace-cmd report to be consistent with it. Signed-off-by: Omar Sandoval --- Just a minor cosmetic issue I noticed. Thanks! trace-ftrace.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/trace-ftrace.c b/trace-ftrace.c index bdf11ce4c2dd..636b08b5cdef 100644 --- a/trace-ftrace.c +++ b/trace-ftrace.c @@ -147,11 +147,19 @@ static void print_graph_overhead(struct trace_seq *s, if (duration == ~0ULL) return (void)trace_seq_printf(s, " "); - /* Duration exceeded 100 msecs */ + /* Duration exceeded 1 sec */ + if (duration > 1000000000ULL) + return (void)trace_seq_printf(s, "$ "); + + /* Duration exceeded 1000 usecs */ + if (duration > 1000000ULL) + return (void)trace_seq_printf(s, "# "); + + /* Duration exceeded 100 usecs */ if (duration > 100000ULL) return (void)trace_seq_printf(s, "! "); - /* Duration exceeded 10 msecs */ + /* Duration exceeded 10 usecs */ if (duration > 10000ULL) return (void)trace_seq_printf(s, "+ "); -- 2.4.4