< prev index next >

src/hotspot/share/runtime/interfaceSupport.inline.hpp

Print this page




   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 "gc/shared/gcLocker.hpp"
  29 #include "runtime/handles.inline.hpp"
  30 #include "runtime/mutexLocker.hpp"

  31 #include "runtime/orderAccess.hpp"
  32 #include "runtime/os.hpp"
  33 #include "runtime/safepointMechanism.inline.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;


 418 #define IRT_ENTRY(result_type, header)                               \
 419   result_type header {                                               \
 420     ThreadInVMfromJava __tiv(thread);                                \
 421     VM_ENTRY_BASE(result_type, header, thread)                       \
 422     debug_only(VMEntryWrapper __vew;)
 423 
 424 
 425 #define IRT_LEAF(result_type, header)                                \
 426   result_type header {                                               \
 427     VM_LEAF_BASE(result_type, header)                                \
 428     debug_only(NoSafepointVerifier __nspv(true);)
 429 
 430 
 431 #define IRT_ENTRY_NO_ASYNC(result_type, header)                      \
 432   result_type header {                                               \
 433     ThreadInVMfromJavaNoAsyncException __tiv(thread);                \
 434     VM_ENTRY_BASE(result_type, header, thread)                       \
 435     debug_only(VMEntryWrapper __vew;)
 436 
 437 #define IRT_END }
 438 
 439 
 440 // Definitions for JRT (Java (Compiler/Shared) Runtime)
 441 
 442 #define JRT_ENTRY(result_type, header)                               \
 443   result_type header {                                               \
 444     ThreadInVMfromJava __tiv(thread);                                \
 445     VM_ENTRY_BASE(result_type, header, thread)                       \
 446     debug_only(VMEntryWrapper __vew;)
 447 
 448 
 449 #define JRT_LEAF(result_type, header)                                \
 450   result_type header {                                               \
 451   VM_LEAF_BASE(result_type, header)                                  \
 452   debug_only(JRTLeafVerifier __jlv;)
 453 
 454 
 455 #define JRT_ENTRY_NO_ASYNC(result_type, header)                      \
 456   result_type header {                                               \
 457     ThreadInVMfromJavaNoAsyncException __tiv(thread);                \
 458     VM_ENTRY_BASE(result_type, header, thread)                       \
 459     debug_only(VMEntryWrapper __vew;)
 460 




   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/interfaceSupport.hpp"
  31 #include "runtime/orderAccess.hpp"
  32 #include "runtime/os.hpp"
  33 #include "runtime/safepointMechanism.inline.hpp"
  34 #include "runtime/safepointVerifiers.hpp"
  35 #include "runtime/thread.hpp"
  36 #include "runtime/vm_operations.hpp"
  37 #include "utilities/globalDefinitions.hpp"
  38 #include "utilities/macros.hpp"
  39 #include "utilities/preserveException.hpp"
  40 
  41 // Wrapper for all entry points to the virtual machine.
  42 
  43 // InterfaceSupport provides functionality used by the VM_LEAF_BASE and
  44 // VM_ENTRY_BASE macros. These macros are used to guard entry points into
  45 // the VM and perform checks upon leave of the VM.
  46 
  47 
  48 class InterfaceSupport: AllStatic {
  49 # ifdef ASSERT
  50  public:
  51   static long _scavenge_alot_counter;
  52   static long _fullgc_alot_counter;
  53   static long _number_of_calls;
  54   static long _fullgc_alot_invocation;


 419 #define IRT_ENTRY(result_type, header)                               \
 420   result_type header {                                               \
 421     ThreadInVMfromJava __tiv(thread);                                \
 422     VM_ENTRY_BASE(result_type, header, thread)                       \
 423     debug_only(VMEntryWrapper __vew;)
 424 
 425 
 426 #define IRT_LEAF(result_type, header)                                \
 427   result_type header {                                               \
 428     VM_LEAF_BASE(result_type, header)                                \
 429     debug_only(NoSafepointVerifier __nspv(true);)
 430 
 431 
 432 #define IRT_ENTRY_NO_ASYNC(result_type, header)                      \
 433   result_type header {                                               \
 434     ThreadInVMfromJavaNoAsyncException __tiv(thread);                \
 435     VM_ENTRY_BASE(result_type, header, thread)                       \
 436     debug_only(VMEntryWrapper __vew;)
 437 
 438 #define IRT_END }



 439 
 440 #define JRT_ENTRY(result_type, header)                               \
 441   result_type header {                                               \
 442     ThreadInVMfromJava __tiv(thread);                                \
 443     VM_ENTRY_BASE(result_type, header, thread)                       \
 444     debug_only(VMEntryWrapper __vew;)
 445 
 446 
 447 #define JRT_LEAF(result_type, header)                                \
 448   result_type header {                                               \
 449   VM_LEAF_BASE(result_type, header)                                  \
 450   debug_only(JRTLeafVerifier __jlv;)
 451 
 452 
 453 #define JRT_ENTRY_NO_ASYNC(result_type, header)                      \
 454   result_type header {                                               \
 455     ThreadInVMfromJavaNoAsyncException __tiv(thread);                \
 456     VM_ENTRY_BASE(result_type, header, thread)                       \
 457     debug_only(VMEntryWrapper __vew;)
 458 


< prev index next >