Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2896586pxy; Tue, 3 Aug 2021 19:09:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEEGaWQ4y7zg6nrwRQ4AjGUu8RDukqUtKmPhdgwY0zd4i+vYzwyZgd4P6Hpg6Rix40J3O7 X-Received: by 2002:a17:906:688:: with SMTP id u8mr15129531ejb.436.1628042952025; Tue, 03 Aug 2021 19:09:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628042952; cv=none; d=google.com; s=arc-20160816; b=o6zY1eeX3V8coFw//qV+G7PeFgSXi+R9vfAgAQtiZV83ZlD59Er4eEJjQAN7GVOsRS u4WRyRJRD2COi21BeMPCgLx9qAUaayBRjUr36qyf9E64cKqfSjlZOUW7mB0jW29tDwna ioTPtB26OoCUVQLWNmgoQIPe+Xx4t0gWBcK8fvfDURNKyJJfQvfprvTJTtO/Hf8367v5 t5EbtF6+DDkbvEnHt+dnOsD8QGQQciYnFcnxeY46U4MoilSMR5k4g95bC1Jm11PNqqhf PBu7oLZQobIneAjhLg9c6UbB8XeU6Zylg/tccoC3C/z3wL9ihzJmodv/AojbVjBu9jaQ eAsw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=kbxeZpbNOrLcMaibBXXLKrvlT824+ZWyKMcHO2C49jo=; b=rOwvdsJXW56u0EaI95DZ+zCYoRFLHxqrhMcK4TWoLq3uKAfbXJA896UqFaBNhoeTnH CmvBOT8yV3jqThf6BraQ7cPHyNsi09lwHTOkfY9q8xBk1m9klT9dLnzbQUJsEK/yp1OA NPt6EueVobbVFQ3ldqDlwnRB4UDUN33Z+RvuzKn7Y/QKbAhEI3j/0WHs8x2td1tcEa2X +ADdoBpLC73F+EjPOjag/Bk6QQevLbL2EIZg6OYZyyN49d4RhJClyShZZp1/h8piGL45 IZ47bcplAW3iOiDNyMa348MU+/WBTucG+a7jwlMoUFaqgW06nxqCWNwPM4W40sRoaXfK hNeQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w16si794551edl.245.2021.08.03.19.08.41; Tue, 03 Aug 2021 19:09:12 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234313AbhHDCD5 (ORCPT + 99 others); Tue, 3 Aug 2021 22:03:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:48406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233916AbhHDCDy (ORCPT ); Tue, 3 Aug 2021 22:03:54 -0400 Received: from rorschach.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (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 504C760F58; Wed, 4 Aug 2021 02:03:42 +0000 (UTC) Date: Tue, 3 Aug 2021 22:03:40 -0400 From: Steven Rostedt To: Hui Su Cc: me@kloenk.de, masahiroy@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scripts/tracing: fix the bug that can't parse raw_trace_func Message-ID: <20210803220340.27771569@rorschach.local.home> In-Reply-To: <20210611022107.608787-1-suhui@zeku.com> References: <20210611022107.608787-1-suhui@zeku.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 11 Jun 2021 10:21:07 +0800 Hui Su wrote: > 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. > > Signed-off-by: Hui Su Hi Hui. Sorry, I missed this patch. I'll add it to my queue and mark it for stable. -- Steve > --- > scripts/tracing/draw_functrace.py | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/scripts/tracing/draw_functrace.py b/scripts/tracing/draw_functrace.py > index 74f8aadfd4cb..7011fbe003ff 100755 > --- 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():