enable tool reloading

[ROCm/roctracer commit: 1be273a1b4]
This commit is contained in:
Evgeny
2020-03-14 00:13:22 -05:00
parent 19322871ee
commit e6a61fc63e
5 changed files with 39 additions and 41 deletions
+4 -3
View File
@@ -1,4 +1,5 @@
#!/usr/bin/python
from __future__ import print_function
import os, sys, re
OUT='inc/hsa_prof_str.h'
@@ -36,7 +37,7 @@ LICENSE = \
#############################################################
# Error handler
def fatal(module, msg):
print >>sys.stderr, module + ' Error: "' + msg + '"'
print (module + ' Error: "' + msg + '"', file = sys.stderr)
sys.exit(1)
# Get next text block
@@ -490,7 +491,7 @@ class API_DescrParser:
# main
# Usage
if len(sys.argv) != 3:
print >>sys.stderr, "Usage:", sys.argv[0], " <rocTracer root> <HSA runtime include path>"
print ("Usage:", sys.argv[0], " <rocTracer root> <HSA runtime include path>", file=sys.stderr)
sys.exit(1)
else:
ROOT = sys.argv[1] + '/'
@@ -499,7 +500,7 @@ else:
descr = API_DescrParser(OUT, HSA_DIR, API_TABLES_H, API_HEADERS_H, LICENSE)
out_file = ROOT + OUT
print 'Generating "' + out_file + '"'
print ('Generating "' + out_file + '"')
f = open(out_file, 'w')
f.write(descr.content[:-1])
f.close()