Message ID | 20230531203236.1602054-1-namhyung@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3164480vqr; Wed, 31 May 2023 13:42:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5nKYBUSef0oRXOvalCu8Wu/yBky+uDpL4mQHROjBrq9l3r6Fl+BNkpibCbU2y2mN8VrPhu X-Received: by 2002:a05:6358:c1d:b0:123:485f:391 with SMTP id f29-20020a0563580c1d00b00123485f0391mr4170540rwj.11.1685565739636; Wed, 31 May 2023 13:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685565739; cv=none; d=google.com; s=arc-20160816; b=l1pOV27wCNKY5GVYAUB/2KnKDyHOnpV1XXtVLUP9jFmAc6yp1/sa3MTiULaRxmYGj4 kSe9xNv9/EtbVV1LVcri3Ci/9oJDCzCOD5DTYCJxQTmhA6V6vl4eIoWm2rUaY3cw7Pv2 nlcwoSwJsDkVqY+ldOrQXa0onyk0uMuC0xrryIYmupje69aIITE2k/omF/niT4GwWC65 qtztsFseK4qAIy/vSheMzHY/+HQtT0dTtpzt8zpTgSzZCGc15Q9Rh5k8QCdU9eqaJ5Vu zN8zifRhzB8SyLC/e2X9xiTHklWcQR5F3CzY799+ISqe4eREF+A83zN3OXD/afzxg1Tc WkyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=BDeWfB4xjTkyjMadKYZ6fSoKNmRXb/Jhz3U7/1RbuHU=; b=K7BvLWcVURmQIsAlurr8XySqmiTCgK3GoR7sjADZOLgkbZVb+fLbzPXoKYEg0BwIGz LXCwXL7jhvgIeRn/0fV6t7oQKmj+OF8hBGu4PB9VT1avMssugbstnwQtYxusKIbjnMgY 5D3CSG+kyFAYT/kDesGoJZtHMKPRTCKal5dhfLZK4yKGfbJ7NhutPmR5M9YyelMrpu9P AsuxQgc+MDExUPd6FCD/syRBE0tchvZmAdPymQoiuedhm55dvQrjnkHEaP3+UPZ9RUbW 1No6+y+sCMKrvR6xtTP1rItlR2sPKeatGD09rnQrX28QFOgHcHEF61U3Efka9BmFkwU5 Cfvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=LxUuGyHq; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ge13-20020a17090b0e0d00b00251662efc9dsi1589422pjb.53.2023.05.31.13.42.06; Wed, 31 May 2023 13:42:19 -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=@gmail.com header.s=20221208 header.b=LxUuGyHq; 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 S229904AbjEaUcl (ORCPT <rfc822;andrewvogler123@gmail.com> + 99 others); Wed, 31 May 2023 16:32:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjEaUcj (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 31 May 2023 16:32:39 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F56A121; Wed, 31 May 2023 13:32:38 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-2563ca70f64so3506559a91.0; Wed, 31 May 2023 13:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685565158; x=1688157158; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=BDeWfB4xjTkyjMadKYZ6fSoKNmRXb/Jhz3U7/1RbuHU=; b=LxUuGyHqh6epH41m7zvafxG1By7DF4yth9KckI+v2cYmO6NIG7nCFopDVVmndfIUtg +Q1bZWCbE/YVr4py3+irwKdC22FfWSO6EkUbpD6NidoTlXAehPU1GS64VrjNZCXzQb45 e1j0vqV+4WBu4SR1w0Rn9cpGzWgd6nGCLzLnYkngaD4n+7FVmQit+4xS3a8O1Z18Bneb ubzJ0W4S//6EKMiej2DicpzVc7Rbub+1kYz3auvCds17220IJ0xENMD8kEL32ymgMz4j 2BGaUDj/ho8Dv2cuoFpMqXyrgHoUobe8yj9Zo6a6f8Oh/amnukcDZnyNVvljBuB9pd6r ay3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685565158; x=1688157158; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=BDeWfB4xjTkyjMadKYZ6fSoKNmRXb/Jhz3U7/1RbuHU=; b=SB37w6nJ8Pmdo6dWuy7Irw8oMUfDXabsrjjteKHaK2C2k/X65M5w3tiiXsFMBwerRK i4YFxc1zrxp7FrYe9aAM8nMh/WF0fZ8e/VjE2NvOS+o40e6oe/nZGecbninAjeKfoQXr qdCqjIsE0qTilcvyAPn4t6IFeVrEwqBwtORhp4QngqUquguNqAIFydMkJNHXeI+3IEhD bt3gobSAuWxuOWxXCjedu5LsJrzhWUUJ4s4c6pTyLZ3xSFdkodJEKMivNUNzhU87hbQS 5lbNvvN77mCyNTmnd2H6+T/31ZhZQN+zLceGF6RxMdmovrtOOXrrEbQ8xKW/Q96j7ywL 7ssw== X-Gm-Message-State: AC+VfDzMwY3BbFHbuYz8rKRLnO647gAcvmW/7ZpdVxYUFNOajiDGZC86 p84TcBCVKS2TLpG7nC08BTQ= X-Received: by 2002:a17:90a:5081:b0:256:82c0:8120 with SMTP id s1-20020a17090a508100b0025682c08120mr5351254pjh.13.1685565157857; Wed, 31 May 2023 13:32:37 -0700 (PDT) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6700:7f00:ba31:75fe:e7e6:ccf7]) by smtp.gmail.com with ESMTPSA id l9-20020a17090a49c900b002508d73f4e8sm1611472pjm.57.2023.05.31.13.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 13:32:37 -0700 (PDT) Sender: Namhyung Kim <namhyung@gmail.com> From: Namhyung Kim <namhyung@kernel.org> To: Arnaldo Carvalho de Melo <acme@kernel.org>, Jiri Olsa <jolsa@kernel.org> Cc: Ian Rogers <irogers@google.com>, Adrian Hunter <adrian.hunter@intel.com>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@kernel.org>, LKML <linux-kernel@vger.kernel.org>, linux-perf-users@vger.kernel.org Subject: [PATCH] perf script: Increase PID/TID width for output Date: Wed, 31 May 2023 13:32:36 -0700 Message-ID: <20230531203236.1602054-1-namhyung@kernel.org> X-Mailer: git-send-email 2.41.0.rc0.172.g3f132b7071-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767443781057222061?= X-GMAIL-MSGID: =?utf-8?q?1767443781057222061?= |
Series |
perf script: Increase PID/TID width for output
|
|
Commit Message
Namhyung Kim
May 31, 2023, 8:32 p.m. UTC
On large systems, it's common that PID/TID is bigger than 5-digit and it
makes the output unaligned. Let's increase the width to 7.
Before:
$ perf script
...
swapper 0 [006] 1540823.803935: 1369324 cycles:P: ffffffff9c755588 ktime_get+0x18 ([kernel.kallsyms])
gvfsd-dnssd 95114 [004] 1540823.804164: 1643871 cycles:P: ffffffff9cfdca5c __get_user_8+0x1c ([kernel.kallsyms])
perf-exec 1558582 [000] 1540823.804209: 1018714 cycles:P: ffffffff9c924ab9 __slab_free+0x9 ([kernel.kallsyms])
nmcli 1558589 [007] 1540823.804384: 1859212 cycles:P: 7f70537a8ad8 __strchrnul_evex+0x18 (/usr/lib/x86_64-linux-gnu/libc.so.6>
sleep 1558582 [000] 1540823.804456: 987425 cycles:P: 7fd35bb27b30 _dl_init+0x0 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2>
dbus-daemon 3043 [003] 1540823.804575: 1564465 cycles:P: ffffffff9cb2bb70 llist_add_batch+0x0 ([kernel.kallsyms])
gdbus 1558592 [001] 1540823.804766: 1315219 cycles:P: ffffffff9c797b2e audit_filter_syscall+0x9e ([kernel.kallsyms])
NetworkManager 3452 [005] 1540823.805301: 1558782 cycles:P: 7fa957737748 g_bit_lock+0x58 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.5>
After:
$ perf script
...
swapper 0 [006] 1540823.803935: 1369324 cycles:P: ffffffff9c755588 ktime_get+0x18 ([kernel.kallsyms])
gvfsd-dnssd 95114 [004] 1540823.804164: 1643871 cycles:P: ffffffff9cfdca5c __get_user_8+0x1c ([kernel.kallsyms])
perf-exec 1558582 [000] 1540823.804209: 1018714 cycles:P: ffffffff9c924ab9 __slab_free+0x9 ([kernel.kallsyms])
nmcli 1558589 [007] 1540823.804384: 1859212 cycles:P: 7f70537a8ad8 __strchrnul_evex+0x18 (/usr/lib/x86_64-linux-gnu/libc.so.6>
sleep 1558582 [000] 1540823.804456: 987425 cycles:P: 7fd35bb27b30 _dl_init+0x0 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2>
dbus-daemon 3043 [003] 1540823.804575: 1564465 cycles:P: ffffffff9cb2bb70 llist_add_batch+0x0 ([kernel.kallsyms])
gdbus 1558592 [001] 1540823.804766: 1315219 cycles:P: ffffffff9c797b2e audit_filter_syscall+0x9e ([kernel.kallsyms])
NetworkManager 3452 [005] 1540823.805301: 1558782 cycles:P: 7fa957737748 g_bit_lock+0x58 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.5>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/builtin-script.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Comments
On 31/05/23 23:32, Namhyung Kim wrote: > On large systems, it's common that PID/TID is bigger than 5-digit and it > makes the output unaligned. Let's increase the width to 7. Might be worth noting that currently the biggest PID_MAX_LIMIT is 2^22 so pids don't get bigger than 7 digits presently. > > Before: > > $ perf script > ... > swapper 0 [006] 1540823.803935: 1369324 cycles:P: ffffffff9c755588 ktime_get+0x18 ([kernel.kallsyms]) > gvfsd-dnssd 95114 [004] 1540823.804164: 1643871 cycles:P: ffffffff9cfdca5c __get_user_8+0x1c ([kernel.kallsyms]) > perf-exec 1558582 [000] 1540823.804209: 1018714 cycles:P: ffffffff9c924ab9 __slab_free+0x9 ([kernel.kallsyms]) > nmcli 1558589 [007] 1540823.804384: 1859212 cycles:P: 7f70537a8ad8 __strchrnul_evex+0x18 (/usr/lib/x86_64-linux-gnu/libc.so.6> > sleep 1558582 [000] 1540823.804456: 987425 cycles:P: 7fd35bb27b30 _dl_init+0x0 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2> > dbus-daemon 3043 [003] 1540823.804575: 1564465 cycles:P: ffffffff9cb2bb70 llist_add_batch+0x0 ([kernel.kallsyms]) > gdbus 1558592 [001] 1540823.804766: 1315219 cycles:P: ffffffff9c797b2e audit_filter_syscall+0x9e ([kernel.kallsyms]) > NetworkManager 3452 [005] 1540823.805301: 1558782 cycles:P: 7fa957737748 g_bit_lock+0x58 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.5> > > After: > > $ perf script > ... > swapper 0 [006] 1540823.803935: 1369324 cycles:P: ffffffff9c755588 ktime_get+0x18 ([kernel.kallsyms]) > gvfsd-dnssd 95114 [004] 1540823.804164: 1643871 cycles:P: ffffffff9cfdca5c __get_user_8+0x1c ([kernel.kallsyms]) > perf-exec 1558582 [000] 1540823.804209: 1018714 cycles:P: ffffffff9c924ab9 __slab_free+0x9 ([kernel.kallsyms]) > nmcli 1558589 [007] 1540823.804384: 1859212 cycles:P: 7f70537a8ad8 __strchrnul_evex+0x18 (/usr/lib/x86_64-linux-gnu/libc.so.6> > sleep 1558582 [000] 1540823.804456: 987425 cycles:P: 7fd35bb27b30 _dl_init+0x0 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2> > dbus-daemon 3043 [003] 1540823.804575: 1564465 cycles:P: ffffffff9cb2bb70 llist_add_batch+0x0 ([kernel.kallsyms]) > gdbus 1558592 [001] 1540823.804766: 1315219 cycles:P: ffffffff9c797b2e audit_filter_syscall+0x9e ([kernel.kallsyms]) > NetworkManager 3452 [005] 1540823.805301: 1558782 cycles:P: 7fa957737748 g_bit_lock+0x58 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.5> > > Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Adrian Hunter <adrian.hunter@intel.com> > --- > tools/perf/builtin-script.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c > index 029d5a597233..70549fc93b12 100644 > --- a/tools/perf/builtin-script.c > +++ b/tools/perf/builtin-script.c > @@ -801,11 +801,11 @@ static int perf_sample__fprintf_start(struct perf_script *script, > } > > if (PRINT_FIELD(PID) && PRINT_FIELD(TID)) > - printed += fprintf(fp, "%5d/%-5d ", sample->pid, sample->tid); > + printed += fprintf(fp, "%7d/%-7d ", sample->pid, sample->tid); > else if (PRINT_FIELD(PID)) > - printed += fprintf(fp, "%5d ", sample->pid); > + printed += fprintf(fp, "%7d ", sample->pid); > else if (PRINT_FIELD(TID)) > - printed += fprintf(fp, "%5d ", sample->tid); > + printed += fprintf(fp, "%7d ", sample->tid); > > if (PRINT_FIELD(CPU)) { > if (latency_format)
Hi Adrian, On Wed, May 31, 2023 at 9:54 PM Adrian Hunter <adrian.hunter@intel.com> wrote: > > On 31/05/23 23:32, Namhyung Kim wrote: > > On large systems, it's common that PID/TID is bigger than 5-digit and it > > makes the output unaligned. Let's increase the width to 7. > > Might be worth noting that currently the biggest PID_MAX_LIMIT > is 2^22 so pids don't get bigger than 7 digits presently. Nice, will add that. > > > > > Before: > > > > $ perf script > > ... > > swapper 0 [006] 1540823.803935: 1369324 cycles:P: ffffffff9c755588 ktime_get+0x18 ([kernel.kallsyms]) > > gvfsd-dnssd 95114 [004] 1540823.804164: 1643871 cycles:P: ffffffff9cfdca5c __get_user_8+0x1c ([kernel.kallsyms]) > > perf-exec 1558582 [000] 1540823.804209: 1018714 cycles:P: ffffffff9c924ab9 __slab_free+0x9 ([kernel.kallsyms]) > > nmcli 1558589 [007] 1540823.804384: 1859212 cycles:P: 7f70537a8ad8 __strchrnul_evex+0x18 (/usr/lib/x86_64-linux-gnu/libc.so.6> > > sleep 1558582 [000] 1540823.804456: 987425 cycles:P: 7fd35bb27b30 _dl_init+0x0 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2> > > dbus-daemon 3043 [003] 1540823.804575: 1564465 cycles:P: ffffffff9cb2bb70 llist_add_batch+0x0 ([kernel.kallsyms]) > > gdbus 1558592 [001] 1540823.804766: 1315219 cycles:P: ffffffff9c797b2e audit_filter_syscall+0x9e ([kernel.kallsyms]) > > NetworkManager 3452 [005] 1540823.805301: 1558782 cycles:P: 7fa957737748 g_bit_lock+0x58 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.5> > > > > After: > > > > $ perf script > > ... > > swapper 0 [006] 1540823.803935: 1369324 cycles:P: ffffffff9c755588 ktime_get+0x18 ([kernel.kallsyms]) > > gvfsd-dnssd 95114 [004] 1540823.804164: 1643871 cycles:P: ffffffff9cfdca5c __get_user_8+0x1c ([kernel.kallsyms]) > > perf-exec 1558582 [000] 1540823.804209: 1018714 cycles:P: ffffffff9c924ab9 __slab_free+0x9 ([kernel.kallsyms]) > > nmcli 1558589 [007] 1540823.804384: 1859212 cycles:P: 7f70537a8ad8 __strchrnul_evex+0x18 (/usr/lib/x86_64-linux-gnu/libc.so.6> > > sleep 1558582 [000] 1540823.804456: 987425 cycles:P: 7fd35bb27b30 _dl_init+0x0 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2> > > dbus-daemon 3043 [003] 1540823.804575: 1564465 cycles:P: ffffffff9cb2bb70 llist_add_batch+0x0 ([kernel.kallsyms]) > > gdbus 1558592 [001] 1540823.804766: 1315219 cycles:P: ffffffff9c797b2e audit_filter_syscall+0x9e ([kernel.kallsyms]) > > NetworkManager 3452 [005] 1540823.805301: 1558782 cycles:P: 7fa957737748 g_bit_lock+0x58 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.5> > > > > Signed-off-by: Namhyung Kim <namhyung@kernel.org> > > Acked-by: Adrian Hunter <adrian.hunter@intel.com> Thanks for your review! Namhyung > > > --- > > tools/perf/builtin-script.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c > > index 029d5a597233..70549fc93b12 100644 > > --- a/tools/perf/builtin-script.c > > +++ b/tools/perf/builtin-script.c > > @@ -801,11 +801,11 @@ static int perf_sample__fprintf_start(struct perf_script *script, > > } > > > > if (PRINT_FIELD(PID) && PRINT_FIELD(TID)) > > - printed += fprintf(fp, "%5d/%-5d ", sample->pid, sample->tid); > > + printed += fprintf(fp, "%7d/%-7d ", sample->pid, sample->tid); > > else if (PRINT_FIELD(PID)) > > - printed += fprintf(fp, "%5d ", sample->pid); > > + printed += fprintf(fp, "%7d ", sample->pid); > > else if (PRINT_FIELD(TID)) > > - printed += fprintf(fp, "%5d ", sample->tid); > > + printed += fprintf(fp, "%7d ", sample->tid); > > > > if (PRINT_FIELD(CPU)) { > > if (latency_format) >
Em Thu, Jun 01, 2023 at 09:14:50AM -0700, Namhyung Kim escreveu: > Hi Adrian, > > On Wed, May 31, 2023 at 9:54 PM Adrian Hunter <adrian.hunter@intel.com> wrote: > > > > On 31/05/23 23:32, Namhyung Kim wrote: > > > On large systems, it's common that PID/TID is bigger than 5-digit and it > > > makes the output unaligned. Let's increase the width to 7. > > > > Might be worth noting that currently the biggest PID_MAX_LIMIT > > is 2^22 so pids don't get bigger than 7 digits presently. > > Nice, will add that. No need to resubmit, I'll add that. > > > > > > > > Before: > > > > > > $ perf script > > > ... > > > swapper 0 [006] 1540823.803935: 1369324 cycles:P: ffffffff9c755588 ktime_get+0x18 ([kernel.kallsyms]) > > > gvfsd-dnssd 95114 [004] 1540823.804164: 1643871 cycles:P: ffffffff9cfdca5c __get_user_8+0x1c ([kernel.kallsyms]) > > > perf-exec 1558582 [000] 1540823.804209: 1018714 cycles:P: ffffffff9c924ab9 __slab_free+0x9 ([kernel.kallsyms]) > > > nmcli 1558589 [007] 1540823.804384: 1859212 cycles:P: 7f70537a8ad8 __strchrnul_evex+0x18 (/usr/lib/x86_64-linux-gnu/libc.so.6> > > > sleep 1558582 [000] 1540823.804456: 987425 cycles:P: 7fd35bb27b30 _dl_init+0x0 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2> > > > dbus-daemon 3043 [003] 1540823.804575: 1564465 cycles:P: ffffffff9cb2bb70 llist_add_batch+0x0 ([kernel.kallsyms]) > > > gdbus 1558592 [001] 1540823.804766: 1315219 cycles:P: ffffffff9c797b2e audit_filter_syscall+0x9e ([kernel.kallsyms]) > > > NetworkManager 3452 [005] 1540823.805301: 1558782 cycles:P: 7fa957737748 g_bit_lock+0x58 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.5> > > > > > > After: > > > > > > $ perf script > > > ... > > > swapper 0 [006] 1540823.803935: 1369324 cycles:P: ffffffff9c755588 ktime_get+0x18 ([kernel.kallsyms]) > > > gvfsd-dnssd 95114 [004] 1540823.804164: 1643871 cycles:P: ffffffff9cfdca5c __get_user_8+0x1c ([kernel.kallsyms]) > > > perf-exec 1558582 [000] 1540823.804209: 1018714 cycles:P: ffffffff9c924ab9 __slab_free+0x9 ([kernel.kallsyms]) > > > nmcli 1558589 [007] 1540823.804384: 1859212 cycles:P: 7f70537a8ad8 __strchrnul_evex+0x18 (/usr/lib/x86_64-linux-gnu/libc.so.6> > > > sleep 1558582 [000] 1540823.804456: 987425 cycles:P: 7fd35bb27b30 _dl_init+0x0 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2> > > > dbus-daemon 3043 [003] 1540823.804575: 1564465 cycles:P: ffffffff9cb2bb70 llist_add_batch+0x0 ([kernel.kallsyms]) > > > gdbus 1558592 [001] 1540823.804766: 1315219 cycles:P: ffffffff9c797b2e audit_filter_syscall+0x9e ([kernel.kallsyms]) > > > NetworkManager 3452 [005] 1540823.805301: 1558782 cycles:P: 7fa957737748 g_bit_lock+0x58 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.5> > > > > > > Signed-off-by: Namhyung Kim <namhyung@kernel.org> > > > > Acked-by: Adrian Hunter <adrian.hunter@intel.com> > > Thanks for your review! Indeed, thanks Adrian, Namhyung, applied. - Arnaldo
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 029d5a597233..70549fc93b12 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -801,11 +801,11 @@ static int perf_sample__fprintf_start(struct perf_script *script, } if (PRINT_FIELD(PID) && PRINT_FIELD(TID)) - printed += fprintf(fp, "%5d/%-5d ", sample->pid, sample->tid); + printed += fprintf(fp, "%7d/%-7d ", sample->pid, sample->tid); else if (PRINT_FIELD(PID)) - printed += fprintf(fp, "%5d ", sample->pid); + printed += fprintf(fp, "%7d ", sample->pid); else if (PRINT_FIELD(TID)) - printed += fprintf(fp, "%5d ", sample->tid); + printed += fprintf(fp, "%7d ", sample->tid); if (PRINT_FIELD(CPU)) { if (latency_format)