Review Request: Add fast bytecode support to C++ interpreter
tom.rodriguez at oracle.com
Tue Mar 30 09:26:18 PDT 2010
I don't understand this. Zero sets both RewriteFrequentPairs and RewriteBytecodes to true but it doesn't appear to have the logic to convert normal bytecodes into their fast variants so how does it run afoul of the fast bytecodes? Is there some code somewhere that I'm not seeing that injects the _fast variants? Strictly speaking RewriteFrequentPairs and RewriteBytecodes should be false if the C++ interpreter is being used but since it's all the responsibility of the interpreter itself having wrong settings for those flags doesn't really matter.
If you really wanted to support RewriteFrequentPairs and RewriteBytecodes then you'd need to add the rewriting logic to inject the _fast variants and then add cases to handle them. The template interpreter has special implementations for each of the fast variants, including the pairs, so it doesn't convert them back to the normal version and redispatch. Redispatching will make the _fast variants slower than the normal variant which doesn't seem like a very good optimization.
On Mar 30, 2010, at 3:07 AM, Gary Benson wrote:
> Hi all,
> HotSpot has the capability to rewrite the bytecode stream, for example
> to combine common instruction pairs, but the C++ interpreter has no
> support for this. This webrev adds support for backing out over
> rewritten bytecodes to the C++ interpreter, in much the same way as I
> believe the template interpreter does.
> This was contributed by Edward Nevill, who has signed the SCA. His
> original mail is here:
> I don't have a bug id for this.
More information about the hotspot-compiler-dev