You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by "Jimmy, Jing Lv" <fi...@gmail.com> on 2006/08/21 09:13:34 UTC

[classlib][instrument]and[VM]:launcher with parameter "javaagent"

Hi,

     On writing tests for java.lang.instrument, I find it nice Harmony 
launcher can accept parameter "-javaagent" currently. Look deep into the 
launcher code, I find the parameter was really parsed by VM itself 
currently.
     And if I use J9VM, it can accept such parameter but ask for 
"instrument.dll". As we know, Harmony naming convention use "hyXXX.dll" 
as dll-file name. So vm fails to load lib here. However if I copy the 
file "hyinstrument.dll" to "instrument.dll", J9VM load it happily and 
pass my test on Instrument.
     I do not know what does DRLVM or other VMs do here (I'd like to 
hear if jvmti has been implemented in DRLVM).

     So Instrument testcases can not be put to svn until this problem is 
solved (or it'll break build!). I guess there are two ways here:
     1. to work around, add a line in build.xml, copy the file to 
"instrument.dll", and wait for VM to get updated. Or we change filename 
in build system forever?
     2. I wonder if we can modify in launcher, parse the parameter and 
pass the dll filename to VM?

     Any suggestions?Thanks!


-- 

Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib][instrument]and[VM]:launcher with parameter "javaagent"

Posted by Oliver Deakin <ol...@googlemail.com>.
Jimmy, Jing Lv wrote:
> Hi,
>
>     On writing tests for java.lang.instrument, I find it nice Harmony 
> launcher can accept parameter "-javaagent" currently. Look deep into 
> the launcher code, I find the parameter was really parsed by VM itself 
> currently.
>     And if I use J9VM, it can accept such parameter but ask for 
> "instrument.dll". As we know, Harmony naming convention use 
> "hyXXX.dll" as dll-file name. So vm fails to load lib here. However if 
> I copy the file "hyinstrument.dll" to "instrument.dll", J9VM load it 
> happily and pass my test on Instrument.

Great - Ill look into getting this fixed in the next VME so that it picks
up hyinstrument.dll when running with Harmony.

>     I do not know what does DRLVM or other VMs do here (I'd like to 
> hear if jvmti has been implemented in DRLVM).
>
>     So Instrument testcases can not be put to svn until this problem 
> is solved (or it'll break build!). I guess there are two ways here:

If it is holding you up, then the tests could always be checked into svn
and just excluded?

Regards,
Oliver

>     1. to work around, add a line in build.xml, copy the file to 
> "instrument.dll", and wait for VM to get updated. Or we change 
> filename in build system forever?
>     2. I wonder if we can modify in launcher, parse the parameter and 
> pass the dll filename to VM?
>
>     Any suggestions?Thanks!
>
>

-- 
Oliver Deakin
IBM United Kingdom Limited


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib][instrument]and[VM]:launcher with parameter "javaagent"

Posted by "Jimmy, Jing Lv" <fi...@gmail.com>.
Geir Magnusson Jr wrote:
> 
> Jimmy, Jing Lv wrote:
>> Hi,
>>
>>     On writing tests for java.lang.instrument, I find it nice Harmony
>> launcher can accept parameter "-javaagent" currently. Look deep into the
>> launcher code, I find the parameter was really parsed by VM itself
>> currently.
>>     And if I use J9VM, it can accept such parameter but ask for
>> "instrument.dll". As we know, Harmony naming convention use "hyXXX.dll"
>> as dll-file name. 
> 
> Time to fix that.
> 
>> So vm fails to load lib here. However if I copy the
>> file "hyinstrument.dll" to "instrument.dll", J9VM load it happily and
>> pass my test on Instrument.
> 
> Yay!
> 
>>     I do not know what does DRLVM or other VMs do here (I'd like to hear
>> if jvmti has been implemented in DRLVM).
> 
> I have zero interest in perpetuating the "hy" abhorrence.

Hi,
     So Harmony is going to omit "hy" in DLLs? Do we have a plan on 
that? It'll be nice as test can work without VM changes :)

>>     So Instrument testcases can not be put to svn until this problem is
>> solved (or it'll break build!). I guess there are two ways here:
>>     1. to work around, add a line in build.xml, copy the file to
>> "instrument.dll", and wait for VM to get updated. Or we change filename
>> in build system forever?
> 
> Yay!
> 
>>     2. I wonder if we can modify in launcher, parse the parameter and
>> pass the dll filename to VM?
> 
> That's a very good idea - then you can "A/B" test with known good
> instrumentation.
> 
> geir
> 
> 
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> 
> 


-- 

Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib][instrument]and[VM]:launcher with parameter "javaagent"

Posted by Geir Magnusson Jr <ge...@pobox.com>.

Jimmy, Jing Lv wrote:
> Hi,
> 
>     On writing tests for java.lang.instrument, I find it nice Harmony
> launcher can accept parameter "-javaagent" currently. Look deep into the
> launcher code, I find the parameter was really parsed by VM itself
> currently.
>     And if I use J9VM, it can accept such parameter but ask for
> "instrument.dll". As we know, Harmony naming convention use "hyXXX.dll"
> as dll-file name. 

Time to fix that.

> So vm fails to load lib here. However if I copy the
> file "hyinstrument.dll" to "instrument.dll", J9VM load it happily and
> pass my test on Instrument.

Yay!

>     I do not know what does DRLVM or other VMs do here (I'd like to hear
> if jvmti has been implemented in DRLVM).

I have zero interest in perpetuating the "hy" abhorrence.
> 
>     So Instrument testcases can not be put to svn until this problem is
> solved (or it'll break build!). I guess there are two ways here:
>     1. to work around, add a line in build.xml, copy the file to
> "instrument.dll", and wait for VM to get updated. Or we change filename
> in build system forever?

Yay!

>     2. I wonder if we can modify in launcher, parse the parameter and
> pass the dll filename to VM?

That's a very good idea - then you can "A/B" test with known good
instrumentation.

geir


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org