summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni.dodonov@intel.com>2011-11-08 14:35:17 -0200
committerEugeni Dodonov <eugeni.dodonov@intel.com>2011-11-09 11:50:08 -0200
commitb619e75fa00411d763cf6376e8a5b79b58bce796 (patch)
tree6833f28459208d6df1c74a44dec2768012f0a6b5
parent0c76e249ac3b9103a17a0cfcfd7e46d98da2e9dc (diff)
intel_gpu_analyze: check if we can read perf file first
Otherwise, we silently fail.. Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
-rwxr-xr-xtools/intel_gpu_analyze.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/intel_gpu_analyze.py b/tools/intel_gpu_analyze.py
index 7189aac..237f10c 100755
--- a/tools/intel_gpu_analyze.py
+++ b/tools/intel_gpu_analyze.py
@@ -120,6 +120,9 @@ def collect(fd):
def analyse_perf(logfile, out_dir, perf="perf.html"):
"""Analyses perf results"""
+ if not os.access(logfile, os.R_OK):
+ print "Error: unable to access perf log file %s" % logfile
+ return
perf_data = os.popen("perf script -f comm,pid,time,ip,sym -i %s 2>/dev/null" % logfile)
if not perf_data:
print "Error: unable to process perf log %s" % logfile