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 2/2] ftrace: draw_funcgraph.py: Allow reading input from files in addition to stdin
Date
From: Alex Snast <alexsn@il.ibm.com>

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 358bc9f..333ab42 100644
--- a/scripts/tracing/draw_functrace.py
+++ b/scripts/tracing/draw_functrace.py
@@ -22,7 +22,7 @@ Usage:
"""


-import sys, re
+import fileinput, re

class CallTree:
""" This class provides a tree representation of the functions
@@ -113,7 +113,7 @@ def main():
CallTree.ROOT = CallTree("Root (Nowhere)", None, None)
tree = CallTree.ROOT

- for line in sys.stdin:
+ for line in fileinput.input():
try:
calltime, callee, caller = parseLine(line)
except BrokenLineException:
--
1.9.2


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