RFR [XS] 8155239 [TESTBUG] Simple test setup for JVMTI ClassFileLoadHook

Ioi Lam ioi.lam at oracle.com
Thu Apr 28 00:00:01 UTC 2016


Hi Misha,

Thanks for the review. I'll fix the code as you suggested and post a new 
version.

- Ioo

On 4/27/16 11:04 AM, mikhailo wrote:
> Hi Ioi,
>
>  Great. This is very helpful for the task at hand and more jvmti tests 
> to come.
>  Overall looks good, and I have couple of comments:
>
>    - I recommend moving the libSimpleClassFileLoadHook.c to a 
> sub-directory
>        under hotpsot/test/testlibrary, such as 
> hotpsot/test/testlibrary/jvmti
>
>     - libSimpleClassFileLoadHook.c
>       init_options():
>         - would it be safer to make a copy of "CLASS_NAME", "FROM" and 
> "TO"; I am not sure of the convention
>           of ownership of the arguments passed to Agent_Initialize(), 
> and who is required to free them
>           Just checking as a precaution
>
>        ClassFileLoadHook():
>         - please add a brief comment, something like "this hook will 
> match the class name to CLASS_NAME, and attempt
>           to replace any occurrence of 'FROM' string to 'TO' string"
>
> Thank you,
> Misha
>
>
> On 04/27/2016 06:44 AM, Ioi Lam wrote:
>> Hi,
>>
>> Please review this simple test bug:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8155239
>> http://cr.openjdk.java.net/~iklam/jdk9/8155239_simple_classfileloadhook.v01/ 
>>
>>
>> Testing ClassFileLoadHook is a pain. In many cases, we are not 
>> testing CFLH itself, but rather "how does my feature interact with 
>> CFLH. One example is the interaction between CDS and CFLH. This RFE 
>> makes it easy to write such tests.
>>
>> Please see SimpleClassFileLoadHookTest.java for an example.
>>
>> I've tested under Linux and I am now trying to test under all other 
>> platforms.
>>
>> Thanks
>> - Ioi
>



More information about the hotspot-dev mailing list