RFR (): JDK-8228503: Rename "rs_lengths" to "rs_length" in ergo code
Thomas Schatzl
thomas.schatzl at oracle.com
Thu Jul 25 13:55:47 UTC 2019
Hi,
can I have reviews for this change that (mechanically) changes all
prediction related identifiers with the "rs_lengths" suffix to
"rs_length"?
The reason is that all these values are not vectors like the plural-s
suggests (and I think we use this naming style in other places), but
contain a scalar (sum) value. Reading through the prediction code with
this style is really annoying, given that the code later performs
standard mathematical ops with single values on that:
E.g.
double time_spent = predicted_rs_lengths * predict_cost_per_card();
Note that I understand that there is some reasoning for that as these
variables contain the sum of differences, or the sum of remembered set
"lengths" (for which we typically use "num_*_entries"/"num_*_cards" in
other places); however due to way these are used (e.g. to predict the
singular remembered set "length" of the entire young gen) I would
prefer to remove the "s".
I am okay with keeping the "rs_length" as it is to me by far not as
annoying, and I did so.
Alternatively I would suggest to add at least "sum" postfix to the
names.
The change also fixes multiple similar pluralization like
"_inc_recorded_rs_lengths_diffs".
There is some particular misnomer ("max_rs_length") that is going to be
fixed in the next CR (JDK-8228504).
CR:
https://bugs.openjdk.java.net/browse/JDK-8228503
Webrev:
http://cr.openjdk.java.net/~tschatzl/8228503/webrev/
Testing:
hs-tier1-3
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list