Interface AllocationListener


public interface AllocationListener
Listener to be notified about guest language value allocations. Calls to this listener are initiated by AllocationReporter.

Use Instrumenter.attachAllocationListener(com.oracle.truffle.api.instrumentation.AllocationEventFilter, com.oracle.truffle.api.instrumentation.AllocationListener) to register an implementation of this listener. Use EventBinding.dispose() to unregister.

The listener gets called before the actual allocation and right after it. The calls to these methods are always in pairs, unless the programs crashes in between. Nested allocations are supported, several calls to onEnter prior every sub-value allocation can be followed by the appropriate number of onReturnValue calls after the sub-values are allocated, in the opposite order.

Since:
0.27
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Notifies about an intent to allocate or re-allocate a guest language value.
    void
    Notifies about an allocated guest language value.
  • Method Details