On Saturday 13 May 2006 02:53 Elford, Chris L wrote:
>   I'll need to look at this a bit more closely.  Some of the
> CompiledMethodLoad data for secondary jit events look a bit strange.  It
> sounds like support is still early so this type of issue will likely be
> resolved as the VM and JIT evolve?
>
> For example, for
> org.eclipse.osgi.framework.internal.core.KeyedHashSet.getByKey(Ljava/lan
> g/Object;)Lorg/eclipse/osgi/framework/internal/core/KeyedElement;
>
> I see three CompiledMethodLoad events.
>
> VA                            Length          Time
> 0x0000000000D196C0 0x000000000000039A 05/12-15:25:21
> 0x000000000B2D6D10 0x000000000000021C 05/12-15:25:41
> 0x0000000000D196C0 0x000000000000039A 05/12-15:25:41
>
> It looks like the method is jitted once then 20 seconds later it is
> rejitted to a new address [and made smaller] then is immediately
> rejitted back to its original location and size.

Hello Chris. I think I know what is happening. It is just a guess since I 
don't know the details of recompilation, but this guess explains this strange 
behavior.

Each method may have multiple code chunks, some compiled with the same JITs, 
other compiled with different ones. When recompilation happens the new chunks 
are added to the list of code chunks of the method. Since JVMTI doesn't 
really know what chunks were reported already and which were not, it reports 
all of them every time a method is compiled. So for the second time you see 
both new and old code.

This is probably not very convenient but that's how it currently works. I 
think it is a bug and before compilation is done JVMTI has to remember all 
code chunks that are already present in the method and then report only new 
ones. Maybe there is an easier way to distinguis between old and new code 
chunks, I'll have to look closer at the code.

> -----Original Message-----
> From: Gregory Shimansky [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 12, 2006 3:08 PM
> To: harmony-dev@incubator.apache.org
> Subject: Re: [DRLVM] -- JVMTI support?
>
> On Friday 12 May 2006 22:18 Elford, Chris L wrote:
> > Hi all,
> >
> >   I was working with the version of DRLVM that I compiled off of
> > JIRA-438.  I tried it with a JVMTI agent using -agentlib:...  It looks
> > like this version gives Class Load events.  According to JVMTI,
>
> loading
>
> > eclipse loads 4,189 classes.
> >
> >   I'm not seeing any Method Load Events though.  Has anyone else tried
> > JIRA-438 with JVMTI and seen more events?
>
> If you mean CompiledMethodLoad event, you may not see it since when
> JVMTI is
> enabled on command line (-agentlib, -agentpath or -xrun options are
> specified) then by defaul VM currently enables interpreter mode. It is
> made
> because JVMTI is not implemented to any usable extent in VM in JIT mode
> yet.
> But in interpreter mode it is already usable for simple debugging.
>
> So if you want to see CompiledMethodLoad event you need to explicitly
> specify
> -Dvm.use_interpreter=false on the VM command line. This will allow you
> to
> receive some JIT/interpreter independent events like ClassLoad or
> ClassPrepare and several profiling related events like
> CompiledMethodLoad or
> DynamicCodeGenerated. If that doesn't work, let me know. It should :)

-- 
Gregory Shimansky, Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to