When G1 prints ergonomics output for collection set construction, if the time required for the young gen regions exceeds the total pause time, the next few messages about taking old gen regions anyways is slightly confusing:
Example:
1) 27637.171: [G1Ergonomics (CSet Construction) start choosing CSet, _pending_cards: 163660, predicted base time: 52.60 ms, remaining time: 247.40 ms, target pause time: 300.00 ms]
2) 27637.171: [G1Ergonomics (CSet Construction) add young regions to CSet, eden: 1454 regions, survivors: 82 regions, predicted young region time: 2834.32 ms]
3) 27637.171: [G1Ergonomics (CSet Construction) finish adding old regions to CSet, reason: predicted time is too high, predicted time: 6.91 ms, remaining time: 0.00 ms, old: 202 regions, min: 202 regions]
4) 27637.171: [G1Ergonomics (CSet Construction) added expensive regions to CSet, reason: old CSet region num not reached min, old: 202 regions, expensive: 202 regions, min: 202 regions, remaining time: 0.00 ms]
5) 27637.171: [G1Ergonomics (CSet Construction) finish choosing CSet, eden: 1454 regions, survivors: 82 regions, old: 202 regions,
predicted pause time: 3003.89 ms, target pause time: 300.00 ms]
In log message 3, ergonomics mentions that it finished adding old gen regions, not mentioning whether it actually added anything or not.
Maybe it could say it did not add 202 regions, which is the minimum desired number, or combine messages 3 and 4, so that it does not read "did not add old regions" followed by "added expensive regions".
Also "expensive regions" adds another term that is never explained anywhere.