1 /*
   2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_INTERFACESUPPORT_INLINE_HPP
  26 #define SHARE_VM_RUNTIME_INTERFACESUPPORT_INLINE_HPP
  27 
  28 #include "runtime/handles.inline.hpp"
  29 #include "runtime/mutexLocker.hpp"
  30 #include "runtime/orderAccess.hpp"
  31 #include "runtime/os.hpp"
  32 #include "runtime/safepointMechanism.inline.hpp"
  33 #include "runtime/safepointVerifiers.hpp"
  34 #include "runtime/thread.hpp"
  35 #include "runtime/vm_operations.hpp"
  36 #include "utilities/globalDefinitions.hpp"
  37 #include "utilities/macros.hpp"
  38 #include "utilities/preserveException.hpp"
  39 
  40 // Wrapper for all entry points to the virtual machine.
  41 
  42 // InterfaceSupport provides functionality used by the VM_LEAF_BASE and
  43 // VM_ENTRY_BASE macros. These macros are used to guard entry points into
  44 // the VM and perform checks upon leave of the VM.
  45 
  46 
  47 class InterfaceSupport: AllStatic {
  48 # ifdef ASSERT
  49  public:
  50   static long _scavenge_alot_counter;
  51   static long _fullgc_alot_counter;
  52   static long _number_of_calls;
  53   static long _fullgc_alot_invocation;
  54 
  55   // Helper methods used to implement +ScavengeALot and +FullGCALot
  56   static void check_gc_alot() { if (ScavengeALot || FullGCALot) gc_alot(); }
  57   static void gc_alot();
  58 
  59   static void walk_stack_from(vframe* start_vf);
  60   static void walk_stack();
  61 
  62   static void zombieAll();
  63   static void unlinkSymbols();
  64   static void deoptimizeAll();
  65   static void stress_derived_pointers();
  66   static void verify_stack();
  67   static void verify_last_frame();
  68 # endif
  69 
  70  public:
  71   static void serialize_thread_state_with_handler(JavaThread* thread) {
  72     serialize_thread_state_internal(thread, true);
  73   }
  74 
  75   // Should only call this if we know that we have a proper SEH set up.
  76   static void serialize_thread_state(JavaThread* thread) {
  77     serialize_thread_state_internal(thread, false);
  78   }
  79 
  80  private:
  81   static void serialize_thread_state_internal(JavaThread* thread, bool needs_exception_handler) {
  82     // Make sure new state is seen by VM thread
  83     if (os::is_MP()) {
  84       if (UseMembar) {
  85         // Force a fence between the write above and read below
  86         OrderAccess::fence();
  87       } else {
  88         // store to serialize page so VM thread can do pseudo remote membar
  89         if (needs_exception_handler) {
  90           os::write_memory_serialize_page_with_handler(thread);
  91         } else {
  92           os::write_memory_serialize_page(thread);
  93         }
  94       }
  95     }
  96   }
  97 };
  98 
  99 
 100 // Basic class for all thread transition classes.
 101 
 102 class ThreadStateTransition : public StackObj {
 103  protected:
 104   JavaThread* _thread;
 105  public:
 106   ThreadStateTransition(JavaThread *thread) {
 107     _thread = thread;
 108     assert(thread != NULL && thread->is_Java_thread(), "must be Java thread");
 109   }
 110 
 111   // Change threadstate in a manner, so safepoint can detect changes.
 112   // Time-critical: called on exit from every runtime routine
 113   static inline void transition(JavaThread *thread, JavaThreadState from, JavaThreadState to) {
 114     assert(from != _thread_in_Java, "use transition_from_java");
 115     assert(from != _thread_in_native, "use transition_from_native");
 116     assert((from & 1) == 0 && (to & 1) == 0, "odd numbers are transitions states");
 117     assert(thread->thread_state() == from, "coming from wrong thread state");
 118     // Change to transition state
 119     thread->set_thread_state((JavaThreadState)(from + 1));
 120 
 121     InterfaceSupport::serialize_thread_state(thread);
 122 
 123     SafepointMechanism::block_if_requested(thread);
 124     thread->set_thread_state(to);
 125 
 126     CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();)
 127   }
 128 
 129   // transition_and_fence must be used on any thread state transition
 130   // where there might not be a Java call stub on the stack, in
 131   // particular on Windows where the Structured Exception Handler is
 132   // set up in the call stub. os::write_memory_serialize_page() can
 133   // fault and we can't recover from it on Windows without a SEH in
 134   // place.
 135   static inline void transition_and_fence(JavaThread *thread, JavaThreadState from, JavaThreadState to) {
 136     assert(thread->thread_state() == from, "coming from wrong thread state");
 137     assert((from & 1) == 0 && (to & 1) == 0, "odd numbers are transitions states");
 138     // Change to transition state
 139     thread->set_thread_state((JavaThreadState)(from + 1));
 140 
 141     InterfaceSupport::serialize_thread_state_with_handler(thread);
 142 
 143     SafepointMechanism::block_if_requested(thread);
 144     thread->set_thread_state(to);
 145 
 146     CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();)
 147   }
 148 
 149   // Same as above, but assumes from = _thread_in_Java. This is simpler, since we
 150   // never block on entry to the VM. This will break the code, since e.g. preserve arguments
 151   // have not been setup.
 152   static inline void transition_from_java(JavaThread *thread, JavaThreadState to) {
 153     assert(thread->thread_state() == _thread_in_Java, "coming from wrong thread state");
 154     thread->set_thread_state(to);
 155   }
 156 
 157   static inline void transition_from_native(JavaThread *thread, JavaThreadState to) {
 158     assert((to & 1) == 0, "odd numbers are transitions states");
 159     assert(thread->thread_state() == _thread_in_native, "coming from wrong thread state");
 160     // Change to transition state
 161     thread->set_thread_state(_thread_in_native_trans);
 162 
 163     InterfaceSupport::serialize_thread_state_with_handler(thread);
 164 
 165     // We never install asynchronous exceptions when coming (back) in
 166     // to the runtime from native code because the runtime is not set
 167     // up to handle exceptions floating around at arbitrary points.
 168     if (SafepointMechanism::poll(thread) || thread->is_suspend_after_native()) {
 169       JavaThread::check_safepoint_and_suspend_for_native_trans(thread);
 170 
 171       // Clear unhandled oops anywhere where we could block, even if we don't.
 172       CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();)
 173     }
 174 
 175     thread->set_thread_state(to);
 176   }
 177  protected:
 178    void trans(JavaThreadState from, JavaThreadState to)  { transition(_thread, from, to); }
 179    void trans_from_java(JavaThreadState to)              { transition_from_java(_thread, to); }
 180    void trans_from_native(JavaThreadState to)            { transition_from_native(_thread, to); }
 181    void trans_and_fence(JavaThreadState from, JavaThreadState to) { transition_and_fence(_thread, from, to); }
 182 };
 183 
 184 class ThreadInVMForHandshake : public ThreadStateTransition {
 185   const JavaThreadState _original_state;
 186 
 187   void transition_back() {
 188     // This can be invoked from transition states and must return to the original state properly
 189     assert(_thread->thread_state() == _thread_in_vm, "should only call when leaving VM after handshake");
 190     _thread->set_thread_state(_thread_in_vm_trans);
 191 
 192     InterfaceSupport::serialize_thread_state(_thread);
 193 
 194     SafepointMechanism::block_if_requested(_thread);
 195 
 196     _thread->set_thread_state(_original_state);
 197   }
 198 
 199  public:
 200 
 201   ThreadInVMForHandshake(JavaThread* thread) : ThreadStateTransition(thread),
 202       _original_state(thread->thread_state()) {
 203 
 204     if (thread->has_last_Java_frame()) {
 205       thread->frame_anchor()->make_walkable(thread);
 206     }
 207 
 208     thread->set_thread_state(_thread_in_vm);
 209   }
 210 
 211   ~ThreadInVMForHandshake() {
 212     transition_back();
 213   }
 214 
 215 };
 216 
 217 class ThreadInVMfromJava : public ThreadStateTransition {
 218  public:
 219   ThreadInVMfromJava(JavaThread* thread) : ThreadStateTransition(thread) {
 220     trans_from_java(_thread_in_vm);
 221   }
 222   ~ThreadInVMfromJava()  {
 223     if (_thread->stack_yellow_reserved_zone_disabled()) {
 224       _thread->enable_stack_yellow_reserved_zone();
 225     }
 226     trans(_thread_in_vm, _thread_in_Java);
 227     // Check for pending. async. exceptions or suspends.
 228     if (_thread->has_special_runtime_exit_condition()) _thread->handle_special_runtime_exit_condition();
 229   }
 230 };
 231 
 232 
 233 class ThreadInVMfromUnknown {
 234  private:
 235   JavaThread* _thread;
 236  public:
 237   ThreadInVMfromUnknown() : _thread(NULL) {
 238     Thread* t = Thread::current();
 239     if (t->is_Java_thread()) {
 240       JavaThread* t2 = (JavaThread*) t;
 241       if (t2->thread_state() == _thread_in_native) {
 242         _thread = t2;
 243         ThreadStateTransition::transition_from_native(t2, _thread_in_vm);
 244         // Used to have a HandleMarkCleaner but that is dangerous as
 245         // it could free a handle in our (indirect, nested) caller.
 246         // We expect any handles will be short lived and figure we
 247         // don't need an actual HandleMark.
 248       }
 249     }
 250   }
 251   ~ThreadInVMfromUnknown()  {
 252     if (_thread) {
 253       ThreadStateTransition::transition_and_fence(_thread, _thread_in_vm, _thread_in_native);
 254     }
 255   }
 256 };
 257 
 258 
 259 class ThreadInVMfromNative : public ThreadStateTransition {
 260  public:
 261   ThreadInVMfromNative(JavaThread* thread) : ThreadStateTransition(thread) {
 262     trans_from_native(_thread_in_vm);
 263   }
 264   ~ThreadInVMfromNative() {
 265     trans_and_fence(_thread_in_vm, _thread_in_native);
 266   }
 267 };
 268 
 269 
 270 class ThreadToNativeFromVM : public ThreadStateTransition {
 271  public:
 272   ThreadToNativeFromVM(JavaThread *thread) : ThreadStateTransition(thread) {
 273     // We are leaving the VM at this point and going directly to native code.
 274     // Block, if we are in the middle of a safepoint synchronization.
 275     assert(!thread->owns_locks(), "must release all locks when leaving VM");
 276     thread->frame_anchor()->make_walkable(thread);
 277     trans_and_fence(_thread_in_vm, _thread_in_native);
 278     // Check for pending. async. exceptions or suspends.
 279     if (_thread->has_special_runtime_exit_condition()) _thread->handle_special_runtime_exit_condition(false);
 280   }
 281 
 282   ~ThreadToNativeFromVM() {
 283     trans_from_native(_thread_in_vm);
 284     assert(!_thread->is_pending_jni_exception_check(), "Pending JNI Exception Check");
 285     // We don't need to clear_walkable because it will happen automagically when we return to java
 286   }
 287 };
 288 
 289 
 290 class ThreadBlockInVM : public ThreadStateTransition {
 291  public:
 292   ThreadBlockInVM(JavaThread *thread)
 293   : ThreadStateTransition(thread) {
 294     // Once we are blocked vm expects stack to be walkable
 295     thread->frame_anchor()->make_walkable(thread);
 296     trans_and_fence(_thread_in_vm, _thread_blocked);
 297   }
 298   ~ThreadBlockInVM() {
 299     trans_and_fence(_thread_blocked, _thread_in_vm);
 300     // We don't need to clear_walkable because it will happen automagically when we return to java
 301   }
 302 };
 303 
 304 
 305 // This special transition class is only used to prevent asynchronous exceptions
 306 // from being installed on vm exit in situations where we can't tolerate them.
 307 // See bugs: 4324348, 4854693, 4998314, 5040492, 5050705.
 308 class ThreadInVMfromJavaNoAsyncException : public ThreadStateTransition {
 309  public:
 310   ThreadInVMfromJavaNoAsyncException(JavaThread* thread) : ThreadStateTransition(thread) {
 311     trans_from_java(_thread_in_vm);
 312   }
 313   ~ThreadInVMfromJavaNoAsyncException()  {
 314     if (_thread->stack_yellow_reserved_zone_disabled()) {
 315       _thread->enable_stack_yellow_reserved_zone();
 316     }
 317     trans(_thread_in_vm, _thread_in_Java);
 318     // NOTE: We do not check for pending. async. exceptions.
 319     // If we did and moved the pending async exception over into the
 320     // pending exception field, we would need to deopt (currently C2
 321     // only). However, to do so would require that we transition back
 322     // to the _thread_in_vm state. Instead we postpone the handling of
 323     // the async exception.
 324 
 325 
 326     // Check for pending. suspends only.
 327     if (_thread->has_special_runtime_exit_condition())
 328       _thread->handle_special_runtime_exit_condition(false);
 329   }
 330 };
 331 
 332 // Debug class instantiated in JRT_ENTRY and ITR_ENTRY macro.
 333 // Can be used to verify properties on enter/exit of the VM.
 334 
 335 #ifdef ASSERT
 336 class VMEntryWrapper {
 337  public:
 338   VMEntryWrapper();
 339   ~VMEntryWrapper();
 340 };
 341 
 342 
 343 class VMNativeEntryWrapper {
 344  public:
 345   VMNativeEntryWrapper() {
 346     if (GCALotAtAllSafepoints) InterfaceSupport::check_gc_alot();
 347   }
 348 
 349   ~VMNativeEntryWrapper() {
 350     if (GCALotAtAllSafepoints) InterfaceSupport::check_gc_alot();
 351   }
 352 };
 353 
 354 #endif
 355 
 356 
 357 // VM-internal runtime interface support
 358 
 359 // Definitions for JRT (Java (Compiler/Shared) Runtime)
 360 
 361 // JRT_LEAF currently can be called from either _thread_in_Java or
 362 // _thread_in_native mode. In _thread_in_native, it is ok
 363 // for another thread to trigger GC. The rest of the JRT_LEAF
 364 // rules apply.
 365 class JRTLeafVerifier : public NoSafepointVerifier {
 366   static bool should_verify_GC();
 367  public:
 368 #ifdef ASSERT
 369   JRTLeafVerifier();
 370   ~JRTLeafVerifier();
 371 #else
 372   JRTLeafVerifier() {}
 373   ~JRTLeafVerifier() {}
 374 #endif
 375 };
 376 
 377 #ifdef ASSERT
 378 
 379 class RuntimeHistogramElement : public HistogramElement {
 380   public:
 381    RuntimeHistogramElement(const char* name);
 382 };
 383 
 384 #define TRACE_CALL(result_type, header)                            \
 385   InterfaceSupport::_number_of_calls++;                            \
 386   if (CountRuntimeCalls) {                                         \
 387     static RuntimeHistogramElement* e = new RuntimeHistogramElement(#header); \
 388     if (e != NULL) e->increment_count();                           \
 389   }
 390 #else
 391 #define TRACE_CALL(result_type, header)                            \
 392   /* do nothing */
 393 #endif
 394 
 395 
 396 // LEAF routines do not lock, GC or throw exceptions
 397 
 398 #define VM_LEAF_BASE(result_type, header)                            \
 399   TRACE_CALL(result_type, header)                                    \
 400   debug_only(NoHandleMark __hm;)                                     \
 401   os::verify_stack_alignment();                                      \
 402   /* begin of body */
 403 
 404 #define VM_ENTRY_BASE_FROM_LEAF(result_type, header, thread)         \
 405   TRACE_CALL(result_type, header)                                    \
 406   debug_only(ResetNoHandleMark __rnhm;)                              \
 407   HandleMarkCleaner __hm(thread);                                    \
 408   Thread* THREAD = thread;                                           \
 409   os::verify_stack_alignment();                                      \
 410   /* begin of body */
 411 
 412 
 413 // ENTRY routines may lock, GC and throw exceptions
 414 
 415 #define VM_ENTRY_BASE(result_type, header, thread)                   \
 416   TRACE_CALL(result_type, header)                                    \
 417   HandleMarkCleaner __hm(thread);                                    \
 418   Thread* THREAD = thread;                                           \
 419   os::verify_stack_alignment();                                      \
 420   /* begin of body */
 421 
 422 
 423 // QUICK_ENTRY routines behave like ENTRY but without a handle mark
 424 
 425 #define VM_QUICK_ENTRY_BASE(result_type, header, thread)             \
 426   TRACE_CALL(result_type, header)                                    \
 427   debug_only(NoHandleMark __hm;)                                     \
 428   Thread* THREAD = thread;                                           \
 429   os::verify_stack_alignment();                                      \
 430   /* begin of body */
 431 
 432 
 433 // Definitions for IRT (Interpreter Runtime)
 434 // (thread is an argument passed in to all these routines)
 435 
 436 #define IRT_ENTRY(result_type, header)                               \
 437   result_type header {                                               \
 438     ThreadInVMfromJava __tiv(thread);                                \
 439     VM_ENTRY_BASE(result_type, header, thread)                       \
 440     debug_only(VMEntryWrapper __vew;)
 441 
 442 
 443 #define IRT_LEAF(result_type, header)                                \
 444   result_type header {                                               \
 445     VM_LEAF_BASE(result_type, header)                                \
 446     debug_only(NoSafepointVerifier __nspv(true);)
 447 
 448 
 449 #define IRT_ENTRY_NO_ASYNC(result_type, header)                      \
 450   result_type header {                                               \
 451     ThreadInVMfromJavaNoAsyncException __tiv(thread);                \
 452     VM_ENTRY_BASE(result_type, header, thread)                       \
 453     debug_only(VMEntryWrapper __vew;)
 454 
 455 #define IRT_END }
 456 
 457 #define JRT_ENTRY(result_type, header)                               \
 458   result_type header {                                               \
 459     ThreadInVMfromJava __tiv(thread);                                \
 460     VM_ENTRY_BASE(result_type, header, thread)                       \
 461     debug_only(VMEntryWrapper __vew;)
 462 
 463 
 464 #define JRT_LEAF(result_type, header)                                \
 465   result_type header {                                               \
 466   VM_LEAF_BASE(result_type, header)                                  \
 467   debug_only(JRTLeafVerifier __jlv;)
 468 
 469 
 470 #define JRT_ENTRY_NO_ASYNC(result_type, header)                      \
 471   result_type header {                                               \
 472     ThreadInVMfromJavaNoAsyncException __tiv(thread);                \
 473     VM_ENTRY_BASE(result_type, header, thread)                       \
 474     debug_only(VMEntryWrapper __vew;)
 475 
 476 // Same as JRT Entry but allows for return value after the safepoint
 477 // to get back into Java from the VM
 478 #define JRT_BLOCK_ENTRY(result_type, header)                         \
 479   result_type header {                                               \
 480     TRACE_CALL(result_type, header)                                  \
 481     HandleMarkCleaner __hm(thread);
 482 
 483 #define JRT_BLOCK                                                    \
 484     {                                                                \
 485     ThreadInVMfromJava __tiv(thread);                                \
 486     Thread* THREAD = thread;                                         \
 487     debug_only(VMEntryWrapper __vew;)
 488 
 489 #define JRT_BLOCK_NO_ASYNC                                           \
 490     {                                                                \
 491     ThreadInVMfromJavaNoAsyncException __tiv(thread);                \
 492     Thread* THREAD = thread;                                         \
 493     debug_only(VMEntryWrapper __vew;)
 494 
 495 #define JRT_BLOCK_END }
 496 
 497 #define JRT_END }
 498 
 499 // Definitions for JNI
 500 
 501 #define JNI_ENTRY(result_type, header)                               \
 502     JNI_ENTRY_NO_PRESERVE(result_type, header)                       \
 503     WeakPreserveExceptionMark __wem(thread);
 504 
 505 #define JNI_ENTRY_NO_PRESERVE(result_type, header)                   \
 506 extern "C" {                                                         \
 507   result_type JNICALL header {                                       \
 508     JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
 509     assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
 510     ThreadInVMfromNative __tiv(thread);                              \
 511     debug_only(VMNativeEntryWrapper __vew;)                          \
 512     VM_ENTRY_BASE(result_type, header, thread)
 513 
 514 
 515 // Ensure that the VMNativeEntryWrapper constructor, which can cause
 516 // a GC, is called outside the NoHandleMark (set via VM_QUICK_ENTRY_BASE).
 517 #define JNI_QUICK_ENTRY(result_type, header)                         \
 518 extern "C" {                                                         \
 519   result_type JNICALL header {                                       \
 520     JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
 521     assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
 522     ThreadInVMfromNative __tiv(thread);                              \
 523     debug_only(VMNativeEntryWrapper __vew;)                          \
 524     VM_QUICK_ENTRY_BASE(result_type, header, thread)
 525 
 526 
 527 #define JNI_LEAF(result_type, header)                                \
 528 extern "C" {                                                         \
 529   result_type JNICALL header {                                       \
 530     JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
 531     assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
 532     VM_LEAF_BASE(result_type, header)
 533 
 534 
 535 // Close the routine and the extern "C"
 536 #define JNI_END } }
 537 
 538 
 539 
 540 // Definitions for JVM
 541 
 542 #define JVM_ENTRY(result_type, header)                               \
 543 extern "C" {                                                         \
 544   result_type JNICALL header {                                       \
 545     JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
 546     ThreadInVMfromNative __tiv(thread);                              \
 547     debug_only(VMNativeEntryWrapper __vew;)                          \
 548     VM_ENTRY_BASE(result_type, header, thread)
 549 
 550 
 551 #define JVM_ENTRY_NO_ENV(result_type, header)                        \
 552 extern "C" {                                                         \
 553   result_type JNICALL header {                                       \
 554     JavaThread* thread = JavaThread::current();                      \
 555     ThreadInVMfromNative __tiv(thread);                              \
 556     debug_only(VMNativeEntryWrapper __vew;)                          \
 557     VM_ENTRY_BASE(result_type, header, thread)
 558 
 559 
 560 #define JVM_QUICK_ENTRY(result_type, header)                         \
 561 extern "C" {                                                         \
 562   result_type JNICALL header {                                       \
 563     JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
 564     ThreadInVMfromNative __tiv(thread);                              \
 565     debug_only(VMNativeEntryWrapper __vew;)                          \
 566     VM_QUICK_ENTRY_BASE(result_type, header, thread)
 567 
 568 
 569 #define JVM_LEAF(result_type, header)                                \
 570 extern "C" {                                                         \
 571   result_type JNICALL header {                                       \
 572     VM_Exit::block_if_vm_exited();                                   \
 573     VM_LEAF_BASE(result_type, header)
 574 
 575 
 576 #define JVM_ENTRY_FROM_LEAF(env, result_type, header)                \
 577   { {                                                                \
 578     JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
 579     ThreadInVMfromNative __tiv(thread);                              \
 580     debug_only(VMNativeEntryWrapper __vew;)                          \
 581     VM_ENTRY_BASE_FROM_LEAF(result_type, header, thread)
 582 
 583 
 584 #define JVM_END } }
 585 
 586 #endif // SHARE_VM_RUNTIME_INTERFACESUPPORT_INLINE_HPP