RFR: 8273139: C2: assert(f <= 1 && f >= 0) failed: Incorrect frequency [v2]

Roland Westrelin roland at openjdk.java.net
Wed Jan 19 10:26:24 UTC 2022


On Tue, 18 Jan 2022 10:55:24 GMT, Emanuel Peter <duke at openjdk.java.net> wrote:

> Changing from `float` to `double` is not trivial. We seem to use `float` to do counts in multiple files, and other code depends on it as well. A quick `grep "float.*cnt" . -rE` gets me a good number of hits, and not just in the file I edited (`loopPredicate.cpp`).

I think Dean's suggestion is to only to use double locally that is in PathFrequency::to(). I suppose that would be feasible. What do you think?

In any case, this logic is used to help c2 decides whether a transformation is beneficial or not. In case of precision errors, worst case, that decision will be slightly wrong and performance should be minimally affected.

As far as logging precision errors we can detect: I don't think it's telling us something that's actionable. It doesn't even suggest that something has gone wrong. So I don't think it's useful.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7113


More information about the hotspot-compiler-dev mailing list