Request for reviews (XXL): 6961697: move nmethod constants section before instruction section
vladimir.kozlov at oracle.com
Thu Jul 8 12:40:11 PDT 2010
Tom Rodriguez wrote:
>> I assume you want to initialize register with base value at the beginning of compiled code. But you have to deal with large offset (>4k) anyway for methods with a lot constants.
> It's not so much about the size of the offsets. The problem is that we need to know the distance between the constant and it's use. We can presize the constant section easily and the current offset will then tell you how far away the reference is from the constant. If the constant section is after it then we have to do a sizing pass to get that information.
Got it, you want to known what instructions needed to construct constant's address/load statically during code generation without additional passes.
>> Note: with compressed oops only 2 instructions are used to construct const narrow oop. Which leaves only polling and card table addresses to optimize. And we trade constant construction with load which may not give improvement.
> Maybe, maybe not. On Niagara class machines I think it would. Compressed oops doesn't work for all configurations either so it will still help large heap configurations. It will also help with existing float and double constant references.
Agree, especially for float/doubles. But I would like to see experiment results. Niagara L1 cache is very small per thread.
>> Did you do an experiment to find how much performance improvement it will buy us? I think we need to proceed with this huge changes only if we have benefits from it. Right?
> Let's see how the new webrev looks. I would be ok with holding back this change until we get the code generation for the constant table working to a point where we can evaluate it the performance effects.
In general it looks good. I still would like to see separate changes/bugs for renaming and moving constant section at the head.
>>> -- Christian
More information about the hotspot-compiler-dev