mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: asnast@gmail.com
To: linux-kernel@vger.kernel.org
Cc: rostedt@goodmis.org, Alex Snast <alexsn@il.ibm.com>
Subject: [PATCH 1/2] ftrace: draw_funcgraph.py: Handle dots in function names
Date: Tue, 15 Apr 2014 13:53:19 +0300	[thread overview]
Message-ID: <1397559200-15520-2-git-send-email-alexsn@il.ibm.com> (raw)
In-Reply-To: <1397559200-15520-1-git-send-email-alexsn@il.ibm.com>

From: Alex Snast <alexsn@il.ibm.com>

ftrace function tracer can output the following line:
mmcommon-3250  [001] 969103.003748: clear_buddies.isra.59 <-dequeue_task_fair

However the regex used by draw_functrace.py would fail to match the '.'
character

Signed-off-by: Alex Snast <alexsn@il.ibm.com>
---
 scripts/tracing/draw_functrace.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/tracing/draw_functrace.py b/scripts/tracing/draw_functrace.py
index db40fa0..358bc9f 100644
--- a/scripts/tracing/draw_functrace.py
+++ b/scripts/tracing/draw_functrace.py
@@ -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(r"[^]]+?\] +(\d+\.\d+): ([\w.]+) <-([\w.]+)", line)
 	if m is None:
 		raise BrokenLineException
-	return (m.group(1), m.group(2), m.group(3))
+	return m.group(1, 2, 3)
 
 
 def main():
-- 
1.9.2


  reply	other threads:[~2014-04-15 10:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15 10:53 [PATCH 0/2] ftrace: draw_funcgraph.py: Fix regex handling asnast
2014-04-15 10:53 ` asnast [this message]
2014-04-15 10:53 ` [PATCH 2/2] ftrace: draw_funcgraph.py: Allow reading input from files in addition to stdin asnast

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1397559200-15520-2-git-send-email-alexsn@il.ibm.com \
    --to=asnast@gmail.com \
    --cc=alexsn@il.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®