Got kernel summaries in rocscope integrated
Signed-off-by: coleramos425 <colramos@amd.com>
Cette révision appartient à :
révisé par
coleramos425
Parent
eadd35e5c6
révision
9e12acf79c
@@ -357,6 +357,31 @@ def omniperf_profile(args):
|
||||
else:
|
||||
print("rocscope must be in the PATH")
|
||||
sys.exit(1)
|
||||
elif not args.summaries == None and args.summaries == True:
|
||||
print("creating kernel summaries")
|
||||
#look for whether workload_dir exists - create if not
|
||||
try:
|
||||
os.makedirs(workload_dir, exist_ok = True)
|
||||
except Exception as e:
|
||||
print("Unable to create workload directory: ", workload_dir)
|
||||
print(e)
|
||||
sys.exit(1)
|
||||
|
||||
result = subprocess.run(["which", "rocscope"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
|
||||
if result.returncode == 0:
|
||||
rs_cmd = [result.stdout.decode('ascii').strip(),
|
||||
"summary",
|
||||
"-p", args.path,
|
||||
"-n", args.name,
|
||||
"--", args.remaining]
|
||||
print(rs_cmd)
|
||||
result = subprocess.run(rs_cmd) #, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
if result.returncode != 0:
|
||||
print(result.stderr.decode('ascii'))
|
||||
else:
|
||||
print("rocscope must be in the PATH")
|
||||
sys.exit(1)
|
||||
|
||||
else:
|
||||
for fname in glob.glob(workload_dir + "/perfmon/*.txt"):
|
||||
# Kernel filtering (in-place replacement)
|
||||
|
||||
@@ -125,6 +125,17 @@ def parse(my_parser):
|
||||
dest="lucky",
|
||||
help="\t\t\tProfile only the most time consuming kernels.",
|
||||
)
|
||||
|
||||
profile_group.add_argument(
|
||||
"-s",
|
||||
"--kernel-summaries",
|
||||
required=False,
|
||||
default=False,
|
||||
action="store_true",
|
||||
dest="summaries",
|
||||
help="\t\t\tCreate kernel summaries.",
|
||||
)
|
||||
|
||||
profile_group.add_argument(
|
||||
"-b",
|
||||
"--ipblocks",
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur