You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Armand Navabi <an...@purdue.edu> on 2007/03/05 06:36:31 UTC

[drlvm][jvmti] JVMTI support?

Is there support for JVM Tool Interface from the JIT?  The developers 
guide says that the JVMTI support component relies on support from 
execution engines.  Section 3.3.2 mentions support for JVMTI in the 
interpreter, but I see no mention in the JIT section (Section 3.3.1).

I am trying to use this simple agent 
(http://wsjoung.wordpress.com/2006/11/17/the-java-virtual-machine-tool-interface-jvmti/), 
but it causes the following error:

ERROR: Unable to access JVMTI Version 1 (0x30010000), is your J2SE a 1.5 
or newer version? JNIEnvs GetEnv() returned -3

I tried to use the agent with both the JIT and the interpreter, but both 
resulted in the above error.

Thanks,
Armand

Re: [drlvm][jvmti] JVMTI support?

Posted by Armand Navabi <an...@purdue.edu>.
Gregory,

That worked (always using JVMTI_VERSION_1 constant).

Thanks,
Armand

Gregory Shimansky wrote:
> On Tuesday 06 March 2007 00:03 Armand Navabi wrote:
>   
>> Pavel,
>>
>> Interesting.  I am working on Ubuntu 6.06.  If I am in the Harmony bin
>> directory and I try to run like this:
>>
>> ./java -agentpath:<path to simpleAgent build> HelloWorld
>>
>> I get the error I explained before.  When I use Sun's java (java 5.0), it
>> works fine.
>>     
>
> I looked at the agent source and I find some inconsistency in its code. It 
> calls GetEnv with JVMTI_VERSION constant, but prints error message with 
> JVMTI_VERIONS_1 constant.
>
> These constants are actually different. The JVMTI_VERSION_1 constant has 0 in 
> MICRO version field while JVMTI_VERSION has the actual MICRO version for the 
> JVMTI implementation in VM. Could you change the agent to always use 
> JVMTI_VERSION_1? In this case you won't depend on the MICRO version of the 
> JVMTI implementation of the header file from JDK that you've used to compile 
> agent code.
>
>   
>> -----Original Message-----
>> From: Pavel Pervov [mailto:pmcfirst@gmail.com]
>> Sent: Monday, March 05, 2007 5:33 AM
>> To: dev@harmony.apache.org
>> Subject: Re: [drlvm][jvmti] JVMTI support?
>>
>> Armand,
>>
>> I tried this simple agent on Windows and got it working perfectly.
>>
>> What platform you are working on?
>>
>> Pavel.
>>
>> On 3/5/07, Armand Navabi <an...@purdue.edu> wrote:
>>     
>>> Is there support for JVM Tool Interface from the JIT?  The developers
>>> guide says that the JVMTI support component relies on support from
>>> execution engines.  Section 3.3.2 mentions support for JVMTI in the
>>> interpreter, but I see no mention in the JIT section (Section 3.3.1).
>>>
>>> I am trying to use this simple agent
>>> (
>>>       
>> http://wsjoung.wordpress.com/2006/11/17/the-java-virtual-machine-tool-inter
>> f ace-jvmti/
>>
>>     
>>> ),
>>> but it causes the following error:
>>>
>>> ERROR: Unable to access JVMTI Version 1 (0x30010000), is your J2SE a 1.5
>>> or newer version? JNIEnvs GetEnv() returned -3
>>>
>>> I tried to use the agent with both the JIT and the interpreter, but both
>>> resulted in the above error.
>>>
>>> Thanks,
>>> Armand
>>>       
>
>   


Re: [drlvm][jvmti] JVMTI support?

Posted by Gregory Shimansky <gs...@gmail.com>.
On Tuesday 06 March 2007 00:03 Armand Navabi wrote:
> Pavel,
>
> Interesting.  I am working on Ubuntu 6.06.  If I am in the Harmony bin
> directory and I try to run like this:
>
> ./java -agentpath:<path to simpleAgent build> HelloWorld
>
> I get the error I explained before.  When I use Sun's java (java 5.0), it
> works fine.

I looked at the agent source and I find some inconsistency in its code. It 
calls GetEnv with JVMTI_VERSION constant, but prints error message with 
JVMTI_VERIONS_1 constant.

These constants are actually different. The JVMTI_VERSION_1 constant has 0 in 
MICRO version field while JVMTI_VERSION has the actual MICRO version for the 
JVMTI implementation in VM. Could you change the agent to always use 
JVMTI_VERSION_1? In this case you won't depend on the MICRO version of the 
JVMTI implementation of the header file from JDK that you've used to compile 
agent code.

> -----Original Message-----
> From: Pavel Pervov [mailto:pmcfirst@gmail.com]
> Sent: Monday, March 05, 2007 5:33 AM
> To: dev@harmony.apache.org
> Subject: Re: [drlvm][jvmti] JVMTI support?
>
> Armand,
>
> I tried this simple agent on Windows and got it working perfectly.
>
> What platform you are working on?
>
> Pavel.
>
> On 3/5/07, Armand Navabi <an...@purdue.edu> wrote:
> > Is there support for JVM Tool Interface from the JIT?  The developers
> > guide says that the JVMTI support component relies on support from
> > execution engines.  Section 3.3.2 mentions support for JVMTI in the
> > interpreter, but I see no mention in the JIT section (Section 3.3.1).
> >
> > I am trying to use this simple agent
> > (
>
> http://wsjoung.wordpress.com/2006/11/17/the-java-virtual-machine-tool-inter
>f ace-jvmti/
>
> > ),
> > but it causes the following error:
> >
> > ERROR: Unable to access JVMTI Version 1 (0x30010000), is your J2SE a 1.5
> > or newer version? JNIEnvs GetEnv() returned -3
> >
> > I tried to use the agent with both the JIT and the interpreter, but both
> > resulted in the above error.
> >
> > Thanks,
> > Armand

-- 
Gregory

RE: [drlvm][jvmti] JVMTI support?

Posted by Armand Navabi <an...@purdue.edu>.
Pavel,

Interesting.  I am working on Ubuntu 6.06.  If I am in the Harmony bin
directory and I try to run like this:

./java -agentpath:<path to simpleAgent build> HelloWorld

I get the error I explained before.  When I use Sun's java (java 5.0), it
works fine.

Armand

-----Original Message-----
From: Pavel Pervov [mailto:pmcfirst@gmail.com] 
Sent: Monday, March 05, 2007 5:33 AM
To: dev@harmony.apache.org
Subject: Re: [drlvm][jvmti] JVMTI support?

Armand,

I tried this simple agent on Windows and got it working perfectly.

What platform you are working on?

Pavel.
On 3/5/07, Armand Navabi <an...@purdue.edu> wrote:
>
> Is there support for JVM Tool Interface from the JIT?  The developers
> guide says that the JVMTI support component relies on support from
> execution engines.  Section 3.3.2 mentions support for JVMTI in the
> interpreter, but I see no mention in the JIT section (Section 3.3.1).
>
> I am trying to use this simple agent
> (
>
http://wsjoung.wordpress.com/2006/11/17/the-java-virtual-machine-tool-interf
ace-jvmti/
> ),
> but it causes the following error:
>
> ERROR: Unable to access JVMTI Version 1 (0x30010000), is your J2SE a 1.5
> or newer version? JNIEnvs GetEnv() returned -3
>
> I tried to use the agent with both the JIT and the interpreter, but both
> resulted in the above error.
>
> Thanks,
> Armand
>



-- 
Pavel Pervov,
Intel Enterprise Solutions Software Division


Re: [drlvm][jvmti] JVMTI support?

Posted by Pavel Pervov <pm...@gmail.com>.
Armand,

I tried this simple agent on Windows and got it working perfectly.

What platform you are working on?

Pavel.
On 3/5/07, Armand Navabi <an...@purdue.edu> wrote:
>
> Is there support for JVM Tool Interface from the JIT?  The developers
> guide says that the JVMTI support component relies on support from
> execution engines.  Section 3.3.2 mentions support for JVMTI in the
> interpreter, but I see no mention in the JIT section (Section 3.3.1).
>
> I am trying to use this simple agent
> (
> http://wsjoung.wordpress.com/2006/11/17/the-java-virtual-machine-tool-interface-jvmti/
> ),
> but it causes the following error:
>
> ERROR: Unable to access JVMTI Version 1 (0x30010000), is your J2SE a 1.5
> or newer version? JNIEnvs GetEnv() returned -3
>
> I tried to use the agent with both the JIT and the interpreter, but both
> resulted in the above error.
>
> Thanks,
> Armand
>



-- 
Pavel Pervov,
Intel Enterprise Solutions Software Division

Re: [drlvm][jvmti] JVMTI support?

Posted by Pavel Ozhdikhin <pa...@gmail.com>.
Armand,

Sorry I can't answer what's wrong with the agent configuration, I beleive
someone has better knowledge here to answer, but you may see which JVMTI
features are implemented in interpreter/JIT on this page:

http://wiki.apache.org/harmony/JVMTI_Implementation_Status

Thank you,
Pavel

On 3/5/07, Armand Navabi <an...@purdue.edu> wrote:
>
> Is there support for JVM Tool Interface from the JIT?  The developers
> guide says that the JVMTI support component relies on support from
> execution engines.  Section 3.3.2 mentions support for JVMTI in the
> interpreter, but I see no mention in the JIT section (Section 3.3.1).
>
> I am trying to use this simple agent
> (
> http://wsjoung.wordpress.com/2006/11/17/the-java-virtual-machine-tool-interface-jvmti/
> ),
> but it causes the following error:
>
> ERROR: Unable to access JVMTI Version 1 (0x30010000), is your J2SE a 1.5
> or newer version? JNIEnvs GetEnv() returned -3
>
> I tried to use the agent with both the JIT and the interpreter, but both
> resulted in the above error.
>
> Thanks,
> Armand
>