RFR (S): 8146478: Node limit exceeded with -XX:AllocateInstancePrefetchLines=1073741823
vladimir.kozlov at oracle.com
Tue Jan 26 19:01:15 UTC 2016
Where 4/2 number comes from? Some spec runs used higher number:
I would suggest something like 64 - I never see such number is used.
Also, please, limit AllocatePrefetchStepSize range. It corresponds to
cache line size. 512 I would say for future proof - with assert that
check that its setting in vm_Version_<arch>.cpp is in these range.
For the case AllocatePrefetchStyle == 2 number of lines is calculated as:
uint lines = AllocatePrefetchDistance / AllocatePrefetchStepSize;
Since AllocatePrefetchDistance limit is big you can get a lot of nodes
again. May be also set the limit -
AllocatePrefetchLines*AllocatePrefetchStepSize 64*32 = 2048.
On 1/26/16 8:43 AM, Zoltán Majó wrote:
> please review the patch for 8146478.
> Problem: Setting a high value for AllocateInstancePrefetchLines can
> trigger an assert in the C2 compiler The reasons is that the number of
> live nodes exceeds the maximum node limit. The same problem can happen
> if AllocateInstanceLines is given a high value.
> Limit the range for AllocateInstancePrefetchLines/AllocateInstanceLines
> to 8. I picked the value 8 because
> - (1) the maximum possible value for theses flags is 4/2, so having a
> slightly higher value than 4/2 still allows for some experiments;
> - (2) the node_check() in PhaseMacroExpand::expand_macro_nodes() assumes
> that each macro node expansion will generate <75 new nodes. The number
> of nodes generated by expand_allocate_array()/expand_allocate() for 8
> prefetched lines closely fits into that margin (experimentally verified).
> In addition, I removed some code that is that is now unnecessary because
> of the range checks we have in place.
> - JPRT: All JTREG hotspot tests, incl. TestOptionsWithRanges.java
> Thank you and best regards,
More information about the hotspot-compiler-dev