Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3769263pxt; Tue, 10 Aug 2021 10:54:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeCO4DjUtGRh+qwgMMwlLjIbIiaLiRVqiSK3zUqx5ayvFGRzuxHPbcwPl/VxyMsbaKziOP X-Received: by 2002:a05:6402:220d:: with SMTP id cq13mr6453437edb.318.1628618055551; Tue, 10 Aug 2021 10:54:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628618055; cv=none; d=google.com; s=arc-20160816; b=h3nO6xvmsDl/cSG6Ep9sU/7/rOkXVzMkhs6qbWesnOUKBkmOYOsdRjDokeLU7LKYdd K7rrVCMk5NDHQEvBK/m+nEfUoXuRqEmoZ6uSsf6Dpk30greNdCb7peYDZsEHr9++RrL7 CjYMG+0T5oR+n46BgnkRvzUNUbSVcROjXRPySWwqe5+fw4+aY/k4bhy3YczJkn4SXcI6 C/Ya3TSSqsGoHXaOVVZjJOhGfR6G2aP6gI4jD2NIX3qPj1nYFAmX5d9fPaE6TXOIA92X ttzGAPO+p4nHi5HwZkoGhaF+LjZwfJ98dmp+9SkybVWTfT9m7mJ5MlP3Ir74Vsl5z7Eg e9+w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zihpg7W6yOvRaRBJZxz4lHlz98YjDpNmF2nhNQk5dbQ=; b=puifLcT9+yGI2XlxhWw+TWJgUvA3a7Fh8cFueKMzyDiwyC6AAk35wWnOokw8lN80ah Ak8lWPRkVSFxrYF5hT6YH719LTYirSMek+788QgndJLLYFD3I0NLQaXfYouNgEJnL7mi Vqkl80RrFjQ1YI5frfCCZ4ZAV3rDISiD1h3/jEuMc8bFGjw/2g/KX+c/CUwTRbxEVz7M Zubksu9Yub0DGV95f1UqO5hQVx0wh5hNBxxHaSU3HqHx/6MKDdT1AcGFVsnnMZ6NddDF SAzc85JDCbckLSSAPAoR+aWjTq4x2jzfCXqTH5EfBMbjBxtqdowgn5qHi0i+QG0rsbe1 z6Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wXNw8n2e; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si10111971edv.6.2021.08.10.10.53.41; Tue, 10 Aug 2021 10:54:15 -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=@linuxfoundation.org header.s=korg header.b=wXNw8n2e; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234899AbhHJRuQ (ORCPT + 99 others); Tue, 10 Aug 2021 13:50:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:60058 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236530AbhHJRqr (ORCPT ); Tue, 10 Aug 2021 13:46:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 57C1F610A8; Tue, 10 Aug 2021 17:40:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617240; bh=CKykmzahHhMXt9m0NrdblO10om6+KNmQ7qwbpRTb4xQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wXNw8n2eKsaQpIvTNE7C5IwoVsbbTscbJqGyEY9zyhhKHjyp6qnFz0OZecXSA9ufE 6Lf0QkY8zJM+sB6JHodznXuOHj9WcHScUdSRxYdg0ZKxTexUESwRrlvY5OCrgDqeo0 TX4dAaKIEE0N7FFamZBvR2cIEM/GzJq7gGV4BG/M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hui Su , "Steven Rostedt (VMware)" Subject: [PATCH 5.10 074/135] scripts/tracing: fix the bug that cant parse raw_trace_func Date: Tue, 10 Aug 2021 19:30:08 +0200 Message-Id: <20210810172958.238901411@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hui Su commit 1c0cec64a7cc545eb49f374a43e9f7190a14defa upstream. Since commit 77271ce4b2c0 ("tracing: Add irq, preempt-count and need resched info to default trace output"), the default trace output format has been changed to: -0 [009] d.h. 22420.068695: _raw_spin_lock_irqsave <-hrtimer_interrupt -0 [000] ..s. 22420.068695: _nohz_idle_balance <-run_rebalance_domains -0 [011] d.h. 22420.068695: account_process_tick <-update_process_times origin trace output format:(before v3.2.0) # tracer: nop # # TASK-PID CPU# TIMESTAMP FUNCTION # | | | | | migration/0-6 [000] 50.025810: rcu_note_context_switch <-__schedule migration/0-6 [000] 50.025812: trace_rcu_utilization <-rcu_note_context_switch migration/0-6 [000] 50.025813: rcu_sched_qs <-rcu_note_context_switch migration/0-6 [000] 50.025815: rcu_preempt_qs <-rcu_note_context_switch migration/0-6 [000] 50.025817: trace_rcu_utilization <-rcu_note_context_switch migration/0-6 [000] 50.025818: debug_lockdep_rcu_enabled <-__schedule migration/0-6 [000] 50.025820: debug_lockdep_rcu_enabled <-__schedule The draw_functrace.py(introduced in v2.6.28) can't parse the new version format trace_func, So we need modify draw_functrace.py to adapt the new version trace output format. Link: https://lkml.kernel.org/r/20210611022107.608787-1-suhui@zeku.com Cc: stable@vger.kernel.org Fixes: 77271ce4b2c0 tracing: Add irq, preempt-count and need resched info to default trace output Signed-off-by: Hui Su Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Greg Kroah-Hartman --- scripts/tracing/draw_functrace.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/scripts/tracing/draw_functrace.py +++ b/scripts/tracing/draw_functrace.py @@ -17,7 +17,7 @@ Usage: $ cat /sys/kernel/debug/tracing/trace_pipe > ~/raw_trace_func Wait some times but not too much, the script is a bit slow. Break the pipe (Ctrl + Z) - $ scripts/draw_functrace.py < raw_trace_func > draw_functrace + $ scripts/tracing/draw_functrace.py < ~/raw_trace_func > draw_functrace Then you have your drawn trace in draw_functrace """ @@ -103,10 +103,10 @@ def parseLine(line): line = line.strip() if line.startswith("#"): raise CommentLineException - m = re.match("[^]]+?\\] +([0-9.]+): (\\w+) <-(\\w+)", line) + m = re.match("[^]]+?\\] +([a-z.]+) +([0-9.]+): (\\w+) <-(\\w+)", line) if m is None: raise BrokenLineException - return (m.group(1), m.group(2), m.group(3)) + return (m.group(2), m.group(3), m.group(4)) def main():