summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2017-09-29 16:56:54 +0000
committerAdam Nemet <anemet@apple.com>2017-09-29 16:56:54 +0000
commit3a762d9b0e811da2d35987e588938dd221cae354 (patch)
tree948fa5681cb5e674cb5073674c2bf5b996e20389
parent1ad9ea3ae2252c77a7cebfcb1da368fbe893b1f1 (diff)
downloadbcm5719-llvm-3a762d9b0e811da2d35987e588938dd221cae354.tar.gz
bcm5719-llvm-3a762d9b0e811da2d35987e588938dd221cae354.zip
Display relative hotness with two decimal digits after the decimal point
I've seen cases where tiny inlined functions have such a high execution count that most everything would show up with a relative of hotness of 0%. Since the inlined functions effectively disappear you need to tune in the lower range, thus we need more precision. llvm-svn: 314537
-rw-r--r--llvm/tools/opt-viewer/optrecord.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/opt-viewer/optrecord.py b/llvm/tools/opt-viewer/optrecord.py
index 95b908965ee..e68bcb870c6 100644
--- a/llvm/tools/opt-viewer/optrecord.py
+++ b/llvm/tools/opt-viewer/optrecord.py
@@ -179,7 +179,7 @@ class Remark(yaml.YAMLObject):
@property
def RelativeHotness(self):
if self.max_hotness:
- return "{}%".format(int(round(self.Hotness * 100 / self.max_hotness)))
+ return "{0:.2f}%".format(self.Hotness * 100. / self.max_hotness)
else:
return ''
OpenPOWER on IntegriCloud