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:vladimir.x.iva...@oracle.com]
Sent: Tuesday, December 12, 2017 2:46 PM
To: Amir Rapson <a...@vfunction.com>
Cc: coleen.phillim...@oracle.com; daniel.daughe...@oracle.com
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 via email to