Integrated: 8306732: TruncatedSeq::predict_next() attempts linear regression with only one data point

Axel Boldt-Christmas aboldtch at openjdk.org
Thu Apr 27 07:16:23 UTC 2023


On Mon, 24 Apr 2023 11:51:06 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

> TruncatedSeq::predict_next() attempts linear regression with only one data point, this leads to a division by zero. (There are infinit many linear functions that fit equally well for a single point).
> 
> I suggest we do what we do for the zero points case, namely pick one of the linear functions.
> 
> For zero points the current version picks `y = 0 + 0*x` and the suggestion is that for one point `P` the function `y = P_y + 0*x` is picked.
> 
> Tested for ZGC tier1-7 on Oracle supported platforms. Only ZGC use TruncatedSeq::predict_next()

This pull request has now been integrated.

Changeset: 748476fd
Author:    Axel Boldt-Christmas <aboldtch at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/748476fd80ec93c25d823bc5088c706fcf3c7e65
Stats:     8 lines in 1 file changed: 7 ins; 0 del; 1 mod

8306732: TruncatedSeq::predict_next() attempts linear regression with only one data point

Reviewed-by: tschatzl, kbarrett

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

PR: https://git.openjdk.org/jdk/pull/13614


More information about the hotspot-dev mailing list