RFR: 8254263: Remove special_runtime_exit_condition() check from ~ThreadInVMForHandshake() [v2]

Patricio Chilano Mateo pchilanomate at openjdk.java.net
Wed Oct 14 03:37:11 UTC 2020


On Wed, 14 Oct 2020 02:37:59 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Makes sense. Thanks!
>
> Not to belabour this but I don't understand what this sentence:
> 
> // If we are at a polling page safepoint (not a poll return)
> 
> is actually making a distinction between. What is a "poll return" here versus a "polling page safepoint"?

"poll return" would be a poll immediately before a return (also found out by reading it from the comments in
ThreadSafepointState::handle_polling_page_exception()). So unless the poll in the nmethod was done right before a
return, we defer the async exception. There is also a comment before the has_special_runtime_exit_condition() check on
SS::block() that explains the reason:

  // Note: we never deliver an async exception at a polling point as the
  // compiler may not have an exception handler for it. The polling
  // code will notice the async and deoptimize and the exception will
  // be delivered. (Polling at a return point is ok though). Sure is
  // a lot of bother for a deprecated feature...

-------------

PR: https://git.openjdk.java.net/jdk/pull/577


More information about the hotspot-runtime-dev mailing list