1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

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
This commit is contained in:
Adam Nemet 2017-09-29 16:56:54 +00:00
parent 59fd59f044
commit b9cadf35f9

View File

@ -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 ''