misc: Use python f-strings for string formatting
This patch has been generated by applying flynt to the gem5 repo (ext has been excluded) JIRA: https://gem5.atlassian.net/browse/GEM5-831 Change-Id: I0935db6223d5426b99515959bde78e374cbadb04 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68957 Maintainer: Bobby Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
This commit is contained in:
@@ -45,7 +45,7 @@ def category(app, sym):
|
||||
for regexp, cat in categories_re:
|
||||
if regexp.match(name):
|
||||
return cat
|
||||
print("no match for symbol %s" % name)
|
||||
print(f"no match for symbol {name}")
|
||||
return "other"
|
||||
|
||||
|
||||
@@ -99,4 +99,4 @@ if showidle:
|
||||
|
||||
for d in cats:
|
||||
if d in prof:
|
||||
print("%s -- %5.1f%% " % (d, 100 * float(prof[d]) / float(total)))
|
||||
print(f"{d} -- {100 * float(prof[d]) / float(total):5.1f}% ")
|
||||
|
||||
Reference in New Issue
Block a user