lkml.org 
[lkml]   [2014]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] ftrace: draw_funcgraph.py: Handle dots in function names
Date
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


\
 
 \ /
  Last update: 2014-04-15 13:41    [W:0.043 / U:19.104 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site