harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov" <mike.fur...@gmail.com>
Subject Re: problem about System.loadLibrary and object's address
Date Mon, 30 Apr 2007 12:28:44 GMT
BTW in JIT we have escape analysis optimization and if JIT can prove that an
object is not escaped from a method it can replace the object with a set of
local variables. Note that with aggressive inlining and profile guided
devirtualization the scope for this optimization is wider than the scope of
an original Java method.
JIT can scalarize an object even if the object is escaped. In this case
object is created and initialized right before the place it escapes.

An additional JIT-GC interface with manual 'free' method call for an object
can be used as a separate feature on execution paths that are not hot enough
to use scalarizaton on them.

On 4/30/07, LvJimmy´╝îJing <firepure@gmail.com> wrote:
> <SNIP>
> >
> > Jimmy, it's possible to insert free() automatically in jitted code to
> > reclaim some short-lived objects. This can be a supplementary to the
> > GC, and probably improve the overall performance. Tingpeng had
> > previous discussions with me on this topic actually.
> >
> Sorry I don't know the context.
> So the short-lived objects you mentioned can be invoked both in the
> native code and java code? And, should this "free" register to GC to
> tell GC the object has been reclaimed? Or the alloc and free process
> can be totally un-known to GC?
> And do VM offer some API for these functions?
> Please tell me if I miss something :)
> I'm very interested in this free() as well, I'll follow this thread.
> > TingPeng, the runtime helper is a way in DRLVM for the VM to provide
> > JIT certain supports, e.g.,  exception throwing, etc.  One of the
> > important usages of runtime helper is to provide a way of fast native
> > method invocation. That is, when you know a native method never causes
> > GC, you probably can use a runtime helper for JIT to generate code to
> > invoke this native method directly without going through the JNI
> > stuff. This makes native call fast.
> >
> > You can find runtime helper code in jit_runtime_support related files.
> > Please go search VM_RT_AASTORE in vm source code, you will see in
> > vmcore/src/util/ia32/base/jit_runtime_support_ia32.cpp how aastore can
> > implemented in native code to support JIT.    VM_RT_GC_HEAP_WRITE_REF
> > is an example for write barrier native implementation
> > gc_heap_slot_write_ref().
> >
> > Please let me know if you have any further questions.
> >
> > Thanks. xiaofeng
> >
> <SNIP>
> --
> Best Regards!
> Jimmy, Jing Lv
> China Software Development Lab, IBM

Mikhail Fursov

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message