sync_kit()

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue May 5 03:38:55 UTC 2015


There is pair of sync_kit(): one in IdealKit and an other in GraphKit. They are needed because  IdealKit and GraphKit 
use different mechanism to track current code state (control, memory, io nodes).

They are used if you need to intermix calls to IdealKit and GraphKit. If you start from IdealKit graph construction and 
you need to call GraphKit methods to add new nodes into the graph you need to call GraphKit::sync_kit() first and after 
all sequential calls to GraphKit methods, before any IdealKit method is called, you need to call IdealKit::sync_kit().

The good example is in LibraryCallKit::insert_pre_barrier().

Regards,
Vladimir

On 5/4/15 9:51 AM, Andrew Haley wrote:
> I'm trying to get my head around sync_kit().  I don't really know what
> it does.  Well, I know that it synchronizes IdealKit and graphKit, and
> I know from experience that if I don't call sync_kit() my code doesn't
> work.
>
> But what are the rules about when sync_kit() should be called?
>
> Thanks,
> Andrew.
>


More information about the hotspot-compiler-dev mailing list