harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paulex Yang <paulex.y...@gmail.com>
Subject Re: [classlib] Plan on work on java.lang.instrument
Date Thu, 03 Aug 2006 06:21:23 GMT
Gregory Shimansky wrote:
> On Wednesday 02 August 2006 17:30 Paulex Yang wrote:
>   
>> Alexey Varlamov wrote:
>>     
>>> [SNIP]
>>>
>>>       
>>>>     For native codes, instrument need a new directory in
>>>> modules/luni/src/main/native named "instrument", in my plan, there
>>>> should be two native code, one for instrument native implementation, and
>>>> another for laugher (for parameter "-javaagent"). Instrument shall be
>>>> compiled into a .DLL(.so) file alone.
>>>>         
>>> Jimmy,
>>> Could you please add some details on the launcher part? I'd rather
>>> think that common VM launcher should be updated to support
>>> "-javaagent:" option
>>>       
>> Agree, it should can be handled by common launcher.
>>
>>     
>>> - which is basically a second class to launch.
>>>       
>> I think there is some difference, actually I expect it parses the
>> parameters following "-javaagent:", then converts it to
>> "-agentlib:hyinstrument.dll..." and at last passes them to VM.
>>     
>
> I don't think there is any conversion required. I believe -javaagent is a VM 
> option and should be handled internally by the invocation API in case there 
> is a 3rd party launcher/plugin which tries to use VM's invocation API 
> directly. The agent library may be even linked statically to VM and hidden 
> from direct use on the command line.
>   
The agent library (instrument implementation)  is implemented in 
classlib and is independent with VM, why it needs to be linked 
statically? Even RI, which seems don't think too much on the classlib/VM 
modulazation, has the instrument.dll separated.

Considering 3rd party launcher, I agree that it is convenient to put the 
-javaagent parsing in VM directly, but then VM must be aware of the 
agent lib's name, though it may be fine because it is not likely for 
Harmony to change it frequently.
> On a side note, -agentlib specifies agent library in OS independent way so it 
> should be "-agentlib:hyinstrument=..."
>
>   
Thanks for point it out, I actually meant the same thing.


-- 
Paulex Yang
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


Mime
View raw message