-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After looping over thousands times, the binding failed #3
Comments
This will work with the following JVM options:
|
This was for Java version:
|
@lukepeeler: Are you saying that the method got jitted and it was replaced with some intrinsic version of |
I guess, not jitted. But, replaced with a native call, without JNI overhead. |
Looks like you're right. The C2 compiler has a threshold of 10000 calls. |
Yeah, I got it to work initially with just |
Ok, thanks! It gets too hairy to try and do this in JVMTI, in my opinion. So, maybe we should document this? |
If you agree, and want to make a change in the README, please do so. If you think something else can be done, I'm all ears. |
Yeah, I agree. And I think polluting the JVMTI code you have with what really amounts to a special case would make it harder for others to make it reusable for more general cases of binding natives. I think documentation is fine. There's a whole list of native methods that get the intrinsic treatment (though this probably differs by flavor/version of JVM): http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/87ee5ee27509/src/share/vm/classfile/vmSymbols.hpp#l581 |
Ok. Makes sense. @tongqingwu, since you opened the original issue, can you verify that the suggested flags fix the issue for you too? If so, I can update the README. |
@lukepeeler: Yes, I saw vmSymbols.hpp, when I was seeing if it's easy to disable intrinsics for this method. I was hoping for an easily accessible method to do that. But, it doesn't look like there is one. |
@arvindsv : The solutions from Luke @lukepeeler works great! You should update the README. This is the java version I am testing on, and with over hundreds of threads. java version "1.8.0_25" |
Done! I'll close this issue then. Thanks to both of you! |
In the testing java file, add more than 10000 loops, the fake time will change back to real time. So if we use the fake time agent for over hundreds threads and more test cases, it stops working.
The text was updated successfully, but these errors were encountered: