Question about redirecting a compilation

Deneau, Tom tom.deneau at amd.com
Wed Jan 2 12:35:30 PST 2013


Vladimir --

I saw that special case code for Reference_get and tried to do the same for my case.
The native routine in my case is not a leaf, and I hit a problem when it was trying to use GraphKit::add_safepoint_edges,
It seems there was no _method defined in the jvms.

Here is the relevant part of the stack.

#5  0x00007ffff6d66c7e in JVMState::method (this=0x7ffff02f4e18) at src/share/vm/opto/callnode.hpp:252
#6  0x00007ffff7090a21 in should_reexecute_implied_by_bytecode (jvms=0x7ffff02f4e18, is_anewarray=false) at src/share/vm/opto/graphKit.cpp:810
#7  0x00007ffff7090c8d in GraphKit::add_safepoint_edges (this=0x7fffd49a9ce0, call=0x7fffb0149c48, must_throw=false) at src/share/vm/opto/graphKit.cpp:877
#8  0x00007ffff70958d5 in GraphKit::make_runtime_call (this=0x7fffd49a9ce0, flags=5, call_type=0x7ffff0265488, 

-- Tom

Date: Wed, 02 Jan 2013 10:35:21 -0800
From: Vladimir Kozlov <vladimir.kozlov at oracle.com>
Subject: Re: Question about redirecting a compilation
To: sumatra-dev at openjdk.java.net
Message-ID: <50E47DE9.2010506 at oracle.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

May be I don't understand your question but C2 can compile top method into intrinsic (it does not need to be called from compiled method). 
Look on code for vmIntrinsics::_Reference_get in compile.cpp.

Vladimir

On 1/2/13 9:40 AM, Deneau, Tom wrote:
> As part of an experiment we'd like some Java code, say method Foo() to 
> get redirected to some native code when either
>
> 1.     the caller of Foo() gets compiled by C2
>
> 2.     or Foo() itself gets compiled by C2.
>
> I know how to do Bullet 1 above by defining Foo as an intrinsic but what is the best way to do #2?
>
> -- Tom
>
>
>





More information about the sumatra-dev mailing list