-3

Here is a question: Explanation of the Thread-Local Handshakes

There were some valuable comments under my question, which gave some insights about the answer.

There has been recently posted an aggregated answer which, I guess, has included some of the commentaries. But comments have been deleted and now I can not estimate what was the original contribution of the answerer and did he really aggregated all the valuable comments.

May I ask for moderators investigation of that, and, if possible, restore the deleted comments?

3
  • 1
    It's worth noting that if you have other posts where important information only appears in the comments, it is a good idea to merge that information into the post. Comments can be "deleted" (hidden) at any time, by design.
    – halfer
    May 8, 2018 at 11:36
  • Why is this getting downvoted? IMO this is a legitimate request
    – blkpingu
    May 14, 2018 at 12:08
  • 1
    The answer has been undeleted. To be fair I have also converted it into a CW.
    – Samuel Liew Mod
    May 24, 2018 at 2:00

1 Answer 1

4

The comments were deleted after having be flagged as No Longer Needed. Comments are fundamentally ephemeral, important information should not be in comments. I'll reproduce the important ones here so you can check whether some additional information needs to be incorporated into the answer:

From a glance, it seems those "handshakes" are about optimising internal thread management inside the VM; nothing which can be seen or used by a Java developer.

Have you looked through the OpenJDK discussion thread?

I recon that, compared to other groups like "2D graphics", "AWT" or "Compiler", "JDK" is the best fit for an internal change inside the VM.

First, JEP312 has been included in JDK10 which can be downloaded now. My hazy understanding is that the JEP312 functionality allows HotSpot to avoid needing to take expensive safepoints - which requires stopping all threads - in certain scenarios: http://blog.ragozin.info/2012/10/safepoints-in-hotspot-jvm.html. So it's a performance enhancement that doesn't directly impact developers.

As far as I can gather from the proposal, it proposes a method that allows for not using safepoints for specific operations such as gathering stacktraces, biased lock revocation and the likes. At the moment, any of those require all application threads to be stopped by means of a global safepoint, meaning all threads need to be stopped. However, this is not always necessary (if only a couple or only one of these threads is impacted by said operation, it would be nice to be able to only stop this these threads, thereby avoiding a global safepoint).

Also refer to Java GC safepoint

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .