Re: JVMTI not receiving field access events with fast_getfield

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: JVMTI not receiving field access events with fast_getfield

Daniel D. Daugherty
Adding in the Serviceability team since JVM/TI belongs there.

Dan


On 12/12/17 7:46 AM, Vladimir Ivanov wrote:

> Thanks for the report, Amir!
>
> Unfortunately, I can't access the bug you filed.
>
> Can you, please, share the test case and instructions how to reproduce
> the problem?
>
> Also, what Java version & platform do you observe the bug on?
>
> I briefly looked into template interpreter code on x86 and it does
> have relevant code to post JVMTI events in fast accessors.
>
> Best regards,
> Vladimir Ivanov
>
> On 12/12/17 11:12 AM, Amir Rapson wrote:
>> Hi Daniel, Coleen and Vladimir,
>>
>> I tracked your email addresses from some mailing lists and hopefully
>> one of you is a relevant person for my problem.
>>
>> I also filed a bug request (ID 9051849) but since I don’t have an
>> option to add information I decided to email you.
>>
>> The problem I’m seeing is that JMTI does not receive field access
>> events (and probably field modification events) when /fast_getfield/
>> is used instead of /get_field/.
>>
>> I verified this by disabling all the
>> /patch_bytecode(Bytecodes::_fast_?getfield, bc, rbx)/ in
>> /TemplateTable::getfield_or_static()/ and made sure that JVMTI
>> receives all the correct events.
>>
>> I have the agent code and a short java program that can reproduce the
>> problem and would be happy to assist in fixing and or debugging this
>> issue.
>>
>> I would appreciate any feedback.
>>
>> Best regards,
>>
>> Amir
>>
>> ​​​​​Amir Rapson | Founder & VP Eng @ *vFunction* | 7 HaPelech St.
>> Tel-Aviv | +972-522650968
>>

Reply | Threaded
Open this post in threaded view
|

RE: JVMTI not receiving field access events with fast_getfield

Amir Rapson
Hi,

I know the code has some relevant code, but it doesn't seem to work. You
will see some differences: the CALL_VM to the post function has only 2
arguments and not 3, I'm not sure it matters.

The platform is x86_64, Java version is 1.8.0-152. I can try other versions
if you wish.

Please find the attached MyAgent.cpp MyAgent.h and com_vfunction_Main.h to
compile the agent.
Please also find the attached com.vfunction.zip that holds the simple java
util to reproduce the problem.

You'll see the problem on ArrayList.add(item) where you'll get events only
on codes #16 and #22 and not on #2 and #11 (see attached bytecode.txt of
said function).

Please let me know once you managed to reproduce it. I can also send you a
patch file to disable the fast_getfield (and fast putfield) to show that the
problem disappears.

I'm currently looking at the actual assembly of the add function, both with
the modified hotspot and without and will try to assist will offering a fix
for this issue.

One last thing. I saw a very old issue (resolved by Daniel Daugherty)
stating that fast_getfield was not completely addressed with the resolution
on this issue. The bug ID is
https://bugs.openjdk.java.net/browse/JDK-4300409

I'll be happy to assist further.

Best regards,
Amir


-----Original Message-----
From: Vladimir Ivanov [mailto:[hidden email]]
Sent: Tuesday, December 12, 2017 2:46 PM
To: Amir Rapson <[hidden email]>
Cc: [hidden email]; [hidden email]
Subject: Re: JVMTI not receiving field access events with fast_getfield

Thanks for the report, Amir!

Unfortunately, I can't access the bug you filed.

Can you, please, share the test case and instructions how to reproduce the
problem?

Also, what Java version & platform do you observe the bug on?

I briefly looked into template interpreter code on x86 and it does have
relevant code to post JVMTI events in fast accessors.

Best regards,
Vladimir Ivanov

On 12/12/17 11:12 AM, Amir Rapson wrote:

> Hi Daniel, Coleen and Vladimir,
>
> I tracked your email addresses from some mailing lists and hopefully
> one of you is a relevant person for my problem.
>
> I also filed a bug request (ID 9051849) but since I don’t have an
> option to add information I decided to email you.
>
> The problem I’m seeing is that JMTI does not receive field access
> events (and probably field modification events) when /fast_getfield/
> is used instead of /get_field/.
>
> I verified this by disabling all the
> /patch_bytecode(Bytecodes::_fast_?getfield, bc, rbx)/ in
> /TemplateTable::getfield_or_static()/ and made sure that JVMTI
> receives all the correct events.
>
> I have the agent code and a short java program that can reproduce the
> problem and would be happy to assist in fixing and or debugging this
> issue.
>
> I would appreciate any feedback.
>
> Best regards,
>
> Amir
>
> ​​​​​Amir Rapson | Founder & VP Eng @ *vFunction* | 7 HaPelech St.
> Tel-Aviv | +972-522650968
>

com_vfunction_Main.h (714 bytes) Download Attachment
MyAgent.cpp (7K) Download Attachment
com.vfunction.zip (1K) Download Attachment
bytecode.txt (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: JVMTI not receiving field access events with fast_getfield

Daniel D. Daugherty
Amir,

Your https://bugs.openjdk.java.net/browse/JI-9051849 bug has been
moved to https://bugs.openjdk.java.net/browse/JDK-8193369.

Someone on the Serviceability team should pick up this thread
from here, but we're right at the end game for JDK10 so it might
take some time...

Dan


On 12/12/17 8:03 AM, Amir Rapson wrote:

> Hi,
>
> I know the code has some relevant code, but it doesn't seem to work. You
> will see some differences: the CALL_VM to the post function has only 2
> arguments and not 3, I'm not sure it matters.
>
> The platform is x86_64, Java version is 1.8.0-152. I can try other versions
> if you wish.
>
> Please find the attached MyAgent.cpp MyAgent.h and com_vfunction_Main.h to
> compile the agent.
> Please also find the attached com.vfunction.zip that holds the simple java
> util to reproduce the problem.
>
> You'll see the problem on ArrayList.add(item) where you'll get events only
> on codes #16 and #22 and not on #2 and #11 (see attached bytecode.txt of
> said function).
>
> Please let me know once you managed to reproduce it. I can also send you a
> patch file to disable the fast_getfield (and fast putfield) to show that the
> problem disappears.
>
> I'm currently looking at the actual assembly of the add function, both with
> the modified hotspot and without and will try to assist will offering a fix
> for this issue.
>
> One last thing. I saw a very old issue (resolved by Daniel Daugherty)
> stating that fast_getfield was not completely addressed with the resolution
> on this issue. The bug ID is
> https://bugs.openjdk.java.net/browse/JDK-4300409
>
> I'll be happy to assist further.
>
> Best regards,
> Amir
>
>
> -----Original Message-----
> From: Vladimir Ivanov [mailto:[hidden email]]
> Sent: Tuesday, December 12, 2017 2:46 PM
> To: Amir Rapson <[hidden email]>
> Cc: [hidden email]; [hidden email]
> Subject: Re: JVMTI not receiving field access events with fast_getfield
>
> Thanks for the report, Amir!
>
> Unfortunately, I can't access the bug you filed.
>
> Can you, please, share the test case and instructions how to reproduce the
> problem?
>
> Also, what Java version & platform do you observe the bug on?
>
> I briefly looked into template interpreter code on x86 and it does have
> relevant code to post JVMTI events in fast accessors.
>
> Best regards,
> Vladimir Ivanov
>
> On 12/12/17 11:12 AM, Amir Rapson wrote:
>> Hi Daniel, Coleen and Vladimir,
>>
>> I tracked your email addresses from some mailing lists and hopefully
>> one of you is a relevant person for my problem.
>>
>> I also filed a bug request (ID 9051849) but since I don’t have an
>> option to add information I decided to email you.
>>
>> The problem I’m seeing is that JMTI does not receive field access
>> events (and probably field modification events) when /fast_getfield/
>> is used instead of /get_field/.
>>
>> I verified this by disabling all the
>> /patch_bytecode(Bytecodes::_fast_?getfield, bc, rbx)/ in
>> /TemplateTable::getfield_or_static()/ and made sure that JVMTI
>> receives all the correct events.
>>
>> I have the agent code and a short java program that can reproduce the
>> problem and would be happy to assist in fixing and or debugging this
>> issue.
>>
>> I would appreciate any feedback.
>>
>> Best regards,
>>
>> Amir
>>
>> ​​​​​Amir Rapson | Founder & VP Eng @ *vFunction* | 7 HaPelech St.
>> Tel-Aviv | +972-522650968
>>

Reply | Threaded
Open this post in threaded view
|

RE: JVMTI not receiving field access events with fast_getfield

Amir Rapson
Thank you Dan. Much appreciated.

Again, let me know if I can assist with anything.

Best,
Amir

-----Original Message-----
From: Daniel D. Daugherty [mailto:[hidden email]]
Sent: Tuesday, December 12, 2017 3:13 PM
To: Amir Rapson <[hidden email]>; Vladimir Ivanov
<[hidden email]>; [hidden email]
Cc: [hidden email]
Subject: Re: JVMTI not receiving field access events with fast_getfield

Amir,

Your https://bugs.openjdk.java.net/browse/JI-9051849 bug has been moved to
https://bugs.openjdk.java.net/browse/JDK-8193369.

Someone on the Serviceability team should pick up this thread from here, but
we're right at the end game for JDK10 so it might take some time...

Dan


On 12/12/17 8:03 AM, Amir Rapson wrote:

> Hi,
>
> I know the code has some relevant code, but it doesn't seem to work.
> You will see some differences: the CALL_VM to the post function has
> only 2 arguments and not 3, I'm not sure it matters.
>
> The platform is x86_64, Java version is 1.8.0-152. I can try other
> versions if you wish.
>
> Please find the attached MyAgent.cpp MyAgent.h and
> com_vfunction_Main.h to compile the agent.
> Please also find the attached com.vfunction.zip that holds the simple
> java util to reproduce the problem.
>
> You'll see the problem on ArrayList.add(item) where you'll get events
> only on codes #16 and #22 and not on #2 and #11 (see attached
> bytecode.txt of said function).
>
> Please let me know once you managed to reproduce it. I can also send
> you a patch file to disable the fast_getfield (and fast putfield) to
> show that the problem disappears.
>
> I'm currently looking at the actual assembly of the add function, both
> with the modified hotspot and without and will try to assist will
> offering a fix for this issue.
>
> One last thing. I saw a very old issue (resolved by Daniel Daugherty)
> stating that fast_getfield was not completely addressed with the
> resolution on this issue. The bug ID is
> https://bugs.openjdk.java.net/browse/JDK-4300409
>
> I'll be happy to assist further.
>
> Best regards,
> Amir
>
>
> -----Original Message-----
> From: Vladimir Ivanov [mailto:[hidden email]]
> Sent: Tuesday, December 12, 2017 2:46 PM
> To: Amir Rapson <[hidden email]>
> Cc: [hidden email]; [hidden email]
> Subject: Re: JVMTI not receiving field access events with
> fast_getfield
>
> Thanks for the report, Amir!
>
> Unfortunately, I can't access the bug you filed.
>
> Can you, please, share the test case and instructions how to reproduce
> the problem?
>
> Also, what Java version & platform do you observe the bug on?
>
> I briefly looked into template interpreter code on x86 and it does
> have relevant code to post JVMTI events in fast accessors.
>
> Best regards,
> Vladimir Ivanov
>
> On 12/12/17 11:12 AM, Amir Rapson wrote:
>> Hi Daniel, Coleen and Vladimir,
>>
>> I tracked your email addresses from some mailing lists and hopefully
>> one of you is a relevant person for my problem.
>>
>> I also filed a bug request (ID 9051849) but since I don’t have an
>> option to add information I decided to email you.
>>
>> The problem I’m seeing is that JMTI does not receive field access
>> events (and probably field modification events) when /fast_getfield/
>> is used instead of /get_field/.
>>
>> I verified this by disabling all the
>> /patch_bytecode(Bytecodes::_fast_?getfield, bc, rbx)/ in
>> /TemplateTable::getfield_or_static()/ and made sure that JVMTI
>> receives all the correct events.
>>
>> I have the agent code and a short java program that can reproduce the
>> problem and would be happy to assist in fixing and or debugging this
>> issue.
>>
>> I would appreciate any feedback.
>>
>> Best regards,
>>
>> Amir
>>
>> ​​​​​Amir Rapson | Founder & VP Eng @ *vFunction* | 7 HaPelech St.
>> Tel-Aviv | +972-522650968
>>
Reply | Threaded
Open this post in threaded view
|

RE: JVMTI not receiving field access events with fast_getfield

Amir Rapson
In reply to this post by Daniel D. Daugherty
Hi,

If you could please remove my phone number from the comments of the bug.

Thanks,
Amir

-----Original Message-----
From: Amir Rapson [mailto:[hidden email]]
Sent: Tuesday, December 12, 2017 3:24 PM
To: '[hidden email]' <[hidden email]>; 'Vladimir
Ivanov' <[hidden email]>;
'[hidden email]' <[hidden email]>
Cc: '[hidden email]' <[hidden email]>
Subject: RE: JVMTI not receiving field access events with fast_getfield

Thank you Dan. Much appreciated.

Again, let me know if I can assist with anything.

Best,
Amir

-----Original Message-----
From: Daniel D. Daugherty [mailto:[hidden email]]
Sent: Tuesday, December 12, 2017 3:13 PM
To: Amir Rapson <[hidden email]>; Vladimir Ivanov
<[hidden email]>; [hidden email]
Cc: [hidden email]
Subject: Re: JVMTI not receiving field access events with fast_getfield

Amir,

Your https://bugs.openjdk.java.net/browse/JI-9051849 bug has been moved to
https://bugs.openjdk.java.net/browse/JDK-8193369.

Someone on the Serviceability team should pick up this thread from here, but
we're right at the end game for JDK10 so it might take some time...

Dan


On 12/12/17 8:03 AM, Amir Rapson wrote:

> Hi,
>
> I know the code has some relevant code, but it doesn't seem to work.
> You will see some differences: the CALL_VM to the post function has
> only 2 arguments and not 3, I'm not sure it matters.
>
> The platform is x86_64, Java version is 1.8.0-152. I can try other
> versions if you wish.
>
> Please find the attached MyAgent.cpp MyAgent.h and
> com_vfunction_Main.h to compile the agent.
> Please also find the attached com.vfunction.zip that holds the simple
> java util to reproduce the problem.
>
> You'll see the problem on ArrayList.add(item) where you'll get events
> only on codes #16 and #22 and not on #2 and #11 (see attached
> bytecode.txt of said function).
>
> Please let me know once you managed to reproduce it. I can also send
> you a patch file to disable the fast_getfield (and fast putfield) to
> show that the problem disappears.
>
> I'm currently looking at the actual assembly of the add function, both
> with the modified hotspot and without and will try to assist will
> offering a fix for this issue.
>
> One last thing. I saw a very old issue (resolved by Daniel Daugherty)
> stating that fast_getfield was not completely addressed with the
> resolution on this issue. The bug ID is
> https://bugs.openjdk.java.net/browse/JDK-4300409
>
> I'll be happy to assist further.
>
> Best regards,
> Amir
>
>
> -----Original Message-----
> From: Vladimir Ivanov [mailto:[hidden email]]
> Sent: Tuesday, December 12, 2017 2:46 PM
> To: Amir Rapson <[hidden email]>
> Cc: [hidden email]; [hidden email]
> Subject: Re: JVMTI not receiving field access events with
> fast_getfield
>
> Thanks for the report, Amir!
>
> Unfortunately, I can't access the bug you filed.
>
> Can you, please, share the test case and instructions how to reproduce
> the problem?
>
> Also, what Java version & platform do you observe the bug on?
>
> I briefly looked into template interpreter code on x86 and it does
> have relevant code to post JVMTI events in fast accessors.
>
> Best regards,
> Vladimir Ivanov
>
> On 12/12/17 11:12 AM, Amir Rapson wrote:
>> Hi Daniel, Coleen and Vladimir,
>>
>> I tracked your email addresses from some mailing lists and hopefully
>> one of you is a relevant person for my problem.
>>
>> I also filed a bug request (ID 9051849) but since I don’t have an
>> option to add information I decided to email you.
>>
>> The problem I’m seeing is that JMTI does not receive field access
>> events (and probably field modification events) when /fast_getfield/
>> is used instead of /get_field/.
>>
>> I verified this by disabling all the
>> /patch_bytecode(Bytecodes::_fast_?getfield, bc, rbx)/ in
>> /TemplateTable::getfield_or_static()/ and made sure that JVMTI
>> receives all the correct events.
>>
>> I have the agent code and a short java program that can reproduce the
>> problem and would be happy to assist in fixing and or debugging this
>> issue.
>>
>> I would appreciate any feedback.
>>
>> Best regards,
>>
>> Amir
>>
>> ​​​​​Amir Rapson | Founder & VP Eng @ *vFunction* | 7 HaPelech St.
>> Tel-Aviv | +972-522650968
>>
Reply | Threaded
Open this post in threaded view
|

Re: JVMTI not receiving field access events with fast_getfield

Tim Bell
Adding [hidden email]

Chris - could you remove the personal number from the bug report please?
  The system won't let me do it.

Thank you-

Tim (list moderator for [hidden email])


On 12/20/17 05:40, Amir Rapson wrote:

> Hi,
>
> If you could please remove my phone number from the comments of the bug.
>
> Thanks,
> Amir
>
> -----Original Message-----
> From: Amir Rapson [mailto:[hidden email]]
> Sent: Tuesday, December 12, 2017 3:24 PM
> To: '[hidden email]' <[hidden email]>; 'Vladimir
> Ivanov' <[hidden email]>;
> '[hidden email]' <[hidden email]>
> Cc: '[hidden email]' <[hidden email]>
> Subject: RE: JVMTI not receiving field access events with fast_getfield
>
> Thank you Dan. Much appreciated.
>
> Again, let me know if I can assist with anything.
>
> Best,
> Amir
>
> -----Original Message-----
> From: Daniel D. Daugherty [mailto:[hidden email]]
> Sent: Tuesday, December 12, 2017 3:13 PM
> To: Amir Rapson <[hidden email]>; Vladimir Ivanov
> <[hidden email]>; [hidden email]
> Cc: [hidden email]
> Subject: Re: JVMTI not receiving field access events with fast_getfield
>
> Amir,
>
> Your https://bugs.openjdk.java.net/browse/JI-9051849 bug has been moved to
> https://bugs.openjdk.java.net/browse/JDK-8193369.
>
> Someone on the Serviceability team should pick up this thread from here, but
> we're right at the end game for JDK10 so it might take some time...
>
> Dan
>
>
> On 12/12/17 8:03 AM, Amir Rapson wrote:
>> Hi,
>>
>> I know the code has some relevant code, but it doesn't seem to work.
>> You will see some differences: the CALL_VM to the post function has
>> only 2 arguments and not 3, I'm not sure it matters.
>>
>> The platform is x86_64, Java version is 1.8.0-152. I can try other
>> versions if you wish.
>>
>> Please find the attached MyAgent.cpp MyAgent.h and
>> com_vfunction_Main.h to compile the agent.
>> Please also find the attached com.vfunction.zip that holds the simple
>> java util to reproduce the problem.
>>
>> You'll see the problem on ArrayList.add(item) where you'll get events
>> only on codes #16 and #22 and not on #2 and #11 (see attached
>> bytecode.txt of said function).
>>
>> Please let me know once you managed to reproduce it. I can also send
>> you a patch file to disable the fast_getfield (and fast putfield) to
>> show that the problem disappears.
>>
>> I'm currently looking at the actual assembly of the add function, both
>> with the modified hotspot and without and will try to assist will
>> offering a fix for this issue.
>>
>> One last thing. I saw a very old issue (resolved by Daniel Daugherty)
>> stating that fast_getfield was not completely addressed with the
>> resolution on this issue. The bug ID is
>> https://bugs.openjdk.java.net/browse/JDK-4300409
>>
>> I'll be happy to assist further.
>>
>> Best regards,
>> Amir
>>
>>
>> -----Original Message-----
>> From: Vladimir Ivanov [mailto:[hidden email]]
>> Sent: Tuesday, December 12, 2017 2:46 PM
>> To: Amir Rapson <[hidden email]>
>> Cc: [hidden email]; [hidden email]
>> Subject: Re: JVMTI not receiving field access events with
>> fast_getfield
>>
>> Thanks for the report, Amir!
>>
>> Unfortunately, I can't access the bug you filed.
>>
>> Can you, please, share the test case and instructions how to reproduce
>> the problem?
>>
>> Also, what Java version & platform do you observe the bug on?
>>
>> I briefly looked into template interpreter code on x86 and it does
>> have relevant code to post JVMTI events in fast accessors.
>>
>> Best regards,
>> Vladimir Ivanov
>>
>> On 12/12/17 11:12 AM, Amir Rapson wrote:
>>> Hi Daniel, Coleen and Vladimir,
>>>
>>> I tracked your email addresses from some mailing lists and hopefully
>>> one of you is a relevant person for my problem.
>>>
>>> I also filed a bug request (ID 9051849) but since I don’t have an
>>> option to add information I decided to email you.
>>>
>>> The problem I’m seeing is that JMTI does not receive field access
>>> events (and probably field modification events) when /fast_getfield/
>>> is used instead of /get_field/.
>>>
>>> I verified this by disabling all the
>>> /patch_bytecode(Bytecodes::_fast_?getfield, bc, rbx)/ in
>>> /TemplateTable::getfield_or_static()/ and made sure that JVMTI
>>> receives all the correct events.
>>>
>>> I have the agent code and a short java program that can reproduce the
>>> problem and would be happy to assist in fixing and or debugging this
>>> issue.
>>>
>>> I would appreciate any feedback.
>>>
>>> Best regards,
>>>
>>> Amir
>>>
>>> ​​​​​Amir Rapson | Founder & VP Eng @ *vFunction* | 7 HaPelech St.
>>> Tel-Aviv | +972-522650968
>>>

Reply | Threaded
Open this post in threaded view
|

Re: JVMTI not receiving field access events with fast_getfield

Chris Plummer
In reply to this post by Amir Rapson
Done. Sorry about that.

Chris

On 12/20/17 5:40 AM, Amir Rapson wrote:

> Hi,
>
> If you could please remove my phone number from the comments of the bug.
>
> Thanks,
> Amir
>
> -----Original Message-----
> From: Amir Rapson [mailto:[hidden email]]
> Sent: Tuesday, December 12, 2017 3:24 PM
> To: '[hidden email]' <[hidden email]>; 'Vladimir
> Ivanov' <[hidden email]>;
> '[hidden email]' <[hidden email]>
> Cc: '[hidden email]' <[hidden email]>
> Subject: RE: JVMTI not receiving field access events with fast_getfield
>
> Thank you Dan. Much appreciated.
>
> Again, let me know if I can assist with anything.
>
> Best,
> Amir
>
> -----Original Message-----
> From: Daniel D. Daugherty [mailto:[hidden email]]
> Sent: Tuesday, December 12, 2017 3:13 PM
> To: Amir Rapson <[hidden email]>; Vladimir Ivanov
> <[hidden email]>; [hidden email]
> Cc: [hidden email]
> Subject: Re: JVMTI not receiving field access events with fast_getfield
>
> Amir,
>
> Your https://bugs.openjdk.java.net/browse/JI-9051849 bug has been moved to
> https://bugs.openjdk.java.net/browse/JDK-8193369.
>
> Someone on the Serviceability team should pick up this thread from here, but
> we're right at the end game for JDK10 so it might take some time...
>
> Dan
>
>
> On 12/12/17 8:03 AM, Amir Rapson wrote:
>> Hi,
>>
>> I know the code has some relevant code, but it doesn't seem to work.
>> You will see some differences: the CALL_VM to the post function has
>> only 2 arguments and not 3, I'm not sure it matters.
>>
>> The platform is x86_64, Java version is 1.8.0-152. I can try other
>> versions if you wish.
>>
>> Please find the attached MyAgent.cpp MyAgent.h and
>> com_vfunction_Main.h to compile the agent.
>> Please also find the attached com.vfunction.zip that holds the simple
>> java util to reproduce the problem.
>>
>> You'll see the problem on ArrayList.add(item) where you'll get events
>> only on codes #16 and #22 and not on #2 and #11 (see attached
>> bytecode.txt of said function).
>>
>> Please let me know once you managed to reproduce it. I can also send
>> you a patch file to disable the fast_getfield (and fast putfield) to
>> show that the problem disappears.
>>
>> I'm currently looking at the actual assembly of the add function, both
>> with the modified hotspot and without and will try to assist will
>> offering a fix for this issue.
>>
>> One last thing. I saw a very old issue (resolved by Daniel Daugherty)
>> stating that fast_getfield was not completely addressed with the
>> resolution on this issue. The bug ID is
>> https://bugs.openjdk.java.net/browse/JDK-4300409
>>
>> I'll be happy to assist further.
>>
>> Best regards,
>> Amir
>>
>>
>> -----Original Message-----
>> From: Vladimir Ivanov [mailto:[hidden email]]
>> Sent: Tuesday, December 12, 2017 2:46 PM
>> To: Amir Rapson <[hidden email]>
>> Cc: [hidden email]; [hidden email]
>> Subject: Re: JVMTI not receiving field access events with
>> fast_getfield
>>
>> Thanks for the report, Amir!
>>
>> Unfortunately, I can't access the bug you filed.
>>
>> Can you, please, share the test case and instructions how to reproduce
>> the problem?
>>
>> Also, what Java version & platform do you observe the bug on?
>>
>> I briefly looked into template interpreter code on x86 and it does
>> have relevant code to post JVMTI events in fast accessors.
>>
>> Best regards,
>> Vladimir Ivanov
>>
>> On 12/12/17 11:12 AM, Amir Rapson wrote:
>>> Hi Daniel, Coleen and Vladimir,
>>>
>>> I tracked your email addresses from some mailing lists and hopefully
>>> one of you is a relevant person for my problem.
>>>
>>> I also filed a bug request (ID 9051849) but since I don’t have an
>>> option to add information I decided to email you.
>>>
>>> The problem I’m seeing is that JMTI does not receive field access
>>> events (and probably field modification events) when /fast_getfield/
>>> is used instead of /get_field/.
>>>
>>> I verified this by disabling all the
>>> /patch_bytecode(Bytecodes::_fast_?getfield, bc, rbx)/ in
>>> /TemplateTable::getfield_or_static()/ and made sure that JVMTI
>>> receives all the correct events.
>>>
>>> I have the agent code and a short java program that can reproduce the
>>> problem and would be happy to assist in fixing and or debugging this
>>> issue.
>>>
>>> I would appreciate any feedback.
>>>
>>> Best regards,
>>>
>>> Amir
>>>
>>> ​​​​​Amir Rapson | Founder & VP Eng @ *vFunction* | 7 HaPelech St.
>>> Tel-Aviv | +972-522650968
>>>


Reply | Threaded
Open this post in threaded view
|

Re: JVMTI not receiving field access events with fast_getfield

serguei.spitsyn@oracle.com
In reply to this post by Amir Rapson
Hi Amir,

As a work around, could you try to enable the
can_generate_breakpoint_events capability?
This capability should disable the fast get/putfiled bytecodes generation.
Adding this line to the MyAgent.cpp should do it:
    capa.can_generate_breakpoint_events = 1;

Thanks,
Serguei


On 12/20/17 05:40, Amir Rapson wrote:

> Hi,
>
> If you could please remove my phone number from the comments of the bug.
>
> Thanks,
> Amir
>
> -----Original Message-----
> From: Amir Rapson [mailto:[hidden email]]
> Sent: Tuesday, December 12, 2017 3:24 PM
> To: '[hidden email]' <[hidden email]>; 'Vladimir
> Ivanov' <[hidden email]>;
> '[hidden email]' <[hidden email]>
> Cc: '[hidden email]' <[hidden email]>
> Subject: RE: JVMTI not receiving field access events with fast_getfield
>
> Thank you Dan. Much appreciated.
>
> Again, let me know if I can assist with anything.
>
> Best,
> Amir
>
> -----Original Message-----
> From: Daniel D. Daugherty [mailto:[hidden email]]
> Sent: Tuesday, December 12, 2017 3:13 PM
> To: Amir Rapson <[hidden email]>; Vladimir Ivanov
> <[hidden email]>; [hidden email]
> Cc: [hidden email]
> Subject: Re: JVMTI not receiving field access events with fast_getfield
>
> Amir,
>
> Your https://bugs.openjdk.java.net/browse/JI-9051849 bug has been moved to
> https://bugs.openjdk.java.net/browse/JDK-8193369.
>
> Someone on the Serviceability team should pick up this thread from here, but
> we're right at the end game for JDK10 so it might take some time...
>
> Dan
>
>
> On 12/12/17 8:03 AM, Amir Rapson wrote:
>> Hi,
>>
>> I know the code has some relevant code, but it doesn't seem to work.
>> You will see some differences: the CALL_VM to the post function has
>> only 2 arguments and not 3, I'm not sure it matters.
>>
>> The platform is x86_64, Java version is 1.8.0-152. I can try other
>> versions if you wish.
>>
>> Please find the attached MyAgent.cpp MyAgent.h and
>> com_vfunction_Main.h to compile the agent.
>> Please also find the attached com.vfunction.zip that holds the simple
>> java util to reproduce the problem.
>>
>> You'll see the problem on ArrayList.add(item) where you'll get events
>> only on codes #16 and #22 and not on #2 and #11 (see attached
>> bytecode.txt of said function).
>>
>> Please let me know once you managed to reproduce it. I can also send
>> you a patch file to disable the fast_getfield (and fast putfield) to
>> show that the problem disappears.
>>
>> I'm currently looking at the actual assembly of the add function, both
>> with the modified hotspot and without and will try to assist will
>> offering a fix for this issue.
>>
>> One last thing. I saw a very old issue (resolved by Daniel Daugherty)
>> stating that fast_getfield was not completely addressed with the
>> resolution on this issue. The bug ID is
>> https://bugs.openjdk.java.net/browse/JDK-4300409
>>
>> I'll be happy to assist further.
>>
>> Best regards,
>> Amir
>>
>>
>> -----Original Message-----
>> From: Vladimir Ivanov [mailto:[hidden email]]
>> Sent: Tuesday, December 12, 2017 2:46 PM
>> To: Amir Rapson <[hidden email]>
>> Cc: [hidden email]; [hidden email]
>> Subject: Re: JVMTI not receiving field access events with
>> fast_getfield
>>
>> Thanks for the report, Amir!
>>
>> Unfortunately, I can't access the bug you filed.
>>
>> Can you, please, share the test case and instructions how to reproduce
>> the problem?
>>
>> Also, what Java version & platform do you observe the bug on?
>>
>> I briefly looked into template interpreter code on x86 and it does
>> have relevant code to post JVMTI events in fast accessors.
>>
>> Best regards,
>> Vladimir Ivanov
>>
>> On 12/12/17 11:12 AM, Amir Rapson wrote:
>>> Hi Daniel, Coleen and Vladimir,
>>>
>>> I tracked your email addresses from some mailing lists and hopefully
>>> one of you is a relevant person for my problem.
>>>
>>> I also filed a bug request (ID 9051849) but since I don’t have an
>>> option to add information I decided to email you.
>>>
>>> The problem I’m seeing is that JMTI does not receive field access
>>> events (and probably field modification events) when /fast_getfield/
>>> is used instead of /get_field/.
>>>
>>> I verified this by disabling all the
>>> /patch_bytecode(Bytecodes::_fast_?getfield, bc, rbx)/ in
>>> /TemplateTable::getfield_or_static()/ and made sure that JVMTI
>>> receives all the correct events.
>>>
>>> I have the agent code and a short java program that can reproduce the
>>> problem and would be happy to assist in fixing and or debugging this
>>> issue.
>>>
>>> I would appreciate any feedback.
>>>
>>> Best regards,
>>>
>>> Amir
>>>
>>> ​​​​​Amir Rapson | Founder & VP Eng @ *vFunction* | 7 HaPelech St.
>>> Tel-Aviv | +972-522650968
>>>