Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751779AbbGKOv4 (ORCPT ); Sat, 11 Jul 2015 10:51:56 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:32948 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750855AbbGKOvy (ORCPT ); Sat, 11 Jul 2015 10:51:54 -0400 From: Jungseok Lee To: rostedt@goodmis.org, mingo@redhat.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/2] tracing: Fix function graph duration format for 7-digit number Date: Sat, 11 Jul 2015 14:51:39 +0000 Message-Id: <1436626300-1679-2-git-send-email-jungseoklee85@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436626300-1679-1-git-send-email-jungseoklee85@gmail.com> References: <1436626300-1679-1-git-send-email-jungseoklee85@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1536 Lines: 46 Currently, row's width of 7-digit duration numbers not aligned with other cases like the following example. 3) $ 3999884 us | } 3) | finish_task_switch() { 3) 0.365 us | _raw_spin_unlock_irq(); 3) 3.333 us | } 3) $ 3999976 us | } 3) $ 3999979 us | } /* schedule */ As adding a single white space in case of 7-digit numbers, the format could be unified easily as follows. 3) $ 2237472 us | } 3) | finish_task_switch() { 3) 0.364 us | _raw_spin_unlock_irq(); 3) 3.125 us | } 3) $ 2237556 us | } 3) $ 2237559 us | } /* schedule */ Signed-off-by: Jungseok Lee --- kernel/trace/trace_functions_graph.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index 8968bf7..0bc16c4 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c @@ -716,6 +716,8 @@ trace_print_graph_duration(unsigned long long duration, struct trace_seq *s) snprintf(nsecs_str, slen, "%03lu", nsecs_rem); trace_seq_printf(s, ".%s", nsecs_str); len += strlen(nsecs_str); + } else if (len == 7) { + len -= 1; } trace_seq_puts(s, " us "); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/