[PATCH 2/2] ftrace: draw_funcgraph.py: Allow reading input from files in addition to stdin

From: asnast
Date: Tue Apr 15 2014 - 06:54:05 EST


From: Alex Snast <alexsn@xxxxxxxxxx>

Signed-off-by: Alex Snast <alexsn@xxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/