#ifdef TARGET_OS_ARCH_linux_arm
# include "vmStructs_linux_arm.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_ppc
# include "vmStructs_linux_ppc.hpp"
#endif
#ifdef TARGET_OS_ARCH_aix_ppc
# include "vmStructs_aix_ppc.hpp"
#endif
#ifdef TARGET_OS_ARCH_bsd_x86
# include "vmStructs_bsd_x86.hpp"
#endif
#ifdef TARGET_OS_ARCH_bsd_zero
# include "vmStructs_bsd_zero.hpp"
#endif
#if INCLUDE_ALL_GCS
#include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp"
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp"
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
#include "gc_implementation/concurrentMarkSweep/vmStructs_cms.hpp"
#include "gc_implementation/parNew/parNewGeneration.hpp"
#include "gc_implementation/parNew/vmStructs_parNew.hpp"
#include "gc_implementation/parallelScavenge/asPSOldGen.hpp"
#include "gc_implementation/parallelScavenge/asPSYoungGen.hpp"
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
#include "gc_implementation/parallelScavenge/psOldGen.hpp"
#include "gc_implementation/parallelScavenge/psVirtualspace.hpp"
#include "gc_implementation/parallelScavenge/psYoungGen.hpp"
#include "gc_implementation/parallelScavenge/vmStructs_parallelgc.hpp"
#include "gc_implementation/g1/vmStructs_g1.hpp"
#endif // INCLUDE_ALL_GCS
#ifdef COMPILER2
#include "opto/addnode.hpp"
#include "opto/block.hpp"
#include "opto/callnode.hpp"
#include "opto/cfgnode.hpp"
#include "opto/chaitin.hpp"
#include "opto/divnode.hpp"
#include "opto/locknode.hpp"
#include "opto/loopnode.hpp"
#include "opto/machnode.hpp"
#include "opto/matcher.hpp"
#include "opto/mathexactnode.hpp"
#include "opto/mulnode.hpp"
#include "opto/phaseX.hpp"
#include "opto/parse.hpp"
#include "opto/regalloc.hpp"
#include "opto/rootnode.hpp"
#include "opto/subnode.hpp"
#include "opto/vectornode.hpp"
#if defined ADGLOBALS_MD_HPP
# include ADGLOBALS_MD_HPP
#elif defined TARGET_ARCH_MODEL_x86_32
# include "adfiles/adGlobals_x86_32.hpp"
#elif defined TARGET_ARCH_MODEL_x86_64
# include "adfiles/adGlobals_x86_64.hpp"
#elif defined TARGET_ARCH_MODEL_aarch64
# include "adfiles/adGlobals_aarch64.hpp"
#elif defined TARGET_ARCH_MODEL_sparc
# include "adfiles/adGlobals_sparc.hpp"
#elif defined TARGET_ARCH_MODEL_zero
# include "adfiles/adGlobals_zero.hpp"
#elif defined TARGET_ARCH_MODEL_ppc_64
# include "adfiles/adGlobals_ppc_64.hpp"
#endif
#endif // COMPILER2
#ifndef REG_COUNT
#define REG_COUNT 0
#endif
static inline uint64_t cast_uint64_t(size_t x)
{
return x;
}
#if INCLUDE_JVMTI
#define JVMTI_STRUCTS(static_field) \
static_field(JvmtiExport, _can_access_local_variables, bool) \
static_field(JvmtiExport, _can_hotswap_or_post_breakpoint, bool) \
static_field(JvmtiExport, _can_post_on_exceptions, bool) \
static_field(JvmtiExport, _can_walk_any_space, bool)
#else
#define JVMTI_STRUCTS(static_field)
#endif // INCLUDE_JVMTI
typedef HashtableEntry<intptr_t, mtInternal> IntptrHashtableEntry;
typedef Hashtable<intptr_t, mtInternal> IntptrHashtable;
typedef Hashtable<Symbol*, mtSymbol> SymbolHashtable;
typedef HashtableEntry<Symbol*, mtClass> SymbolHashtableEntry;
typedef Hashtable<oop, mtSymbol> StringHashtable;
typedef TwoOopHashtable<Klass*, mtClass> KlassTwoOopHashtable;
typedef Hashtable<Klass*, mtClass> KlassHashtable;
typedef HashtableEntry<Klass*, mtClass> KlassHashtableEntry;
typedef TwoOopHashtable<Symbol*, mtClass> SymbolTwoOopHashtable;
#define VM_STRUCTS(nonstatic_field, \
static_field, \
static_ptr_volatile_field, \
unchecked_nonstatic_field, \
volatile_nonstatic_field, \
nonproduct_nonstatic_field, \
c1_nonstatic_field, \
c2_nonstatic_field, \
unchecked_c1_static_field, \
unchecked_c2_static_field) \
\
\
volatile_nonstatic_field(oopDesc, _mark, markOop) \
volatile_nonstatic_field(oopDesc, _metadata._klass, Klass*) \
volatile_nonstatic_field(oopDesc, _metadata._compressed_klass, narrowOop) \
static_field(oopDesc, _bs, BarrierSet*) \
nonstatic_field(ArrayKlass, _dimension, int) \
volatile_nonstatic_field(ArrayKlass, _higher_dimension, Klass*) \
volatile_nonstatic_field(ArrayKlass, _lower_dimension, Klass*) \
nonstatic_field(ArrayKlass, _vtable_len, int) \
nonstatic_field(ArrayKlass, _component_mirror, oop) \
nonstatic_field(CompiledICHolder, _holder_metadata, Metadata*) \
nonstatic_field(CompiledICHolder, _holder_klass, Klass*) \
nonstatic_field(ConstantPool, _tags, Array<u1>*) \
nonstatic_field(ConstantPool, _cache, ConstantPoolCache*) \
nonstatic_field(ConstantPool, _pool_holder, InstanceKlass*) \
nonstatic_field(ConstantPool, _operands, Array<u2>*) \
nonstatic_field(ConstantPool, _length, int) \
nonstatic_field(ConstantPool, _resolved_references, jobject) \
nonstatic_field(ConstantPool, _reference_map, Array<u2>*) \
nonstatic_field(ConstantPoolCache, _length, int) \
nonstatic_field(ConstantPoolCache, _constant_pool, ConstantPool*) \
nonstatic_field(InstanceKlass, _array_klasses, Klass*) \
nonstatic_field(InstanceKlass, _methods, Array<Method*>*) \
nonstatic_field(InstanceKlass, _default_methods, Array<Method*>*) \
nonstatic_field(InstanceKlass, _local_interfaces, Array<Klass*>*) \
nonstatic_field(InstanceKlass, _transitive_interfaces, Array<Klass*>*) \
nonstatic_field(InstanceKlass, _fields, Array<u2>*) \
nonstatic_field(InstanceKlass, _java_fields_count, u2) \
nonstatic_field(InstanceKlass, _constants, ConstantPool*) \
nonstatic_field(InstanceKlass, _class_loader_data, ClassLoaderData*) \
nonstatic_field(InstanceKlass, _source_file_name_index, u2) \
nonstatic_field(InstanceKlass, _source_debug_extension, char*) \
nonstatic_field(InstanceKlass, _inner_classes, Array<jushort>*) \
nonstatic_field(InstanceKlass, _nonstatic_field_size, int) \
nonstatic_field(InstanceKlass, _static_field_size, int) \
nonstatic_field(InstanceKlass, _static_oop_field_count, u2) \
nonstatic_field(InstanceKlass, _nonstatic_oop_map_size, int) \
nonstatic_field(InstanceKlass, _is_marked_dependent, bool) \
nonstatic_field(InstanceKlass, _minor_version, u2) \
nonstatic_field(InstanceKlass, _major_version, u2) \
nonstatic_field(InstanceKlass, _init_state, u1) \
nonstatic_field(InstanceKlass, _init_thread, Thread*) \
nonstatic_field(InstanceKlass, _vtable_len, int) \
nonstatic_field(InstanceKlass, _itable_len, int) \
nonstatic_field(InstanceKlass, _reference_type, u1) \
volatile_nonstatic_field(InstanceKlass, _oop_map_cache, OopMapCache*) \
nonstatic_field(InstanceKlass, _jni_ids, JNIid*) \
nonstatic_field(InstanceKlass, _osr_nmethods_head, nmethod*) \
nonstatic_field(InstanceKlass, _breakpoints, BreakpointInfo*) \
nonstatic_field(InstanceKlass, _generic_signature_index, u2) \
nonstatic_field(InstanceKlass, _methods_jmethod_ids, jmethodID*) \
volatile_nonstatic_field(InstanceKlass, _idnum_allocated_count, u2) \
nonstatic_field(InstanceKlass, _annotations, Annotations*) \
nonstatic_field(InstanceKlass, _dependencies, nmethodBucket*) \
nonstatic_field(nmethodBucket, _nmethod, nmethod*) \
nonstatic_field(nmethodBucket, _count, int) \
nonstatic_field(nmethodBucket, _next, nmethodBucket*) \
nonstatic_field(InstanceKlass, _method_ordering, Array<int>*) \
nonstatic_field(InstanceKlass, _default_vtable_indices, Array<int>*) \
nonstatic_field(Klass, _super_check_offset, juint) \
nonstatic_field(Klass, _secondary_super_cache, Klass*) \
nonstatic_field(Klass, _secondary_supers, Array<Klass*>*) \
nonstatic_field(Klass, _primary_supers[0], Klass*) \
nonstatic_field(Klass, _java_mirror, oop) \
nonstatic_field(Klass, _modifier_flags, jint) \
nonstatic_field(Klass, _super, Klass*) \
nonstatic_field(Klass, _subklass, Klass*) \
nonstatic_field(Klass, _layout_helper, jint) \
nonstatic_field(Klass, _name, Symbol*) \
nonstatic_field(Klass, _access_flags, AccessFlags) \
nonstatic_field(Klass, _prototype_header, markOop) \
nonstatic_field(Klass, _next_sibling, Klass*) \
nonstatic_field(vtableEntry, _method, Method*) \
nonstatic_field(MethodData, _size, int) \
nonstatic_field(MethodData, _method, Method*) \
nonstatic_field(MethodData, _data_size, int) \
nonstatic_field(MethodData, _data[0], intptr_t) \
nonstatic_field(MethodData, _nof_decompiles, uint) \
nonstatic_field(MethodData, _nof_overflow_recompiles, uint) \
nonstatic_field(MethodData, _nof_overflow_traps, uint) \
nonstatic_field(MethodData, _trap_hist._array[0], u1) \
nonstatic_field(MethodData, _eflags, intx) \
nonstatic_field(MethodData, _arg_local, intx) \
nonstatic_field(MethodData, _arg_stack, intx) \
nonstatic_field(MethodData, _arg_returned, intx) \
nonstatic_field(DataLayout, _header._struct._tag, u1) \
nonstatic_field(DataLayout, _header._struct._flags, u1) \
nonstatic_field(DataLayout, _header._struct._bci, u2) \
nonstatic_field(DataLayout, _cells[0], intptr_t) \
nonstatic_field(MethodCounters, _interpreter_invocation_count, int) \
nonstatic_field(MethodCounters, _interpreter_throwout_count, u2) \
nonstatic_field(MethodCounters, _number_of_breakpoints, u2) \
nonstatic_field(MethodCounters, _invocation_counter, InvocationCounter) \
nonstatic_field(MethodCounters, _backedge_counter, InvocationCounter) \
nonstatic_field(Method, _constMethod, ConstMethod*) \
nonstatic_field(Method, _method_data, MethodData*) \
nonstatic_field(Method, _method_counters, MethodCounters*) \
nonstatic_field(Method, _access_flags, AccessFlags) \
nonstatic_field(Method, _vtable_index, int) \
nonstatic_field(Method, _method_size, u2) \
nonstatic_field(Method, _intrinsic_id, u1) \
nonproduct_nonstatic_field(Method, _compiled_invocation_count, int) \
volatile_nonstatic_field(Method, _code, nmethod*) \
nonstatic_field(Method, _i2i_entry, address) \
nonstatic_field(Method, _adapter, AdapterHandlerEntry*) \
volatile_nonstatic_field(Method, _from_compiled_entry, address) \
volatile_nonstatic_field(Method, _from_interpreted_entry, address) \
volatile_nonstatic_field(ConstMethod, _fingerprint, uint64_t) \
nonstatic_field(ConstMethod, _constants, ConstantPool*) \
nonstatic_field(ConstMethod, _stackmap_data, Array<u1>*) \
nonstatic_field(ConstMethod, _constMethod_size, int) \
nonstatic_field(ConstMethod, _flags, u2) \
nonstatic_field(ConstMethod, _code_size, u2) \
nonstatic_field(ConstMethod, _name_index, u2) \
nonstatic_field(ConstMethod, _signature_index, u2) \
nonstatic_field(ConstMethod, _method_idnum, u2) \
nonstatic_field(ConstMethod, _max_stack, u2) \
nonstatic_field(ConstMethod, _max_locals, u2) \
nonstatic_field(ConstMethod, _size_of_parameters, u2) \
nonstatic_field(ObjArrayKlass, _element_klass, Klass*) \
nonstatic_field(ObjArrayKlass, _bottom_klass, Klass*) \
volatile_nonstatic_field(Symbol, _refcount, short) \
nonstatic_field(Symbol, _identity_hash, int) \
nonstatic_field(Symbol, _length, unsigned short) \
unchecked_nonstatic_field(Symbol, _body, sizeof(jbyte)) /* NOTE: no type */ \
nonstatic_field(TypeArrayKlass, _max_length, int) \
\
\
volatile_nonstatic_field(ConstantPoolCacheEntry, _indices, intx) \
nonstatic_field(ConstantPoolCacheEntry, _f1, volatile Metadata*) \
volatile_nonstatic_field(ConstantPoolCacheEntry, _f2, intx) \
volatile_nonstatic_field(ConstantPoolCacheEntry, _flags, intx) \
\
\
nonstatic_field(CheckedExceptionElement, class_cp_index, u2) \
nonstatic_field(LocalVariableTableElement, start_bci, u2) \
nonstatic_field(LocalVariableTableElement, length, u2) \
nonstatic_field(LocalVariableTableElement, name_cp_index, u2) \
nonstatic_field(LocalVariableTableElement, descriptor_cp_index, u2) \
nonstatic_field(LocalVariableTableElement, signature_cp_index, u2) \
nonstatic_field(LocalVariableTableElement, slot, u2) \
nonstatic_field(ExceptionTableElement, start_pc, u2) \
nonstatic_field(ExceptionTableElement, end_pc, u2) \
nonstatic_field(ExceptionTableElement, handler_pc, u2) \
nonstatic_field(ExceptionTableElement, catch_type_index, u2) \
nonstatic_field(BreakpointInfo, _orig_bytecode, Bytecodes::Code) \
nonstatic_field(BreakpointInfo, _bci, int) \
nonstatic_field(BreakpointInfo, _name_index, u2) \
nonstatic_field(BreakpointInfo, _signature_index, u2) \
nonstatic_field(BreakpointInfo, _next, BreakpointInfo*) \
\
nonstatic_field(JNIid, _holder, Klass*) \
nonstatic_field(JNIid, _next, JNIid*) \
nonstatic_field(JNIid, _offset, int) \
\
static_field(Universe, _boolArrayKlassObj, Klass*) \
static_field(Universe, _byteArrayKlassObj, Klass*) \
static_field(Universe, _charArrayKlassObj, Klass*) \
static_field(Universe, _intArrayKlassObj, Klass*) \
static_field(Universe, _shortArrayKlassObj, Klass*) \
static_field(Universe, _longArrayKlassObj, Klass*) \
static_field(Universe, _singleArrayKlassObj, Klass*) \
static_field(Universe, _doubleArrayKlassObj, Klass*) \
static_field(Universe, _mirrors[0], oop) \
static_field(Universe, _main_thread_group, oop) \
static_field(Universe, _system_thread_group, oop) \
static_field(Universe, _the_empty_class_klass_array, objArrayOop) \
static_field(Universe, _null_ptr_exception_instance, oop) \
static_field(Universe, _arithmetic_exception_instance, oop) \
static_field(Universe, _vm_exception, oop) \
static_field(Universe, _collectedHeap, CollectedHeap*) \
static_field(Universe, _base_vtable_size, int) \
static_field(Universe, _bootstrapping, bool) \
static_field(Universe, _fully_initialized, bool) \
static_field(Universe, _verify_count, int) \
static_field(Universe, _non_oop_bits, intptr_t) \
static_field(Universe, _narrow_oop._base, address) \
static_field(Universe, _narrow_oop._shift, int) \
static_field(Universe, _narrow_oop._use_implicit_null_checks, bool) \
static_field(Universe, _narrow_klass._base, address) \
static_field(Universe, _narrow_klass._shift, int) \
\
\
static_field(os, _polling_page, address) \
\
\
unchecked_nonstatic_field(ageTable, sizes, sizeof(ageTable::sizes)) \
\
nonstatic_field(BarrierSet, _max_covered_regions, int) \
nonstatic_field(BarrierSet, _kind, BarrierSet::Name) \
nonstatic_field(BlockOffsetTable, _bottom, HeapWord*) \
nonstatic_field(BlockOffsetTable, _end, HeapWord*) \
\
nonstatic_field(BlockOffsetSharedArray, _reserved, MemRegion) \
nonstatic_field(BlockOffsetSharedArray, _end, HeapWord*) \
nonstatic_field(BlockOffsetSharedArray, _vs, VirtualSpace) \
nonstatic_field(BlockOffsetSharedArray, _offset_array, u_char*) \
\
nonstatic_field(BlockOffsetArray, _array, BlockOffsetSharedArray*) \
nonstatic_field(BlockOffsetArray, _sp, Space*) \
nonstatic_field(BlockOffsetArrayContigSpace, _next_offset_threshold, HeapWord*) \
nonstatic_field(BlockOffsetArrayContigSpace, _next_offset_index, size_t) \
\
nonstatic_field(BlockOffsetArrayNonContigSpace, _unallocated_block, HeapWord*) \
\
nonstatic_field(CardGeneration, _rs, GenRemSet*) \
nonstatic_field(CardGeneration, _bts, BlockOffsetSharedArray*) \
nonstatic_field(CardGeneration, _shrink_factor, size_t) \
nonstatic_field(CardGeneration, _capacity_at_prologue, size_t) \
nonstatic_field(CardGeneration, _used_at_prologue, size_t) \
\
nonstatic_field(CardTableModRefBS, _whole_heap, const MemRegion) \
nonstatic_field(CardTableModRefBS, _guard_index, const size_t) \
nonstatic_field(CardTableModRefBS, _last_valid_index, const size_t) \
nonstatic_field(CardTableModRefBS, _page_size, const size_t) \
nonstatic_field(CardTableModRefBS, _byte_map_size, const size_t) \
nonstatic_field(CardTableModRefBS, _byte_map, jbyte*) \
nonstatic_field(CardTableModRefBS, _cur_covered_regions, int) \
nonstatic_field(CardTableModRefBS, _covered, MemRegion*) \
nonstatic_field(CardTableModRefBS, _committed, MemRegion*) \
nonstatic_field(CardTableModRefBS, _guard_region, MemRegion) \
nonstatic_field(CardTableModRefBS, byte_map_base, jbyte*) \
\
nonstatic_field(CardTableRS, _ct_bs, CardTableModRefBSForCTRS*) \
\
nonstatic_field(CollectedHeap, _reserved, MemRegion) \
nonstatic_field(CollectedHeap, _barrier_set, BarrierSet*) \
nonstatic_field(CollectedHeap, _defer_initial_card_mark, bool) \
nonstatic_field(CollectedHeap, _is_gc_active, bool) \
nonstatic_field(CollectedHeap, _total_collections, unsigned int) \
nonstatic_field(CompactibleSpace, _compaction_top, HeapWord*) \
nonstatic_field(CompactibleSpace, _first_dead, HeapWord*) \
nonstatic_field(CompactibleSpace, _end_of_live, HeapWord*) \
\
\
nonstatic_field(ContiguousSpace, _top, HeapWord*) \
nonstatic_field(ContiguousSpace, _concurrent_iteration_safe_limit, HeapWord*) \
nonstatic_field(ContiguousSpace, _saved_mark_word, HeapWord*) \
\
nonstatic_field(DefNewGeneration, _next_gen, Generation*) \
nonstatic_field(DefNewGeneration, _tenuring_threshold, uint) \
nonstatic_field(DefNewGeneration, _age_table, ageTable) \
nonstatic_field(DefNewGeneration, _eden_space, EdenSpace*) \
nonstatic_field(DefNewGeneration, _from_space, ContiguousSpace*) \
nonstatic_field(DefNewGeneration, _to_space, ContiguousSpace*) \
\
nonstatic_field(EdenSpace, _gen, DefNewGeneration*) \
\
nonstatic_field(Generation, _reserved, MemRegion) \
nonstatic_field(Generation, _virtual_space, VirtualSpace) \
nonstatic_field(Generation, _level, int) \
nonstatic_field(Generation, _stat_record, Generation::StatRecord) \
\
nonstatic_field(Generation::StatRecord, invocations, int) \
nonstatic_field(Generation::StatRecord, accumulated_time, elapsedTimer) \
\
nonstatic_field(GenerationSpec, _name, Generation::Name) \
nonstatic_field(GenerationSpec, _init_size, size_t) \
nonstatic_field(GenerationSpec, _max_size, size_t) \
\
static_field(GenCollectedHeap, _gch, GenCollectedHeap*) \
nonstatic_field(GenCollectedHeap, _n_gens, int) \
unchecked_nonstatic_field(GenCollectedHeap, _gens, sizeof(GenCollectedHeap::_gens)) /* NOTE: no type */ \
nonstatic_field(GenCollectedHeap, _gen_specs, GenerationSpec**) \
\
nonstatic_field(HeapWord, i, char*) \
\
nonstatic_field(MemRegion, _start, HeapWord*) \
nonstatic_field(MemRegion, _word_size, size_t) \
\
nonstatic_field(OffsetTableContigSpace, _offsets, BlockOffsetArray) \
\
nonstatic_field(OneContigSpaceCardGeneration, _min_heap_delta_bytes, size_t) \
nonstatic_field(OneContigSpaceCardGeneration, _the_space, ContiguousSpace*) \
nonstatic_field(OneContigSpaceCardGeneration, _last_gc, WaterMark) \
\
\
\
nonstatic_field(Space, _bottom, HeapWord*) \
nonstatic_field(Space, _end, HeapWord*) \
\
nonstatic_field(ThreadLocalAllocBuffer, _start, HeapWord*) \
nonstatic_field(ThreadLocalAllocBuffer, _top, HeapWord*) \
nonstatic_field(ThreadLocalAllocBuffer, _end, HeapWord*) \
nonstatic_field(ThreadLocalAllocBuffer, _desired_size, size_t) \
nonstatic_field(ThreadLocalAllocBuffer, _refill_waste_limit, size_t) \
static_field(ThreadLocalAllocBuffer, _target_refills, unsigned) \
nonstatic_field(ThreadLocalAllocBuffer, _number_of_refills, unsigned) \
nonstatic_field(ThreadLocalAllocBuffer, _fast_refill_waste, unsigned) \
nonstatic_field(ThreadLocalAllocBuffer, _slow_refill_waste, unsigned) \
nonstatic_field(ThreadLocalAllocBuffer, _gc_waste, unsigned) \
nonstatic_field(ThreadLocalAllocBuffer, _slow_allocations, unsigned) \
nonstatic_field(VirtualSpace, _low_boundary, char*) \
nonstatic_field(VirtualSpace, _high_boundary, char*) \
nonstatic_field(VirtualSpace, _low, char*) \
nonstatic_field(VirtualSpace, _high, char*) \
nonstatic_field(VirtualSpace, _lower_high, char*) \
nonstatic_field(VirtualSpace, _middle_high, char*) \
nonstatic_field(VirtualSpace, _upper_high, char*) \
nonstatic_field(WaterMark, _point, HeapWord*) \
nonstatic_field(WaterMark, _space, Space*) \
\
\
nonstatic_field(PerfDataPrologue, magic, jint) \
nonstatic_field(PerfDataPrologue, byte_order, jbyte) \
nonstatic_field(PerfDataPrologue, major_version, jbyte) \
nonstatic_field(PerfDataPrologue, minor_version, jbyte) \
nonstatic_field(PerfDataPrologue, accessible, jbyte) \
nonstatic_field(PerfDataPrologue, used, jint) \
nonstatic_field(PerfDataPrologue, overflow, jint) \
nonstatic_field(PerfDataPrologue, mod_time_stamp, jlong) \
nonstatic_field(PerfDataPrologue, entry_offset, jint) \
nonstatic_field(PerfDataPrologue, num_entries, jint) \
\
nonstatic_field(PerfDataEntry, entry_length, jint) \
nonstatic_field(PerfDataEntry, name_offset, jint) \
nonstatic_field(PerfDataEntry, vector_length, jint) \
nonstatic_field(PerfDataEntry, data_type, jbyte) \
nonstatic_field(PerfDataEntry, flags, jbyte) \
nonstatic_field(PerfDataEntry, data_units, jbyte) \
nonstatic_field(PerfDataEntry, data_variability, jbyte) \
nonstatic_field(PerfDataEntry, data_offset, jint) \
\
static_field(PerfMemory, _start, char*) \
static_field(PerfMemory, _end, char*) \
static_field(PerfMemory, _top, char*) \
static_field(PerfMemory, _capacity, size_t) \
static_field(PerfMemory, _prologue, PerfDataPrologue*) \
static_field(PerfMemory, _initialized, jint) \
\
\
static_field(SymbolTable, _the_table, SymbolTable*) \
\
\
static_field(StringTable, _the_table, StringTable*) \
\
\
static_field(SystemDictionary, _dictionary, Dictionary*) \
static_field(SystemDictionary, _placeholders, PlaceholderTable*) \
static_field(SystemDictionary, _shared_dictionary, Dictionary*) \
static_field(SystemDictionary, _system_loader_lock_obj, oop) \
static_field(SystemDictionary, _loader_constraints, LoaderConstraintTable*) \
static_field(SystemDictionary, WK_KLASS(Object_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(String_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(Class_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(Cloneable_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(ClassLoader_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(Serializable_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(System_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(Throwable_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(ThreadDeath_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(Error_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(Exception_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(RuntimeException_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(ClassNotFoundException_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(NoClassDefFoundError_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(LinkageError_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(ClassCastException_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(ArrayStoreException_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(VirtualMachineError_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(OutOfMemoryError_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(StackOverflowError_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(ProtectionDomain_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(AccessControlContext_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(SecureClassLoader_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(Reference_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(SoftReference_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(WeakReference_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(FinalReference_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(PhantomReference_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(Cleaner_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(Finalizer_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(Thread_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(ThreadGroup_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(Properties_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(StringBuffer_klass), Klass*) \
static_field(SystemDictionary, WK_KLASS(MethodHandle_klass), Klass*) \
static_field(SystemDictionary, _box_klasses[0], Klass*) \
static_field(SystemDictionary, _java_system_loader, oop) \
\
\
static_field(vmSymbols, _symbols[0], Symbol*) \
\
\
nonstatic_field(HashtableBucket<mtInternal>, _entry, BasicHashtableEntry<mtInternal>*) \
\
\
nonstatic_field(BasicHashtableEntry<mtInternal>, _next, BasicHashtableEntry<mtInternal>*) \
nonstatic_field(BasicHashtableEntry<mtInternal>, _hash, unsigned int) \
nonstatic_field(IntptrHashtableEntry, _literal, intptr_t) \
\
\
nonstatic_field(BasicHashtable<mtInternal>, _table_size, int) \
nonstatic_field(BasicHashtable<mtInternal>, _buckets, HashtableBucket<mtInternal>*) \
volatile_nonstatic_field(BasicHashtable<mtInternal>, _free_list, BasicHashtableEntry<mtInternal>*) \
nonstatic_field(BasicHashtable<mtInternal>, _first_free_entry, char*) \
nonstatic_field(BasicHashtable<mtInternal>, _end_block, char*) \
nonstatic_field(BasicHashtable<mtInternal>, _entry_size, int) \
\
\
nonstatic_field(DictionaryEntry, _loader_data, ClassLoaderData*) \
nonstatic_field(DictionaryEntry, _pd_set, ProtectionDomainEntry*) \
\
\
nonstatic_field(PlaceholderEntry, _loader_data, ClassLoaderData*) \
\
\
nonstatic_field(ProtectionDomainEntry, _next, ProtectionDomainEntry*) \
nonstatic_field(ProtectionDomainEntry, _pd_cache, ProtectionDomainCacheEntry*) \
\
\
nonstatic_field(ProtectionDomainCacheEntry, _literal, oop) \
\
\
nonstatic_field(LoaderConstraintEntry, _name, Symbol*) \
nonstatic_field(LoaderConstraintEntry, _num_loaders, int) \
nonstatic_field(LoaderConstraintEntry, _max_loaders, int) \
nonstatic_field(LoaderConstraintEntry, _loaders, ClassLoaderData**) \
\
nonstatic_field(ClassLoaderData, _class_loader, oop) \
nonstatic_field(ClassLoaderData, _next, ClassLoaderData*) \
\
static_field(ClassLoaderDataGraph, _head, ClassLoaderData*) \
\
\
nonstatic_field(Array<Klass*>, _length, int) \
nonstatic_field(Array<Klass*>, _data[0], Klass*) \
\
\
nonstatic_field(GenericGrowableArray, _len, int) \
nonstatic_field(GenericGrowableArray, _max, int) \
nonstatic_field(GenericGrowableArray, _arena, Arena*) \
nonstatic_field(GrowableArray<int>, _data, int*) \
\
\
static_field(CodeCache, _heap, CodeHeap*) \
static_field(CodeCache, _scavenge_root_nmethods, nmethod*) \
\
\
nonstatic_field(CodeHeap, _memory, VirtualSpace) \
nonstatic_field(CodeHeap, _segmap, VirtualSpace) \
nonstatic_field(CodeHeap, _log2_segment_size, int) \
nonstatic_field(HeapBlock, _header, HeapBlock::Header) \
nonstatic_field(HeapBlock::Header, _length, size_t) \
nonstatic_field(HeapBlock::Header, _used, bool) \
\
\
static_field(AbstractInterpreter, _code, StubQueue*) \
\
\
nonstatic_field(StubQueue, _stub_buffer, address) \
nonstatic_field(StubQueue, _buffer_limit, int) \
nonstatic_field(StubQueue, _queue_begin, int) \
nonstatic_field(StubQueue, _queue_end, int) \
nonstatic_field(StubQueue, _number_of_stubs, int) \
nonstatic_field(InterpreterCodelet, _size, int) \
nonstatic_field(InterpreterCodelet, _description, const char*) \
nonstatic_field(InterpreterCodelet, _bytecode, Bytecodes::Code) \
\
\
static_field(StubRoutines, _verify_oop_count, jint) \
static_field(StubRoutines, _call_stub_return_address, address) \
static_field(StubRoutines, _aescrypt_encryptBlock, address) \
static_field(StubRoutines, _aescrypt_decryptBlock, address) \
static_field(StubRoutines, _cipherBlockChaining_encryptAESCrypt, address) \
static_field(StubRoutines, _cipherBlockChaining_decryptAESCrypt, address) \
static_field(StubRoutines, _ghash_processBlocks, address) \
static_field(StubRoutines, _updateBytesCRC32, address) \
static_field(StubRoutines, _crc_table_adr, address) \
static_field(StubRoutines, _multiplyToLen, address) \
static_field(StubRoutines, _squareToLen, address) \
static_field(StubRoutines, _mulAdd, address) \
\
\
static_field(SharedRuntime, _ic_miss_blob, RuntimeStub*) \
\
\
nonstatic_field(PcDesc, _pc_offset, int) \
nonstatic_field(PcDesc, _scope_decode_offset, int) \
nonstatic_field(PcDesc, _obj_decode_offset, int) \
nonstatic_field(PcDesc, _flags, int) \
\
\
nonstatic_field(CodeBlob, _name, const char*) \
nonstatic_field(CodeBlob, _size, int) \
nonstatic_field(CodeBlob, _header_size, int) \
nonstatic_field(CodeBlob, _relocation_size, int) \
nonstatic_field(CodeBlob, _content_offset, int) \
nonstatic_field(CodeBlob, _code_offset, int) \
nonstatic_field(CodeBlob, _frame_complete_offset, int) \
nonstatic_field(CodeBlob, _data_offset, int) \
nonstatic_field(CodeBlob, _frame_size, int) \
nonstatic_field(CodeBlob, _oop_maps, OopMapSet*) \
\
nonstatic_field(RuntimeStub, _caller_must_gc_arguments, bool) \
\
\
nonstatic_field(nmethod, _method, Method*) \
nonstatic_field(nmethod, _entry_bci, int) \
nonstatic_field(nmethod, _osr_link, nmethod*) \
nonstatic_field(nmethod, _scavenge_root_link, nmethod*) \
nonstatic_field(nmethod, _scavenge_root_state, jbyte) \
nonstatic_field(nmethod, _state, volatile unsigned char) \
nonstatic_field(nmethod, _exception_offset, int) \
nonstatic_field(nmethod, _deoptimize_offset, int) \
nonstatic_field(nmethod, _deoptimize_mh_offset, int) \
nonstatic_field(nmethod, _orig_pc_offset, int) \
nonstatic_field(nmethod, _stub_offset, int) \
nonstatic_field(nmethod, _consts_offset, int) \
nonstatic_field(nmethod, _oops_offset, int) \
nonstatic_field(nmethod, _metadata_offset, int) \
nonstatic_field(nmethod, _scopes_data_offset, int) \
nonstatic_field(nmethod, _scopes_pcs_offset, int) \
nonstatic_field(nmethod, _dependencies_offset, int) \
nonstatic_field(nmethod, _handler_table_offset, int) \
nonstatic_field(nmethod, _nul_chk_table_offset, int) \
nonstatic_field(nmethod, _nmethod_end_offset, int) \
nonstatic_field(nmethod, _entry_point, address) \
nonstatic_field(nmethod, _verified_entry_point, address) \
nonstatic_field(nmethod, _osr_entry_point, address) \
nonstatic_field(nmethod, _lock_count, jint) \
nonstatic_field(nmethod, _stack_traversal_mark, long) \
nonstatic_field(nmethod, _compile_id, int) \
nonstatic_field(nmethod, _comp_level, int) \
volatile_nonstatic_field(nmethod, _exception_cache, ExceptionCache*) \
nonstatic_field(nmethod, _marked_for_deoptimization, bool) \
\
unchecked_c2_static_field(Deoptimization, _trap_reason_name, void*) \
\
\
nonstatic_field(JavaCallWrapper, _anchor, JavaFrameAnchor) \
volatile_nonstatic_field(JavaFrameAnchor, _last_Java_sp, intptr_t*) \
volatile_nonstatic_field(JavaFrameAnchor, _last_Java_pc, address) \
\
\
static_field(Threads, _thread_list, JavaThread*) \
static_field(Threads, _number_of_threads, int) \
static_field(Threads, _number_of_non_daemon_threads, int) \
static_field(Threads, _return_code, int) \
\
nonstatic_field(ThreadShadow, _pending_exception, oop) \
nonstatic_field(ThreadShadow, _exception_file, const char*) \
nonstatic_field(ThreadShadow, _exception_line, int) \
volatile_nonstatic_field(Thread, _suspend_flags, uint32_t) \
nonstatic_field(Thread, _active_handles, JNIHandleBlock*) \
nonstatic_field(Thread, _tlab, ThreadLocalAllocBuffer) \
nonstatic_field(Thread, _allocated_bytes, jlong) \
nonstatic_field(Thread, _current_pending_monitor, ObjectMonitor*) \
nonstatic_field(Thread, _current_pending_monitor_is_from_java, bool) \
nonstatic_field(Thread, _current_waiting_monitor, ObjectMonitor*) \
nonstatic_field(NamedThread, _name, char*) \
nonstatic_field(NamedThread, _processed_thread, JavaThread*) \
nonstatic_field(JavaThread, _next, JavaThread*) \
nonstatic_field(JavaThread, _threadObj, oop) \
nonstatic_field(JavaThread, _anchor, JavaFrameAnchor) \
nonstatic_field(JavaThread, _vm_result, oop) \
nonstatic_field(JavaThread, _vm_result_2, Metadata*) \
nonstatic_field(JavaThread, _pending_async_exception, oop) \
volatile_nonstatic_field(JavaThread, _exception_oop, oop) \
volatile_nonstatic_field(JavaThread, _exception_pc, address) \
volatile_nonstatic_field(JavaThread, _is_method_handle_return, int) \
nonstatic_field(JavaThread, _special_runtime_exit_condition, JavaThread::AsyncRequests) \
nonstatic_field(JavaThread, _saved_exception_pc, address) \
volatile_nonstatic_field(JavaThread, _thread_state, JavaThreadState) \
nonstatic_field(JavaThread, _osthread, OSThread*) \
nonstatic_field(JavaThread, _stack_base, address) \
nonstatic_field(JavaThread, _stack_size, size_t) \
nonstatic_field(JavaThread, _vframe_array_head, vframeArray*) \
nonstatic_field(JavaThread, _vframe_array_last, vframeArray*) \
nonstatic_field(JavaThread, _satb_mark_queue, ObjPtrQueue) \
nonstatic_field(JavaThread, _dirty_card_queue, DirtyCardQueue) \
nonstatic_field(Thread, _resource_area, ResourceArea*) \
nonstatic_field(CompilerThread, _env, ciEnv*) \
\
\
volatile_nonstatic_field(OSThread, _interrupted, jint) \
\
\
nonstatic_field(OopMap, _pc_offset, int) \
nonstatic_field(OopMap, _omv_count, int) \
nonstatic_field(OopMap, _omv_data_size, int) \
nonstatic_field(OopMap, _omv_data, unsigned char*) \
nonstatic_field(OopMap, _write_stream, CompressedWriteStream*) \
nonstatic_field(OopMapSet, _om_count, int) \
nonstatic_field(OopMapSet, _om_size, int) \
nonstatic_field(OopMapSet, _om_data, OopMap**) \
\
static_field(JNIHandles, _global_handles, JNIHandleBlock*) \
static_field(JNIHandles, _weak_global_handles, JNIHandleBlock*) \
static_field(JNIHandles, _deleted_handle, oop) \
\
unchecked_nonstatic_field(JNIHandleBlock, _handles, JNIHandleBlock::block_size_in_oops * sizeof(Oop)) /* Note: no type */ \
nonstatic_field(JNIHandleBlock, _top, int) \
nonstatic_field(JNIHandleBlock, _next, JNIHandleBlock*) \
\
\
nonstatic_field(CompressedStream, _buffer, u_char*) \
nonstatic_field(CompressedStream, _position, int) \
\
\
static_field(VMRegImpl, regName[0], const char*) \
static_field(VMRegImpl, stack0, VMReg) \
\
\
unchecked_c1_static_field(Runtime1, _blobs, sizeof(Runtime1::_blobs)) /* NOTE: no type */ \
\
\
nonstatic_field(Chunk, _next, Chunk*) \
nonstatic_field(Chunk, _len, const size_t) \
\
nonstatic_field(Arena, _first, Chunk*) \
nonstatic_field(Arena, _chunk, Chunk*) \
nonstatic_field(Arena, _hwm, char*) \
nonstatic_field(Arena, _max, char*) \
\
\
nonstatic_field(ciEnv, _system_dictionary_modification_counter, int) \
nonstatic_field(ciEnv, _compiler_data, void*) \
nonstatic_field(ciEnv, _failure_reason, const char*) \
nonstatic_field(ciEnv, _factory, ciObjectFactory*) \
nonstatic_field(ciEnv, _dependencies, Dependencies*) \
nonstatic_field(ciEnv, _task, CompileTask*) \
nonstatic_field(ciEnv, _arena, Arena*) \
\
nonstatic_field(ciBaseObject, _ident, uint) \
\
nonstatic_field(ciObject, _handle, jobject) \
nonstatic_field(ciObject, _klass, ciKlass*) \
\
nonstatic_field(ciMetadata, _metadata, Metadata*) \
\
nonstatic_field(ciSymbol, _symbol, Symbol*) \
\
nonstatic_field(ciType, _basic_type, BasicType) \
\
nonstatic_field(ciKlass, _name, ciSymbol*) \
\
nonstatic_field(ciArrayKlass, _dimension, jint) \
\
nonstatic_field(ciObjArrayKlass, _element_klass, ciKlass*) \
nonstatic_field(ciObjArrayKlass, _base_element_klass, ciKlass*) \
\
nonstatic_field(ciInstanceKlass, _init_state, InstanceKlass::ClassState) \
nonstatic_field(ciInstanceKlass, _is_shared, bool) \
\
nonstatic_field(ciMethod, _interpreter_invocation_count, int) \
nonstatic_field(ciMethod, _interpreter_throwout_count, int) \
nonstatic_field(ciMethod, _instructions_size, int) \
\
nonstatic_field(ciMethodData, _data_size, int) \
nonstatic_field(ciMethodData, _state, u_char) \
nonstatic_field(ciMethodData, _extra_data_size, int) \
nonstatic_field(ciMethodData, _data, intptr_t*) \
nonstatic_field(ciMethodData, _hint_di, int) \
nonstatic_field(ciMethodData, _eflags, intx) \
nonstatic_field(ciMethodData, _arg_local, intx) \
nonstatic_field(ciMethodData, _arg_stack, intx) \
nonstatic_field(ciMethodData, _arg_returned, intx) \
nonstatic_field(ciMethodData, _current_mileage, int) \
nonstatic_field(ciMethodData, _orig, MethodData) \
\
nonstatic_field(ciField, _holder, ciInstanceKlass*) \
nonstatic_field(ciField, _name, ciSymbol*) \
nonstatic_field(ciField, _signature, ciSymbol*) \
nonstatic_field(ciField, _offset, int) \
nonstatic_field(ciField, _is_constant, bool) \
nonstatic_field(ciField, _constant_value, ciConstant) \
\
nonstatic_field(ciObjectFactory, _ci_metadata, GrowableArray<ciMetadata*>*) \
nonstatic_field(ciObjectFactory, _symbols, GrowableArray<ciSymbol*>*) \
nonstatic_field(ciObjectFactory, _unloaded_methods, GrowableArray<ciMethod*>*) \
\
nonstatic_field(ciConstant, _type, BasicType) \
nonstatic_field(ciConstant, _value._int, jint) \
nonstatic_field(ciConstant, _value._long, jlong) \
nonstatic_field(ciConstant, _value._float, jfloat) \
nonstatic_field(ciConstant, _value._double, jdouble) \
nonstatic_field(ciConstant, _value._object, ciObject*) \
\
\
volatile_nonstatic_field(ObjectMonitor, _header, markOop) \
unchecked_nonstatic_field(ObjectMonitor, _object, sizeof(void *)) /* NOTE: no type */ \
unchecked_nonstatic_field(ObjectMonitor, _owner, sizeof(void *)) /* NOTE: no type */ \
volatile_nonstatic_field(ObjectMonitor, _count, intptr_t) \
volatile_nonstatic_field(ObjectMonitor, _waiters, intptr_t) \
volatile_nonstatic_field(ObjectMonitor, _recursions, intptr_t) \
nonstatic_field(ObjectMonitor, FreeNext, ObjectMonitor*) \
volatile_nonstatic_field(BasicLock, _displaced_header, markOop) \
nonstatic_field(BasicObjectLock, _lock, BasicLock) \
nonstatic_field(BasicObjectLock, _obj, oop) \
static_ptr_volatile_field(ObjectSynchronizer,gBlockList, ObjectMonitor*) \
\
\
unchecked_c2_static_field(Matcher, _regEncode, sizeof(Matcher::_regEncode)) /* NOTE: no type */ \
\
c2_nonstatic_field(Node, _in, Node**) \
c2_nonstatic_field(Node, _out, Node**) \
c2_nonstatic_field(Node, _cnt, node_idx_t) \
c2_nonstatic_field(Node, _max, node_idx_t) \
c2_nonstatic_field(Node, _outcnt, node_idx_t) \
c2_nonstatic_field(Node, _outmax, node_idx_t) \
c2_nonstatic_field(Node, _idx, const node_idx_t) \
c2_nonstatic_field(Node, _class_id, jushort) \
c2_nonstatic_field(Node, _flags, jushort) \
\
c2_nonstatic_field(Compile, _root, RootNode*) \
c2_nonstatic_field(Compile, _unique, uint) \
c2_nonstatic_field(Compile, _entry_bci, int) \
c2_nonstatic_field(Compile, _top, Node*) \
c2_nonstatic_field(Compile, _cfg, PhaseCFG*) \
c2_nonstatic_field(Compile, _regalloc, PhaseRegAlloc*) \
c2_nonstatic_field(Compile, _method, ciMethod*) \
c2_nonstatic_field(Compile, _compile_id, const int) \
c2_nonstatic_field(Compile, _save_argument_registers, const bool) \
c2_nonstatic_field(Compile, _subsume_loads, const bool) \
c2_nonstatic_field(Compile, _do_escape_analysis, const bool) \
c2_nonstatic_field(Compile, _eliminate_boxing, const bool) \
c2_nonstatic_field(Compile, _ilt, InlineTree*) \
\
c2_nonstatic_field(InlineTree, _caller_jvms, JVMState*) \
c2_nonstatic_field(InlineTree, _method, ciMethod*) \
c2_nonstatic_field(InlineTree, _caller_tree, InlineTree*) \
c2_nonstatic_field(InlineTree, _subtrees, GrowableArray<InlineTree*>) \
\
c2_nonstatic_field(OptoRegPair, _first, short) \
c2_nonstatic_field(OptoRegPair, _second, short) \
\
c2_nonstatic_field(JVMState, _caller, JVMState*) \
c2_nonstatic_field(JVMState, _depth, uint) \
c2_nonstatic_field(JVMState, _locoff, uint) \
c2_nonstatic_field(JVMState, _stkoff, uint) \
c2_nonstatic_field(JVMState, _monoff, uint) \
c2_nonstatic_field(JVMState, _scloff, uint) \
c2_nonstatic_field(JVMState, _endoff, uint) \
c2_nonstatic_field(JVMState, _sp, uint) \
c2_nonstatic_field(JVMState, _bci, int) \
c2_nonstatic_field(JVMState, _method, ciMethod*) \
c2_nonstatic_field(JVMState, _map, SafePointNode*) \
\
c2_nonstatic_field(SafePointNode, _jvms, JVMState* const) \
\
c2_nonstatic_field(MachSafePointNode, _jvms, JVMState*) \
c2_nonstatic_field(MachSafePointNode, _jvmadj, uint) \
\
c2_nonstatic_field(MachIfNode, _prob, jfloat) \
c2_nonstatic_field(MachIfNode, _fcnt, jfloat) \
\
c2_nonstatic_field(CallNode, _entry_point, address) \
\
c2_nonstatic_field(CallJavaNode, _method, ciMethod*) \
\
c2_nonstatic_field(CallRuntimeNode, _name, const char*) \
\
c2_nonstatic_field(CallStaticJavaNode, _name, const char*) \
\
c2_nonstatic_field(MachCallJavaNode, _method, ciMethod*) \
c2_nonstatic_field(MachCallJavaNode, _bci, int) \
\
c2_nonstatic_field(MachCallStaticJavaNode, _name, const char*) \
\
c2_nonstatic_field(MachCallRuntimeNode, _name, const char*) \
\
c2_nonstatic_field(PhaseCFG, _number_of_blocks, uint) \
c2_nonstatic_field(PhaseCFG, _blocks, Block_List) \
c2_nonstatic_field(PhaseCFG, _node_to_block_mapping, Block_Array) \
c2_nonstatic_field(PhaseCFG, _root_block, Block*) \
\
c2_nonstatic_field(PhaseRegAlloc, _node_regs, OptoRegPair*) \
c2_nonstatic_field(PhaseRegAlloc, _node_regs_max_index, uint) \
c2_nonstatic_field(PhaseRegAlloc, _framesize, uint) \
c2_nonstatic_field(PhaseRegAlloc, _max_reg, OptoReg::Name) \
\
c2_nonstatic_field(PhaseChaitin, _trip_cnt, int) \
c2_nonstatic_field(PhaseChaitin, _alternate, int) \
c2_nonstatic_field(PhaseChaitin, _lo_degree, uint) \
c2_nonstatic_field(PhaseChaitin, _lo_stk_degree, uint) \
c2_nonstatic_field(PhaseChaitin, _hi_degree, uint) \
c2_nonstatic_field(PhaseChaitin, _simplified, uint) \
\
c2_nonstatic_field(Block, _nodes, Node_List) \
c2_nonstatic_field(Block, _succs, Block_Array) \
c2_nonstatic_field(Block, _num_succs, uint) \
c2_nonstatic_field(Block, _pre_order, uint) \
c2_nonstatic_field(Block, _dom_depth, uint) \
c2_nonstatic_field(Block, _idom, Block*) \
c2_nonstatic_field(Block, _freq, jfloat) \
\
c2_nonstatic_field(CFGElement, _freq, jfloat) \
\
c2_nonstatic_field(Block_List, _cnt, uint) \
\
c2_nonstatic_field(Block_Array, _size, uint) \
c2_nonstatic_field(Block_Array, _blocks, Block**) \
c2_nonstatic_field(Block_Array, _arena, Arena*) \
\
c2_nonstatic_field(Node_List, _cnt, uint) \
\
c2_nonstatic_field(Node_Array, _max, uint) \
c2_nonstatic_field(Node_Array, _nodes, Node**) \
c2_nonstatic_field(Node_Array, _a, Arena*) \
\
\
\
nonstatic_field(Flag, _type, const char*) \
nonstatic_field(Flag, _name, const char*) \
unchecked_nonstatic_field(Flag, _addr, sizeof(void*)) /* NOTE: no type */ \
nonstatic_field(Flag, _flags, Flag::Flags) \
static_field(Flag, flags, Flag*) \
static_field(Flag, numFlags, size_t) \
\
\
static_field(Abstract_VM_Version, _s_vm_release, const char*) \
static_field(Abstract_VM_Version, _s_internal_vm_info_string, const char*) \
static_field(Abstract_VM_Version, _vm_major_version, int) \
static_field(Abstract_VM_Version, _vm_minor_version, int) \
static_field(Abstract_VM_Version, _vm_build_number, int) \
static_field(Abstract_VM_Version, _reserve_for_allocation_prefetch, int) \
\
static_field(JDK_Version, _current, JDK_Version) \
nonstatic_field(JDK_Version, _partially_initialized, bool) \
nonstatic_field(JDK_Version, _major, unsigned char) \
\
\
JVMTI_STRUCTS(static_field) \
\
\
static_field(Arguments, _jvm_flags_array, char**) \
static_field(Arguments, _num_jvm_flags, int) \
static_field(Arguments, _jvm_args_array, char**) \
static_field(Arguments, _num_jvm_args, int) \
static_field(Arguments, _java_command, char*) \
\
\
nonstatic_field(Array<int>, _length, int) \
unchecked_nonstatic_field(Array<int>, _data, sizeof(int)) \
unchecked_nonstatic_field(Array<u1>, _data, sizeof(u1)) \
unchecked_nonstatic_field(Array<u2>, _data, sizeof(u2)) \
unchecked_nonstatic_field(Array<Method*>, _data, sizeof(Method*)) \
unchecked_nonstatic_field(Array<Klass*>, _data, sizeof(Klass*)) \
\
\
static_field(java_lang_Class, _klass_offset, int) \
static_field(java_lang_Class, _array_klass_offset, int) \
static_field(java_lang_Class, _oop_size_offset, int) \
static_field(java_lang_Class, _static_oop_field_count_offset, int) \
\
\
nonstatic_field(CompileTask, _method, Method*) \
nonstatic_field(CompileTask, _osr_bci, int) \
nonstatic_field(CompileTask, _comp_level, int) \
nonstatic_field(CompileTask, _compile_id, uint) \
nonstatic_field(CompileTask, _next, CompileTask*) \
nonstatic_field(CompileTask, _prev, CompileTask*) \
\
nonstatic_field(vframeArray, _next, vframeArray*) \
nonstatic_field(vframeArray, _original, frame) \
nonstatic_field(vframeArray, _caller, frame) \
nonstatic_field(vframeArray, _frames, int) \
\
nonstatic_field(vframeArrayElement, _frame, frame) \
nonstatic_field(vframeArrayElement, _bci, int) \
nonstatic_field(vframeArrayElement, _method, Method*) \
\
nonstatic_field(PtrQueue, _active, bool) \
nonstatic_field(PtrQueue, _buf, void**) \
nonstatic_field(PtrQueue, _index, size_t) \
\
nonstatic_field(AccessFlags, _flags, jint) \
nonstatic_field(elapsedTimer, _counter, jlong) \
nonstatic_field(elapsedTimer, _active, bool) \
nonstatic_field(InvocationCounter, _counter, unsigned int) \
volatile_nonstatic_field(FreeChunk, _size, size_t) \
nonstatic_field(FreeChunk, _next, FreeChunk*) \
nonstatic_field(FreeChunk, _prev, FreeChunk*) \
nonstatic_field(AdaptiveFreeList<FreeChunk>, _size, size_t) \
nonstatic_field(AdaptiveFreeList<FreeChunk>, _count, ssize_t)
#define VM_TYPES(declare_type, \
declare_toplevel_type, \
declare_oop_type, \
declare_integer_type, \
declare_unsigned_integer_type, \
declare_c1_toplevel_type, \
declare_c2_type, \
declare_c2_toplevel_type) \
\
\
declare_toplevel_type(jboolean) \
declare_toplevel_type(jbyte) \
declare_toplevel_type(jchar) \
declare_toplevel_type(jdouble) \
declare_toplevel_type(jfloat) \
declare_toplevel_type(jint) \
declare_toplevel_type(jlong) \
declare_toplevel_type(jshort) \
\
declare_integer_type(bool) \
declare_integer_type(short) \
declare_integer_type(int) \
declare_integer_type(long) \
declare_integer_type(char) \
declare_unsigned_integer_type(unsigned char) \
declare_unsigned_integer_type(volatile unsigned char) \
declare_unsigned_integer_type(u_char) \
declare_unsigned_integer_type(unsigned int) \
declare_unsigned_integer_type(uint) \
declare_unsigned_integer_type(unsigned short) \
declare_unsigned_integer_type(jushort) \
declare_unsigned_integer_type(unsigned long) \
declare_unsigned_integer_type(u1) \
declare_unsigned_integer_type(u2) \
declare_unsigned_integer_type(u4) \
declare_unsigned_integer_type(u8) \
declare_unsigned_integer_type(unsigned) \
\
\
declare_toplevel_type(void*) \
declare_toplevel_type(int*) \
declare_toplevel_type(char*) \
declare_toplevel_type(char**) \
declare_toplevel_type(u_char*) \
declare_toplevel_type(unsigned char*) \
declare_toplevel_type(volatile unsigned char*) \
\
\
declare_unsigned_integer_type(size_t) \
declare_integer_type(ssize_t) \
declare_integer_type(intx) \
declare_integer_type(intptr_t) \
declare_unsigned_integer_type(uintx) \
declare_unsigned_integer_type(uintptr_t) \
declare_unsigned_integer_type(uint32_t) \
declare_unsigned_integer_type(uint64_t) \
\
\
declare_toplevel_type(oopDesc) \
declare_type(arrayOopDesc, oopDesc) \
declare_type(objArrayOopDesc, arrayOopDesc) \
declare_type(instanceOopDesc, oopDesc) \
declare_type(markOopDesc, oopDesc) \
\
\
declare_toplevel_type(CompiledICHolder) \
declare_toplevel_type(MetaspaceObj) \
declare_type(Metadata, MetaspaceObj) \
declare_type(Klass, Metadata) \
declare_type(ArrayKlass, Klass) \
declare_type(ObjArrayKlass, ArrayKlass) \
declare_type(TypeArrayKlass, ArrayKlass) \
declare_type(InstanceKlass, Klass) \
declare_type(InstanceClassLoaderKlass, InstanceKlass) \
declare_type(InstanceMirrorKlass, InstanceKlass) \
declare_type(InstanceRefKlass, InstanceKlass) \
declare_type(ConstantPool, Metadata) \
declare_type(ConstantPoolCache, MetaspaceObj) \
declare_type(MethodData, Metadata) \
declare_type(Method, Metadata) \
declare_type(MethodCounters, MetaspaceObj) \
declare_type(ConstMethod, MetaspaceObj) \
\
declare_toplevel_type(vtableEntry) \
\
declare_toplevel_type(Symbol) \
declare_toplevel_type(Symbol*) \
declare_toplevel_type(volatile Metadata*) \
\
declare_toplevel_type(DataLayout) \
declare_toplevel_type(nmethodBucket) \
\
\
declare_oop_type(markOop) \
declare_oop_type(objArrayOop) \
declare_oop_type(oop) \
declare_oop_type(narrowOop) \
declare_oop_type(typeArrayOop) \
\
\
declare_toplevel_type(CheckedExceptionElement) \
declare_toplevel_type(LocalVariableTableElement) \
declare_toplevel_type(ExceptionTableElement) \
declare_toplevel_type(MethodParametersElement) \
\
declare_toplevel_type(ClassLoaderData) \
declare_toplevel_type(ClassLoaderDataGraph) \
\
\
declare_toplevel_type(CollectedHeap) \
declare_type(SharedHeap, CollectedHeap) \
declare_type(GenCollectedHeap, SharedHeap) \
declare_toplevel_type(Generation) \
declare_type(DefNewGeneration, Generation) \
declare_type(CardGeneration, Generation) \
declare_type(OneContigSpaceCardGeneration, CardGeneration) \
declare_type(TenuredGeneration, OneContigSpaceCardGeneration) \
declare_toplevel_type(Space) \
declare_toplevel_type(BitMap) \
declare_type(CompactibleSpace, Space) \
declare_type(ContiguousSpace, CompactibleSpace) \
declare_type(EdenSpace, ContiguousSpace) \
declare_type(OffsetTableContigSpace, ContiguousSpace) \
declare_type(TenuredSpace, OffsetTableContigSpace) \
declare_toplevel_type(BarrierSet) \
declare_type(ModRefBarrierSet, BarrierSet) \
declare_type(CardTableModRefBS, ModRefBarrierSet) \
declare_type(CardTableModRefBSForCTRS, CardTableModRefBS) \
declare_toplevel_type(BarrierSet::Name) \
declare_toplevel_type(GenRemSet) \
declare_type(CardTableRS, GenRemSet) \
declare_toplevel_type(BlockOffsetSharedArray) \
declare_toplevel_type(BlockOffsetTable) \
declare_type(BlockOffsetArray, BlockOffsetTable) \
declare_type(BlockOffsetArrayContigSpace, BlockOffsetArray) \
declare_type(BlockOffsetArrayNonContigSpace, BlockOffsetArray) \
\
\
declare_toplevel_type(ageTable) \
declare_toplevel_type(Generation::StatRecord) \
declare_toplevel_type(GenerationSpec) \
declare_toplevel_type(HeapWord) \
declare_toplevel_type(MemRegion) \
declare_toplevel_type(ThreadLocalAllocBuffer) \
declare_toplevel_type(VirtualSpace) \
declare_toplevel_type(WaterMark) \
declare_toplevel_type(ObjPtrQueue) \
declare_toplevel_type(DirtyCardQueue) \
\
\
declare_toplevel_type(BarrierSet*) \
declare_toplevel_type(BlockOffsetSharedArray*) \
declare_toplevel_type(GenRemSet*) \
declare_toplevel_type(CardTableRS*) \
declare_toplevel_type(CardTableModRefBS*) \
declare_toplevel_type(CardTableModRefBS**) \
declare_toplevel_type(CardTableModRefBSForCTRS*) \
declare_toplevel_type(CardTableModRefBSForCTRS**) \
declare_toplevel_type(CollectedHeap*) \
declare_toplevel_type(ContiguousSpace*) \
declare_toplevel_type(DefNewGeneration*) \
declare_toplevel_type(EdenSpace*) \
declare_toplevel_type(GenCollectedHeap*) \
declare_toplevel_type(Generation*) \
declare_toplevel_type(GenerationSpec**) \
declare_toplevel_type(HeapWord*) \
declare_toplevel_type(MemRegion*) \
declare_toplevel_type(OffsetTableContigSpace*) \
declare_toplevel_type(OneContigSpaceCardGeneration*) \
declare_toplevel_type(Space*) \
declare_toplevel_type(ThreadLocalAllocBuffer*) \
\
\
declare_toplevel_type(PerfDataPrologue) \
declare_toplevel_type(PerfDataPrologue*) \
declare_toplevel_type(PerfDataEntry) \
declare_toplevel_type(PerfMemory) \
\
\
declare_toplevel_type(BasicHashtable<mtInternal>) \
declare_type(IntptrHashtable, BasicHashtable<mtInternal>) \
declare_type(SymbolTable, SymbolHashtable) \
declare_type(StringTable, StringHashtable) \
declare_type(LoaderConstraintTable, KlassHashtable) \
declare_type(KlassTwoOopHashtable, KlassHashtable) \
declare_type(Dictionary, KlassTwoOopHashtable) \
declare_type(PlaceholderTable, SymbolTwoOopHashtable) \
declare_toplevel_type(BasicHashtableEntry<mtInternal>) \
declare_type(IntptrHashtableEntry, BasicHashtableEntry<mtInternal>) \
declare_type(DictionaryEntry, KlassHashtableEntry) \
declare_type(PlaceholderEntry, SymbolHashtableEntry) \
declare_type(LoaderConstraintEntry, KlassHashtableEntry) \
declare_toplevel_type(HashtableBucket<mtInternal>) \
declare_toplevel_type(SystemDictionary) \
declare_toplevel_type(vmSymbols) \
declare_toplevel_type(ProtectionDomainEntry) \
declare_toplevel_type(ProtectionDomainCacheEntry) \
\
declare_toplevel_type(GenericGrowableArray) \
declare_toplevel_type(GrowableArray<int>) \
declare_toplevel_type(Arena) \
declare_type(ResourceArea, Arena) \
declare_toplevel_type(Chunk) \
\
\
declare_toplevel_type(Threads) \
declare_toplevel_type(ThreadShadow) \
declare_type(Thread, ThreadShadow) \
declare_type(NamedThread, Thread) \
declare_type(WatcherThread, Thread) \
declare_type(JavaThread, Thread) \
declare_type(JvmtiAgentThread, JavaThread) \
declare_type(ServiceThread, JavaThread) \
declare_type(CompilerThread, JavaThread) \
declare_toplevel_type(OSThread) \
declare_toplevel_type(JavaFrameAnchor) \
\
\
declare_toplevel_type(AbstractInterpreter) \
\
\
declare_toplevel_type(StubQueue) \
declare_toplevel_type(StubRoutines) \
declare_toplevel_type(Stub) \
declare_type(InterpreterCodelet, Stub) \
\
\
declare_toplevel_type(JavaCallWrapper) \
\
\
declare_toplevel_type(CodeCache) \
\
\
declare_toplevel_type(CodeHeap) \
declare_toplevel_type(CodeHeap*) \
declare_toplevel_type(HeapBlock) \
declare_toplevel_type(HeapBlock::Header) \
declare_type(FreeBlock, HeapBlock) \
\
\
declare_toplevel_type(SharedRuntime) \
\
declare_toplevel_type(CodeBlob) \
declare_type(BufferBlob, CodeBlob) \
declare_type(AdapterBlob, BufferBlob) \
declare_type(MethodHandlesAdapterBlob, BufferBlob) \
declare_type(nmethod, CodeBlob) \
declare_type(RuntimeStub, CodeBlob) \
declare_type(SingletonBlob, CodeBlob) \
declare_type(SafepointBlob, SingletonBlob) \
declare_type(DeoptimizationBlob, SingletonBlob) \
declare_c2_type(ExceptionBlob, SingletonBlob) \
declare_c2_type(UncommonTrapBlob, CodeBlob) \
\
\
declare_toplevel_type(PcDesc) \
declare_toplevel_type(ExceptionCache) \
declare_toplevel_type(PcDescCache) \
declare_toplevel_type(Dependencies) \
declare_toplevel_type(CompileTask) \
declare_toplevel_type(Deoptimization) \
\
\
declare_toplevel_type(OopMap) \
declare_toplevel_type(OopMapSet) \
\
\
declare_toplevel_type(CompressedStream) \
\
\
declare_toplevel_type(VMRegImpl) \
\
\
declare_toplevel_type(JNIHandles) \
declare_toplevel_type(JNIHandleBlock) \
declare_toplevel_type(jobject) \
\
\
declare_c1_toplevel_type(Runtime1) \
\
\
declare_toplevel_type(ObjectMonitor) \
declare_toplevel_type(ObjectSynchronizer) \
declare_toplevel_type(BasicLock) \
declare_toplevel_type(BasicObjectLock) \
\
\
declare_c2_toplevel_type(Matcher) \
declare_c2_toplevel_type(Compile) \
declare_c2_toplevel_type(InlineTree) \
declare_c2_toplevel_type(OptoRegPair) \
declare_c2_toplevel_type(JVMState) \
declare_c2_toplevel_type(Phase) \
declare_c2_type(PhaseCFG, Phase) \
declare_c2_type(PhaseRegAlloc, Phase) \
declare_c2_type(PhaseChaitin, PhaseRegAlloc) \
declare_c2_toplevel_type(CFGElement) \
declare_c2_type(Block, CFGElement) \
declare_c2_toplevel_type(Block_Array) \
declare_c2_type(Block_List, Block_Array) \
declare_c2_toplevel_type(Node_Array) \
declare_c2_type(Node_List, Node_Array) \
declare_c2_type(Unique_Node_List, Node_List) \
declare_c2_toplevel_type(Node) \
declare_c2_type(AddNode, Node) \
declare_c2_type(AddINode, AddNode) \
declare_c2_type(AddLNode, AddNode) \
declare_c2_type(AddFNode, AddNode) \
declare_c2_type(AddDNode, AddNode) \
declare_c2_type(AddPNode, Node) \
declare_c2_type(OrINode, AddNode) \
declare_c2_type(OrLNode, AddNode) \
declare_c2_type(XorINode, AddNode) \
declare_c2_type(XorLNode, AddNode) \
declare_c2_type(MaxNode, AddNode) \
declare_c2_type(MaxINode, MaxNode) \
declare_c2_type(MinINode, MaxNode) \
declare_c2_type(StartNode, MultiNode) \
declare_c2_type(StartOSRNode, StartNode) \
declare_c2_type(ParmNode, ProjNode) \
declare_c2_type(ReturnNode, Node) \
declare_c2_type(RethrowNode, Node) \
declare_c2_type(TailCallNode, ReturnNode) \
declare_c2_type(TailJumpNode, ReturnNode) \
declare_c2_type(SafePointNode, MultiNode) \
declare_c2_type(CallNode, SafePointNode) \
declare_c2_type(CallJavaNode, CallNode) \
declare_c2_type(CallStaticJavaNode, CallJavaNode) \
declare_c2_type(CallDynamicJavaNode, CallJavaNode) \
declare_c2_type(CallRuntimeNode, CallNode) \
declare_c2_type(CallLeafNode, CallRuntimeNode) \
declare_c2_type(CallLeafNoFPNode, CallLeafNode) \
declare_c2_type(AllocateNode, CallNode) \
declare_c2_type(AllocateArrayNode, AllocateNode) \
declare_c2_type(LockNode, AbstractLockNode) \
declare_c2_type(UnlockNode, AbstractLockNode) \
declare_c2_type(FastLockNode, CmpNode) \
declare_c2_type(FastUnlockNode, CmpNode) \
declare_c2_type(RegionNode, Node) \
declare_c2_type(JProjNode, ProjNode) \
declare_c2_type(PhiNode, TypeNode) \
declare_c2_type(GotoNode, Node) \
declare_c2_type(CProjNode, ProjNode) \
declare_c2_type(MultiBranchNode, MultiNode) \
declare_c2_type(IfNode, MultiBranchNode) \
declare_c2_type(IfTrueNode, CProjNode) \
declare_c2_type(IfFalseNode, CProjNode) \
declare_c2_type(PCTableNode, MultiBranchNode) \
declare_c2_type(JumpNode, PCTableNode) \
declare_c2_type(JumpProjNode, JProjNode) \
declare_c2_type(CatchNode, PCTableNode) \
declare_c2_type(CatchProjNode, CProjNode) \
declare_c2_type(CreateExNode, TypeNode) \
declare_c2_type(ClearArrayNode, Node) \
declare_c2_type(NeverBranchNode, MultiBranchNode) \
declare_c2_type(ConNode, TypeNode) \
declare_c2_type(ConINode, ConNode) \
declare_c2_type(ConPNode, ConNode) \
declare_c2_type(ConNNode, ConNode) \
declare_c2_type(ConLNode, ConNode) \
declare_c2_type(ConFNode, ConNode) \
declare_c2_type(ConDNode, ConNode) \
declare_c2_type(BinaryNode, Node) \
declare_c2_type(CMoveNode, TypeNode) \
declare_c2_type(CMoveDNode, CMoveNode) \
declare_c2_type(CMoveFNode, CMoveNode) \
declare_c2_type(CMoveINode, CMoveNode) \
declare_c2_type(CMoveLNode, CMoveNode) \
declare_c2_type(CMovePNode, CMoveNode) \
declare_c2_type(CMoveNNode, CMoveNode) \
declare_c2_type(EncodePNode, TypeNode) \
declare_c2_type(DecodeNNode, TypeNode) \
declare_c2_type(EncodePKlassNode, TypeNode) \
declare_c2_type(DecodeNKlassNode, TypeNode) \
declare_c2_type(ConstraintCastNode, TypeNode) \
declare_c2_type(CastIINode, ConstraintCastNode) \
declare_c2_type(CastPPNode, ConstraintCastNode) \
declare_c2_type(CheckCastPPNode, TypeNode) \
declare_c2_type(Conv2BNode, Node) \
declare_c2_type(ConvD2FNode, Node) \
declare_c2_type(ConvD2INode, Node) \
declare_c2_type(ConvD2LNode, Node) \
declare_c2_type(ConvF2DNode, Node) \
declare_c2_type(ConvF2INode, Node) \
declare_c2_type(ConvF2LNode, Node) \
declare_c2_type(ConvI2DNode, Node) \
declare_c2_type(ConvI2FNode, Node) \
declare_c2_type(ConvI2LNode, TypeNode) \
declare_c2_type(ConvL2DNode, Node) \
declare_c2_type(ConvL2FNode, Node) \
declare_c2_type(ConvL2INode, Node) \
declare_c2_type(CastX2PNode, Node) \
declare_c2_type(CastP2XNode, Node) \
declare_c2_type(MemBarNode, MultiNode) \
declare_c2_type(MemBarAcquireNode, MemBarNode) \
declare_c2_type(MemBarReleaseNode, MemBarNode) \
declare_c2_type(LoadFenceNode, MemBarNode) \
declare_c2_type(StoreFenceNode, MemBarNode) \
declare_c2_type(MemBarVolatileNode, MemBarNode) \
declare_c2_type(MemBarCPUOrderNode, MemBarNode) \
declare_c2_type(InitializeNode, MemBarNode) \
declare_c2_type(ThreadLocalNode, Node) \
declare_c2_type(Opaque1Node, Node) \
declare_c2_type(Opaque2Node, Node) \
declare_c2_type(PartialSubtypeCheckNode, Node) \
declare_c2_type(MoveI2FNode, Node) \
declare_c2_type(MoveL2DNode, Node) \
declare_c2_type(MoveF2INode, Node) \
declare_c2_type(MoveD2LNode, Node) \
declare_c2_type(DivINode, Node) \
declare_c2_type(DivLNode, Node) \
declare_c2_type(DivFNode, Node) \
declare_c2_type(DivDNode, Node) \
declare_c2_type(ModINode, Node) \
declare_c2_type(ModLNode, Node) \
declare_c2_type(ModFNode, Node) \
declare_c2_type(ModDNode, Node) \
declare_c2_type(DivModNode, MultiNode) \
declare_c2_type(DivModINode, DivModNode) \
declare_c2_type(DivModLNode, DivModNode) \
declare_c2_type(BoxLockNode, Node) \
declare_c2_type(LoopNode, RegionNode) \
declare_c2_type(CountedLoopNode, LoopNode) \
declare_c2_type(CountedLoopEndNode, IfNode) \
declare_c2_type(MachNode, Node) \
declare_c2_type(MachIdealNode, MachNode) \
declare_c2_type(MachTypeNode, MachNode) \
declare_c2_type(MachBreakpointNode, MachIdealNode) \
declare_c2_type(MachUEPNode, MachIdealNode) \
declare_c2_type(MachPrologNode, MachIdealNode) \
declare_c2_type(MachEpilogNode, MachIdealNode) \
declare_c2_type(MachNopNode, MachIdealNode) \
declare_c2_type(MachSpillCopyNode, MachIdealNode) \
declare_c2_type(MachNullCheckNode, MachIdealNode) \
declare_c2_type(MachProjNode, ProjNode) \
declare_c2_type(MachIfNode, MachNode) \
declare_c2_type(MachFastLockNode, MachNode) \
declare_c2_type(MachReturnNode, MachNode) \
declare_c2_type(MachSafePointNode, MachReturnNode) \
declare_c2_type(MachCallNode, MachSafePointNode) \
declare_c2_type(MachCallJavaNode, MachCallNode) \
declare_c2_type(MachCallStaticJavaNode, MachCallJavaNode) \
declare_c2_type(MachCallDynamicJavaNode, MachCallJavaNode) \
declare_c2_type(MachCallRuntimeNode, MachCallNode) \
declare_c2_type(MachHaltNode, MachReturnNode) \
declare_c2_type(MachTempNode, MachNode) \
declare_c2_type(MemNode, Node) \
declare_c2_type(MergeMemNode, Node) \
declare_c2_type(LoadNode, MemNode) \
declare_c2_type(LoadBNode, LoadNode) \
declare_c2_type(LoadUSNode, LoadNode) \
declare_c2_type(LoadINode, LoadNode) \
declare_c2_type(LoadRangeNode, LoadINode) \
declare_c2_type(LoadLNode, LoadNode) \
declare_c2_type(LoadL_unalignedNode, LoadLNode) \
declare_c2_type(LoadFNode, LoadNode) \
declare_c2_type(LoadDNode, LoadNode) \
declare_c2_type(LoadD_unalignedNode, LoadDNode) \
declare_c2_type(LoadPNode, LoadNode) \
declare_c2_type(LoadNNode, LoadNode) \
declare_c2_type(LoadKlassNode, LoadPNode) \
declare_c2_type(LoadNKlassNode, LoadNNode) \
declare_c2_type(LoadSNode, LoadNode) \
declare_c2_type(StoreNode, MemNode) \
declare_c2_type(StoreBNode, StoreNode) \
declare_c2_type(StoreCNode, StoreNode) \
declare_c2_type(StoreINode, StoreNode) \
declare_c2_type(StoreLNode, StoreNode) \
declare_c2_type(StoreFNode, StoreNode) \
declare_c2_type(StoreDNode, StoreNode) \
declare_c2_type(StorePNode, StoreNode) \
declare_c2_type(StoreNNode, StoreNode) \
declare_c2_type(StoreNKlassNode, StoreNode) \
declare_c2_type(StoreCMNode, StoreNode) \
declare_c2_type(LoadPLockedNode, LoadPNode) \
declare_c2_type(SCMemProjNode, ProjNode) \
declare_c2_type(LoadStoreNode, Node) \
declare_c2_type(StorePConditionalNode, LoadStoreNode) \
declare_c2_type(StoreLConditionalNode, LoadStoreNode) \
declare_c2_type(CompareAndSwapLNode, LoadStoreNode) \
declare_c2_type(CompareAndSwapINode, LoadStoreNode) \
declare_c2_type(CompareAndSwapPNode, LoadStoreNode) \
declare_c2_type(CompareAndSwapNNode, LoadStoreNode) \
declare_c2_type(PrefetchReadNode, Node) \
declare_c2_type(PrefetchWriteNode, Node) \
declare_c2_type(MulNode, Node) \
declare_c2_type(MulINode, MulNode) \
declare_c2_type(MulLNode, MulNode) \
declare_c2_type(MulFNode, MulNode) \
declare_c2_type(MulDNode, MulNode) \
declare_c2_type(MulHiLNode, Node) \
declare_c2_type(AndINode, MulINode) \
declare_c2_type(AndLNode, MulLNode) \
declare_c2_type(LShiftINode, Node) \
declare_c2_type(LShiftLNode, Node) \
declare_c2_type(RShiftINode, Node) \
declare_c2_type(RShiftLNode, Node) \
declare_c2_type(URShiftINode, Node) \
declare_c2_type(URShiftLNode, Node) \
declare_c2_type(MultiNode, Node) \
declare_c2_type(ProjNode, Node) \
declare_c2_type(TypeNode, Node) \
declare_c2_type(NodeHash, StackObj) \
declare_c2_type(RootNode, LoopNode) \
declare_c2_type(HaltNode, Node) \
declare_c2_type(SubNode, Node) \
declare_c2_type(SubINode, SubNode) \
declare_c2_type(SubLNode, SubNode) \
declare_c2_type(SubFPNode, SubNode) \
declare_c2_type(SubFNode, SubFPNode) \
declare_c2_type(SubDNode, SubFPNode) \
declare_c2_type(CmpNode, SubNode) \
declare_c2_type(CmpINode, CmpNode) \
declare_c2_type(CmpUNode, CmpNode) \
declare_c2_type(CmpPNode, CmpNode) \
declare_c2_type(CmpNNode, CmpNode) \
declare_c2_type(CmpLNode, CmpNode) \
declare_c2_type(CmpULNode, CmpNode) \
declare_c2_type(CmpL3Node, CmpLNode) \
declare_c2_type(CmpFNode, CmpNode) \
declare_c2_type(CmpF3Node, CmpFNode) \
declare_c2_type(CmpDNode, CmpNode) \
declare_c2_type(CmpD3Node, CmpDNode) \
declare_c2_type(BoolNode, Node) \
declare_c2_type(AbsNode, Node) \
declare_c2_type(AbsINode, AbsNode) \
declare_c2_type(AbsFNode, AbsNode) \
declare_c2_type(AbsDNode, AbsNode) \
declare_c2_type(CmpLTMaskNode, Node) \
declare_c2_type(NegNode, Node) \
declare_c2_type(NegFNode, NegNode) \
declare_c2_type(NegDNode, NegNode) \
declare_c2_type(CosDNode, Node) \
declare_c2_type(SinDNode, Node) \
declare_c2_type(TanDNode, Node) \
declare_c2_type(AtanDNode, Node) \
declare_c2_type(SqrtDNode, Node) \
declare_c2_type(ExpDNode, Node) \
declare_c2_type(LogDNode, Node) \
declare_c2_type(Log10DNode, Node) \
declare_c2_type(PowDNode, Node) \
declare_c2_type(ReverseBytesINode, Node) \
declare_c2_type(ReverseBytesLNode, Node) \
declare_c2_type(VectorNode, Node) \
declare_c2_type(AddVBNode, VectorNode) \
declare_c2_type(AddVSNode, VectorNode) \
declare_c2_type(AddVINode, VectorNode) \
declare_c2_type(AddVLNode, VectorNode) \
declare_c2_type(AddVFNode, VectorNode) \
declare_c2_type(AddVDNode, VectorNode) \
declare_c2_type(SubVBNode, VectorNode) \
declare_c2_type(SubVSNode, VectorNode) \
declare_c2_type(SubVINode, VectorNode) \
declare_c2_type(SubVLNode, VectorNode) \
declare_c2_type(SubVFNode, VectorNode) \
declare_c2_type(SubVDNode, VectorNode) \
declare_c2_type(MulVSNode, VectorNode) \
declare_c2_type(MulVINode, VectorNode) \
declare_c2_type(MulVFNode, VectorNode) \
declare_c2_type(MulVDNode, VectorNode) \
declare_c2_type(DivVFNode, VectorNode) \
declare_c2_type(DivVDNode, VectorNode) \
declare_c2_type(LShiftVBNode, VectorNode) \
declare_c2_type(LShiftVSNode, VectorNode) \
declare_c2_type(LShiftVINode, VectorNode) \
declare_c2_type(LShiftVLNode, VectorNode) \
declare_c2_type(RShiftVBNode, VectorNode) \
declare_c2_type(RShiftVSNode, VectorNode) \
declare_c2_type(RShiftVINode, VectorNode) \
declare_c2_type(RShiftVLNode, VectorNode) \
declare_c2_type(URShiftVBNode, VectorNode) \
declare_c2_type(URShiftVSNode, VectorNode) \
declare_c2_type(URShiftVINode, VectorNode) \
declare_c2_type(URShiftVLNode, VectorNode) \
declare_c2_type(AndVNode, VectorNode) \
declare_c2_type(OrVNode, VectorNode) \
declare_c2_type(XorVNode, VectorNode) \
declare_c2_type(LoadVectorNode, LoadNode) \
declare_c2_type(StoreVectorNode, StoreNode) \
declare_c2_type(ReplicateBNode, VectorNode) \
declare_c2_type(ReplicateSNode, VectorNode) \
declare_c2_type(ReplicateINode, VectorNode) \
declare_c2_type(ReplicateLNode, VectorNode) \
declare_c2_type(ReplicateFNode, VectorNode) \
declare_c2_type(ReplicateDNode, VectorNode) \
declare_c2_type(PackNode, VectorNode) \
declare_c2_type(PackBNode, PackNode) \
declare_c2_type(PackSNode, PackNode) \
declare_c2_type(PackINode, PackNode) \
declare_c2_type(PackLNode, PackNode) \
declare_c2_type(PackFNode, PackNode) \
declare_c2_type(PackDNode, PackNode) \
declare_c2_type(Pack2LNode, PackNode) \
declare_c2_type(Pack2DNode, PackNode) \
declare_c2_type(ExtractNode, Node) \
declare_c2_type(ExtractBNode, ExtractNode) \
declare_c2_type(ExtractUBNode, ExtractNode) \
declare_c2_type(ExtractCNode, ExtractNode) \
declare_c2_type(ExtractSNode, ExtractNode) \
declare_c2_type(ExtractINode, ExtractNode) \
declare_c2_type(ExtractLNode, ExtractNode) \
declare_c2_type(ExtractFNode, ExtractNode) \
declare_c2_type(ExtractDNode, ExtractNode) \
declare_c2_type(OverflowNode, CmpNode) \
declare_c2_type(OverflowINode, OverflowNode) \
declare_c2_type(OverflowAddINode, OverflowINode) \
declare_c2_type(OverflowSubINode, OverflowINode) \
declare_c2_type(OverflowMulINode, OverflowINode) \
declare_c2_type(OverflowLNode, OverflowNode) \
declare_c2_type(OverflowAddLNode, OverflowLNode) \
declare_c2_type(OverflowSubLNode, OverflowLNode) \
declare_c2_type(OverflowMulLNode, OverflowLNode) \
\
declare_toplevel_type(AdapterHandlerEntry) \
declare_toplevel_type(AdapterHandlerEntry*) \
\
declare_toplevel_type(ciEnv) \
declare_toplevel_type(ciObjectFactory) \
declare_toplevel_type(ciConstant) \
declare_toplevel_type(ciField) \
declare_toplevel_type(ciSymbol) \
declare_toplevel_type(ciBaseObject) \
declare_type(ciObject, ciBaseObject) \
declare_type(ciInstance, ciObject) \
declare_type(ciMetadata, ciBaseObject) \
declare_type(ciMethod, ciMetadata) \
declare_type(ciMethodData, ciMetadata) \
declare_type(ciType, ciMetadata) \
declare_type(ciKlass, ciType) \
declare_type(ciInstanceKlass, ciKlass) \
declare_type(ciArrayKlass, ciKlass) \
declare_type(ciTypeArrayKlass, ciArrayKlass) \
declare_type(ciObjArrayKlass, ciArrayKlass) \
\
\
declare_toplevel_type(Flag) \
declare_toplevel_type(Flag*) \
\
\
declare_toplevel_type(JvmtiExport) \
\
\
declare_toplevel_type(Abstract_VM_Version) \
declare_toplevel_type(JDK_Version) \
\
\
declare_toplevel_type(Arguments) \
\
\
\
declare_integer_type(Bytecodes::Code) \
declare_integer_type(Generation::Name) \
declare_integer_type(InstanceKlass::ClassState) \
declare_integer_type(JavaThreadState) \
declare_integer_type(Location::Type) \
declare_integer_type(Location::Where) \
declare_integer_type(Flag::Flags) \
COMPILER2_PRESENT(declare_integer_type(OptoReg::Name)) \
\
declare_toplevel_type(CHeapObj<mtInternal>) \
declare_type(Array<int>, MetaspaceObj) \
declare_type(Array<u1>, MetaspaceObj) \
declare_type(Array<u2>, MetaspaceObj) \
declare_type(Array<Klass*>, MetaspaceObj) \
declare_type(Array<Method*>, MetaspaceObj) \
\
declare_integer_type(AccessFlags) /* FIXME: wrong type (not integer) */\
declare_toplevel_type(address) /* FIXME: should this be an integer type? */\
declare_integer_type(BasicType) /* FIXME: wrong type (not integer) */\
declare_toplevel_type(BreakpointInfo) \
declare_toplevel_type(BreakpointInfo*) \
declare_toplevel_type(CodeBlob*) \
declare_toplevel_type(CompressedWriteStream*) \
declare_toplevel_type(ConstantPoolCacheEntry) \
declare_toplevel_type(elapsedTimer) \
declare_toplevel_type(frame) \
declare_toplevel_type(intptr_t*) \
declare_unsigned_integer_type(InvocationCounter) /* FIXME: wrong type (not integer) */ \
declare_toplevel_type(JavaThread*) \
declare_toplevel_type(java_lang_Class) \
declare_integer_type(JavaThread::AsyncRequests) \
declare_toplevel_type(jbyte*) \
declare_toplevel_type(jbyte**) \
declare_toplevel_type(jint*) \
declare_toplevel_type(jniIdMapBase*) \
declare_unsigned_integer_type(juint) \
declare_unsigned_integer_type(julong) \
declare_toplevel_type(JNIHandleBlock*) \
declare_toplevel_type(JNIid) \
declare_toplevel_type(JNIid*) \
declare_toplevel_type(jmethodID*) \
declare_toplevel_type(Mutex*) \
declare_toplevel_type(nmethod*) \
COMPILER2_PRESENT(declare_unsigned_integer_type(node_idx_t)) \
declare_toplevel_type(ObjectMonitor*) \
declare_toplevel_type(oop*) \
declare_toplevel_type(OopMap**) \
declare_toplevel_type(OopMapCache*) \
declare_toplevel_type(OopMapSet*) \
declare_toplevel_type(VMReg) \
declare_toplevel_type(OSThread*) \
declare_integer_type(ReferenceType) \
declare_toplevel_type(StubQueue*) \
declare_toplevel_type(Thread*) \
declare_toplevel_type(Universe) \
declare_toplevel_type(os) \
declare_toplevel_type(vframeArray) \
declare_toplevel_type(vframeArrayElement) \
declare_toplevel_type(Annotations*) \
\
\
declare_toplevel_type(PtrQueue) \
\
declare_toplevel_type(FreeChunk*) \
declare_toplevel_type(AdaptiveFreeList<FreeChunk>*) \
declare_toplevel_type(AdaptiveFreeList<FreeChunk>)
#define VM_INT_CONSTANTS(declare_constant, \
declare_preprocessor_constant, \
declare_c1_constant, \
declare_c2_constant, \
declare_c2_preprocessor_constant) \
\
\
declare_preprocessor_constant("ASSERT", DEBUG_ONLY(1) NOT_DEBUG(0)) \
\
\
declare_preprocessor_constant("STACK_BIAS", STACK_BIAS) \
\
\
declare_constant(oopSize) \
declare_constant(LogBytesPerWord) \
declare_constant(BytesPerWord) \
declare_constant(BytesPerLong) \
\
declare_constant(LogKlassAlignmentInBytes) \
\
\
declare_constant(ageTable::table_size) \
\
declare_constant(BarrierSet::ModRef) \
declare_constant(BarrierSet::CardTableModRef) \
declare_constant(BarrierSet::CardTableExtension) \
declare_constant(BarrierSet::G1SATBCT) \
declare_constant(BarrierSet::G1SATBCTLogging) \
declare_constant(BarrierSet::Other) \
\
declare_constant(BlockOffsetSharedArray::LogN) \
declare_constant(BlockOffsetSharedArray::LogN_words) \
declare_constant(BlockOffsetSharedArray::N_bytes) \
declare_constant(BlockOffsetSharedArray::N_words) \
\
declare_constant(BlockOffsetArray::N_words) \
\
declare_constant(CardTableModRefBS::clean_card) \
declare_constant(CardTableModRefBS::last_card) \
declare_constant(CardTableModRefBS::dirty_card) \
declare_constant(CardTableModRefBS::Precise) \
declare_constant(CardTableModRefBS::ObjHeadPreciseArray) \
declare_constant(CardTableModRefBS::card_shift) \
declare_constant(CardTableModRefBS::card_size) \
declare_constant(CardTableModRefBS::card_size_in_words) \
\
declare_constant(CardTableRS::youngergen_card) \
\
declare_constant(CollectedHeap::Abstract) \
declare_constant(CollectedHeap::SharedHeap) \
declare_constant(CollectedHeap::GenCollectedHeap) \
\
declare_constant(GenCollectedHeap::max_gens) \
\
\
declare_constant(Generation::DefNew) \
declare_constant(Generation::MarkSweepCompact) \
declare_constant(Generation::Other) \
\
declare_constant(Generation::LogOfGenGrain) \
declare_constant(Generation::GenGrain) \
\
declare_constant(HeapWordSize) \
declare_constant(LogHeapWordSize) \
\
\
\
declare_preprocessor_constant("PERFDATA_MAJOR_VERSION", PERFDATA_MAJOR_VERSION) \
declare_preprocessor_constant("PERFDATA_MINOR_VERSION", PERFDATA_MINOR_VERSION) \
declare_preprocessor_constant("PERFDATA_BIG_ENDIAN", PERFDATA_BIG_ENDIAN) \
declare_preprocessor_constant("PERFDATA_LITTLE_ENDIAN", PERFDATA_LITTLE_ENDIAN) \
\
\
declare_constant(LoaderConstraintTable::_loader_constraint_size) \
declare_constant(LoaderConstraintTable::_nof_buckets) \
\
\
declare_constant(JVM_ACC_WRITTEN_FLAGS) \
declare_constant(JVM_ACC_MONITOR_MATCH) \
declare_constant(JVM_ACC_HAS_MONITOR_BYTECODES) \
declare_constant(JVM_ACC_HAS_LOOPS) \
declare_constant(JVM_ACC_LOOPS_FLAG_INIT) \
declare_constant(JVM_ACC_QUEUED) \
declare_constant(JVM_ACC_NOT_C2_OSR_COMPILABLE) \
declare_constant(JVM_ACC_HAS_LINE_NUMBER_TABLE) \
declare_constant(JVM_ACC_HAS_CHECKED_EXCEPTIONS) \
declare_constant(JVM_ACC_HAS_JSRS) \
declare_constant(JVM_ACC_IS_OLD) \
declare_constant(JVM_ACC_IS_OBSOLETE) \
declare_constant(JVM_ACC_IS_PREFIXED_NATIVE) \
declare_constant(JVM_ACC_HAS_MIRANDA_METHODS) \
declare_constant(JVM_ACC_HAS_VANILLA_CONSTRUCTOR) \
declare_constant(JVM_ACC_HAS_FINALIZER) \
declare_constant(JVM_ACC_IS_CLONEABLE) \
declare_constant(JVM_ACC_HAS_LOCAL_VARIABLE_TABLE) \
declare_constant(JVM_ACC_PROMOTED_FLAGS) \
declare_constant(JVM_ACC_FIELD_ACCESS_WATCHED) \
declare_constant(JVM_ACC_FIELD_MODIFICATION_WATCHED) \
\
\
declare_constant(Thread::_external_suspend) \
declare_constant(Thread::_ext_suspended) \
declare_constant(Thread::_has_async_exception) \
\
\
declare_constant(_thread_uninitialized) \
declare_constant(_thread_new) \
declare_constant(_thread_new_trans) \
declare_constant(_thread_in_native) \
declare_constant(_thread_in_native_trans) \
declare_constant(_thread_in_vm) \
declare_constant(_thread_in_vm_trans) \
declare_constant(_thread_in_Java) \
declare_constant(_thread_in_Java_trans) \
declare_constant(_thread_blocked) \
declare_constant(_thread_blocked_trans) \
\
\
declare_constant(Klass::_primary_super_limit) \
declare_constant(Klass::_lh_instance_slow_path_bit) \
declare_constant(Klass::_lh_log2_element_size_shift) \
declare_constant(Klass::_lh_log2_element_size_mask) \
declare_constant(Klass::_lh_element_type_shift) \
declare_constant(Klass::_lh_element_type_mask) \
declare_constant(Klass::_lh_header_size_shift) \
declare_constant(Klass::_lh_header_size_mask) \
declare_constant(Klass::_lh_array_tag_shift) \
declare_constant(Klass::_lh_array_tag_type_value) \
declare_constant(Klass::_lh_array_tag_obj_value) \
\
\
declare_constant(ConstMethod::_has_linenumber_table) \
declare_constant(ConstMethod::_has_checked_exceptions) \
declare_constant(ConstMethod::_has_localvariable_table) \
declare_constant(ConstMethod::_has_exception_table) \
declare_constant(ConstMethod::_has_generic_signature) \
declare_constant(ConstMethod::_has_method_parameters) \
declare_constant(ConstMethod::_has_method_annotations) \
declare_constant(ConstMethod::_has_parameter_annotations) \
declare_constant(ConstMethod::_has_default_annotations) \
declare_constant(ConstMethod::_has_type_annotations) \
\
\
declare_constant(DataLayout::cell_size) \
\
\
\
\
declare_constant(FieldInfo::access_flags_offset) \
declare_constant(FieldInfo::name_index_offset) \
declare_constant(FieldInfo::signature_index_offset) \
declare_constant(FieldInfo::initval_index_offset) \
declare_constant(FieldInfo::low_packed_offset) \
declare_constant(FieldInfo::high_packed_offset) \
declare_constant(FieldInfo::field_slots) \
\
\
declare_preprocessor_constant("FIELDINFO_TAG_SIZE", FIELDINFO_TAG_SIZE) \
declare_preprocessor_constant("FIELDINFO_TAG_MASK", FIELDINFO_TAG_MASK) \
declare_preprocessor_constant("FIELDINFO_TAG_OFFSET", FIELDINFO_TAG_OFFSET) \
\
\
declare_constant(InstanceKlass::inner_class_inner_class_info_offset) \
declare_constant(InstanceKlass::inner_class_outer_class_info_offset) \
declare_constant(InstanceKlass::inner_class_inner_name_offset) \
declare_constant(InstanceKlass::inner_class_access_flags_offset) \
declare_constant(InstanceKlass::inner_class_next_offset) \
\
\
declare_constant(InstanceKlass::allocated) \
declare_constant(InstanceKlass::loaded) \
declare_constant(InstanceKlass::linked) \
declare_constant(InstanceKlass::being_initialized) \
declare_constant(InstanceKlass::fully_initialized) \
declare_constant(InstanceKlass::initialization_error) \
\
\
declare_constant(Symbol::max_symbol_length) \
\
\
declare_constant(ConstantPool::_indy_bsm_offset) \
declare_constant(ConstantPool::_indy_argc_offset) \
declare_constant(ConstantPool::_indy_argv_offset) \
\
\
declare_constant(ConstantPoolCacheEntry::is_volatile_shift) \
declare_constant(ConstantPoolCacheEntry::is_final_shift) \
declare_constant(ConstantPoolCacheEntry::is_forced_virtual_shift) \
declare_constant(ConstantPoolCacheEntry::is_vfinal_shift) \
declare_constant(ConstantPoolCacheEntry::is_field_entry_shift) \
declare_constant(ConstantPoolCacheEntry::tos_state_shift) \
\
\
declare_constant(java_lang_Thread::NEW) \
declare_constant(java_lang_Thread::RUNNABLE) \
declare_constant(java_lang_Thread::SLEEPING) \
declare_constant(java_lang_Thread::IN_OBJECT_WAIT) \
declare_constant(java_lang_Thread::IN_OBJECT_WAIT_TIMED) \
declare_constant(java_lang_Thread::PARKED) \
declare_constant(java_lang_Thread::PARKED_TIMED) \
declare_constant(java_lang_Thread::BLOCKED_ON_MONITOR_ENTER) \
declare_constant(java_lang_Thread::TERMINATED) \
\
\
declare_constant(Location::OFFSET_MASK) \
declare_constant(Location::OFFSET_SHIFT) \
declare_constant(Location::TYPE_MASK) \
declare_constant(Location::TYPE_SHIFT) \
declare_constant(Location::WHERE_MASK) \
declare_constant(Location::WHERE_SHIFT) \
\
\
declare_constant(Location::normal) \
declare_constant(Location::oop) \
declare_constant(Location::narrowoop) \
declare_constant(Location::int_in_long) \
declare_constant(Location::lng) \
declare_constant(Location::float_in_dbl) \
declare_constant(Location::dbl) \
declare_constant(Location::addr) \
declare_constant(Location::invalid) \
\
\
declare_constant(Location::on_stack) \
declare_constant(Location::in_register) \
\
declare_constant(Deoptimization::Reason_many) \
declare_constant(Deoptimization::Reason_none) \
declare_constant(Deoptimization::Reason_null_check) \
declare_constant(Deoptimization::Reason_null_assert) \
declare_constant(Deoptimization::Reason_range_check) \
declare_constant(Deoptimization::Reason_class_check) \
declare_constant(Deoptimization::Reason_array_check) \
declare_constant(Deoptimization::Reason_intrinsic) \
declare_constant(Deoptimization::Reason_bimorphic) \
declare_constant(Deoptimization::Reason_unloaded) \
declare_constant(Deoptimization::Reason_uninitialized) \
declare_constant(Deoptimization::Reason_unreached) \
declare_constant(Deoptimization::Reason_unhandled) \
declare_constant(Deoptimization::Reason_constraint) \
declare_constant(Deoptimization::Reason_div0_check) \
declare_constant(Deoptimization::Reason_age) \
declare_constant(Deoptimization::Reason_predicate) \
declare_constant(Deoptimization::Reason_loop_limit_check) \
declare_constant(Deoptimization::Reason_unstable_if) \
declare_constant(Deoptimization::Reason_LIMIT) \
declare_constant(Deoptimization::Reason_RECORDED_LIMIT) \
\
declare_constant(Deoptimization::Action_none) \
declare_constant(Deoptimization::Action_maybe_recompile) \
declare_constant(Deoptimization::Action_reinterpret) \
declare_constant(Deoptimization::Action_make_not_entrant) \
declare_constant(Deoptimization::Action_make_not_compilable) \
declare_constant(Deoptimization::Action_LIMIT) \
\
\
declare_c2_preprocessor_constant("Matcher::interpreter_frame_pointer_reg", Matcher::interpreter_frame_pointer_reg()) \
\
\
declare_constant(InvocationEntryBci) \
declare_constant(InvalidOSREntryBci) \
\
\
declare_constant(OopMapValue::type_bits) \
declare_constant(OopMapValue::register_bits) \
declare_constant(OopMapValue::type_shift) \
declare_constant(OopMapValue::register_shift) \
declare_constant(OopMapValue::type_mask) \
declare_constant(OopMapValue::type_mask_in_place) \
declare_constant(OopMapValue::register_mask) \
declare_constant(OopMapValue::register_mask_in_place) \
declare_constant(OopMapValue::unused_value) \
declare_constant(OopMapValue::oop_value) \
declare_constant(OopMapValue::value_value) \
declare_constant(OopMapValue::narrowoop_value) \
declare_constant(OopMapValue::callee_saved_value) \
declare_constant(OopMapValue::derived_oop_value) \
\
\
declare_constant(JNIHandleBlock::block_size_in_oops) \
\
\
declare_constant(ObjectSynchronizer::_BLOCKSIZE) \
\
\
declare_constant(PcDesc::PCDESC_reexecute) \
declare_constant(PcDesc::PCDESC_is_method_handle_invoke) \
declare_constant(PcDesc::PCDESC_return_oop) \
\
\
NOT_ZERO(X86_ONLY(declare_constant(frame::entry_frame_call_wrapper_offset))) \
declare_constant(frame::pc_return_offset) \
\
\
declare_constant(vmSymbols::FIRST_SID) \
declare_constant(vmSymbols::SID_LIMIT) \
\
\
declare_constant(vmIntrinsics::_invokeBasic) \
declare_constant(vmIntrinsics::_linkToVirtual) \
declare_constant(vmIntrinsics::_linkToStatic) \
declare_constant(vmIntrinsics::_linkToSpecial) \
declare_constant(vmIntrinsics::_linkToInterface) \
\
\
declare_constant(RegisterImpl::number_of_registers) \
declare_constant(ConcreteRegisterImpl::number_of_registers) \
declare_preprocessor_constant("REG_COUNT", REG_COUNT) \
declare_c2_preprocessor_constant("SAVED_ON_ENTRY_REG_COUNT", SAVED_ON_ENTRY_REG_COUNT) \
declare_c2_preprocessor_constant("C_SAVED_ON_ENTRY_REG_COUNT", C_SAVED_ON_ENTRY_REG_COUNT)
#define VM_LONG_CONSTANTS(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \
\
\
\
declare_constant(markOopDesc::age_bits) \
declare_constant(markOopDesc::lock_bits) \
declare_constant(markOopDesc::biased_lock_bits) \
declare_constant(markOopDesc::max_hash_bits) \
declare_constant(markOopDesc::hash_bits) \
\
declare_constant(markOopDesc::lock_shift) \
declare_constant(markOopDesc::biased_lock_shift) \
declare_constant(markOopDesc::age_shift) \
declare_constant(markOopDesc::hash_shift) \
\
declare_constant(markOopDesc::lock_mask) \
declare_constant(markOopDesc::lock_mask_in_place) \
declare_constant(markOopDesc::biased_lock_mask) \
declare_constant(markOopDesc::biased_lock_mask_in_place) \
declare_constant(markOopDesc::biased_lock_bit_in_place) \
declare_constant(markOopDesc::age_mask) \
declare_constant(markOopDesc::age_mask_in_place) \
declare_constant(markOopDesc::epoch_mask) \
declare_constant(markOopDesc::epoch_mask_in_place) \
declare_constant(markOopDesc::hash_mask) \
declare_constant(markOopDesc::hash_mask_in_place) \
declare_constant(markOopDesc::biased_lock_alignment) \
\
declare_constant(markOopDesc::locked_value) \
declare_constant(markOopDesc::unlocked_value) \
declare_constant(markOopDesc::monitor_value) \
declare_constant(markOopDesc::marked_value) \
declare_constant(markOopDesc::biased_lock_pattern) \
\
declare_constant(markOopDesc::no_hash) \
declare_constant(markOopDesc::no_hash_in_place) \
declare_constant(markOopDesc::no_lock_in_place) \
declare_constant(markOopDesc::max_age) \
\
declare_constant(markOopDesc::cms_shift) \
declare_constant(markOopDesc::cms_mask) \
declare_constant(markOopDesc::size_shift)
#define QUOTE(x) #x
#define GENERATE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
{ QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 0, cast_uint64_t(offset_of(typeName, fieldName)), NULL },
#define GENERATE_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
{ QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 1, 0, &typeName::fieldName },
#define GENERATE_STATIC_PTR_VOLATILE_VM_STRUCT_ENTRY(typeName, fieldName, type) \
{ QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 1, 0, (void*)&typeName::fieldName },
#define GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, size) \
{ QUOTE(typeName), QUOTE(fieldName), NULL, 0, cast_uint64_t(offset_of(typeName, fieldName)), NULL },
#define GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, size) \
{ QUOTE(typeName), QUOTE(fieldName), NULL, 1, 0, (void*) &typeName::fieldName },
#define GENERATE_VM_STRUCT_LAST_ENTRY() \
{ NULL, NULL, NULL, 0, 0, NULL }
#define CHECK_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
{typeName *dummyObj = NULL; type* dummy = &dummyObj->fieldName; \
assert(offset_of(typeName, fieldName) < sizeof(typeName), "Illegal nonstatic struct entry, field offset too large"); }
#define CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
{typedef type dummyvtype; typeName *dummyObj = NULL; volatile dummyvtype* dummy = &dummyObj->fieldName; }
#define CHECK_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
{type* dummy = &typeName::fieldName; }
#define CHECK_STATIC_PTR_VOLATILE_VM_STRUCT_ENTRY(typeName, fieldName, type) \
{type volatile * dummy = &typeName::fieldName; }
#define ENSURE_FIELD_TYPE_PRESENT(typeName, fieldName, type) \
{ assert(findType(QUOTE(typeName)) != 0, "type \"" QUOTE(typeName) "\" not found in type table"); \
assert(findType(QUOTE(type)) != 0, "type \"" QUOTE(type) "\" not found in type table"); }
#define CHECK_NO_OP(a, b, c)
#ifndef PRODUCT
# define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c) ENSURE_FIELD_TYPE_PRESENT(a, b, c)
# define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c) ENSURE_FIELD_TYPE_PRESENT(a, b, c)
#else
# define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c)
# define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c)
#endif /* PRODUCT */
#ifdef COMPILER1
# define GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_C1_FIELD_TYPE_PRESENT(a, b, c) ENSURE_FIELD_TYPE_PRESENT(a, b, c)
#else
# define GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_C1_FIELD_TYPE_PRESENT(a, b, c)
#endif /* COMPILER1 */
#ifdef COMPILER2
# define GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_C2_FIELD_TYPE_PRESENT(a, b, c) ENSURE_FIELD_TYPE_PRESENT(a, b, c)
#else
# define GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_C2_FIELD_TYPE_PRESENT(a, b, c)
#endif /* COMPILER2 */
#ifdef COMPILER1
# define GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c)
#else
# define GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c)
#endif /* COMPILER1 */
#ifdef COMPILER2
# define GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c)
#else
# define GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c)
#endif /* COMPILER2 */
#define GENERATE_VM_TYPE_ENTRY(type, superclass) \
{ QUOTE(type), QUOTE(superclass), 0, 0, 0, sizeof(type) },
#define GENERATE_TOPLEVEL_VM_TYPE_ENTRY(type) \
{ QUOTE(type), NULL, 0, 0, 0, sizeof(type) },
#define GENERATE_OOP_VM_TYPE_ENTRY(type) \
{ QUOTE(type), NULL, 1, 0, 0, sizeof(type) },
#define GENERATE_INTEGER_VM_TYPE_ENTRY(type) \
{ QUOTE(type), NULL, 0, 1, 0, sizeof(type) },
#define GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY(type) \
{ QUOTE(type), NULL, 0, 1, 1, sizeof(type) },
#define GENERATE_VM_TYPE_LAST_ENTRY() \
{ NULL, NULL, 0, 0, 0, 0 }
#define CHECK_VM_TYPE_ENTRY(type, superclass) \
{ type* dummyObj = NULL; superclass* dummySuperObj = dummyObj; }
#define CHECK_VM_TYPE_NO_OP(a)
#define CHECK_SINGLE_ARG_VM_TYPE_NO_OP(a)
#ifdef COMPILER1
# define GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY(a) GENERATE_TOPLEVEL_VM_TYPE_ENTRY(a)
# define CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY(a)
#else
# define GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY(a)
# define CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY(a)
#endif /* COMPILER1 */
#ifdef COMPILER2
# define GENERATE_C2_VM_TYPE_ENTRY(a, b) GENERATE_VM_TYPE_ENTRY(a, b)
# define CHECK_C2_VM_TYPE_ENTRY(a, b) CHECK_VM_TYPE_ENTRY(a, b)
# define GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY(a) GENERATE_TOPLEVEL_VM_TYPE_ENTRY(a)
# define CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY(a)
#else
# define GENERATE_C2_VM_TYPE_ENTRY(a, b)
# define CHECK_C2_VM_TYPE_ENTRY(a, b)
# define GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY(a)
# define CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY(a)
#endif /* COMPILER2 */
#define GENERATE_VM_INT_CONSTANT_ENTRY(name) \
{ QUOTE(name), (int32_t) name },
#define GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) \
{ name, (int32_t) value },
#define GENERATE_VM_INT_CONSTANT_LAST_ENTRY() \
{ NULL, 0 }
#ifdef COMPILER1
# define GENERATE_C1_VM_INT_CONSTANT_ENTRY(name) GENERATE_VM_INT_CONSTANT_ENTRY(name)
#else
# define GENERATE_C1_VM_INT_CONSTANT_ENTRY(name)
#endif /* COMPILER1 */
#ifdef COMPILER2
# define GENERATE_C2_VM_INT_CONSTANT_ENTRY(name) GENERATE_VM_INT_CONSTANT_ENTRY(name)
# define GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value)
#else
# define GENERATE_C2_VM_INT_CONSTANT_ENTRY(name)
# define GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value)
#endif /* COMPILER1 */
#define GENERATE_VM_LONG_CONSTANT_ENTRY(name) \
{ QUOTE(name), cast_uint64_t(name) },
#define GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) \
{ name, cast_uint64_t(value) },
#define GENERATE_VM_LONG_CONSTANT_LAST_ENTRY() \
{ NULL, 0 }
#ifdef COMPILER1
# define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name) GENERATE_VM_LONG_CONSTANT_ENTRY(name)
#else
# define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name)
#endif /* COMPILER1 */
#ifdef COMPILER2
# define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name) GENERATE_VM_LONG_CONSTANT_ENTRY(name)
# define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value)
#else
# define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name)
# define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value)
#endif /* COMPILER1 */
VMStructEntry VMStructs::localHotSpotVMStructs[] = {
VM_STRUCTS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_STATIC_VM_STRUCT_ENTRY,
GENERATE_STATIC_PTR_VOLATILE_VM_STRUCT_ENTRY,
GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)
#if INCLUDE_ALL_GCS
VM_STRUCTS_PARALLELGC(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_STATIC_VM_STRUCT_ENTRY)
VM_STRUCTS_CMS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_STATIC_VM_STRUCT_ENTRY)
VM_STRUCTS_G1(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_STATIC_VM_STRUCT_ENTRY)
#endif // INCLUDE_ALL_GCS
VM_STRUCTS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_STATIC_VM_STRUCT_ENTRY,
GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)
VM_STRUCTS_OS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_STATIC_VM_STRUCT_ENTRY,
GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,
GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)
GENERATE_VM_STRUCT_LAST_ENTRY()
};
VMTypeEntry VMStructs::localHotSpotVMTypes[] = {
VM_TYPES(GENERATE_VM_TYPE_ENTRY,
GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
GENERATE_OOP_VM_TYPE_ENTRY,
GENERATE_INTEGER_VM_TYPE_ENTRY,
GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
GENERATE_C2_VM_TYPE_ENTRY,
GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)
#if INCLUDE_ALL_GCS
VM_TYPES_PARALLELGC(GENERATE_VM_TYPE_ENTRY,
GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
VM_TYPES_CMS(GENERATE_VM_TYPE_ENTRY,
GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
VM_TYPES_PARNEW(GENERATE_VM_TYPE_ENTRY)
VM_TYPES_G1(GENERATE_VM_TYPE_ENTRY,
GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
#endif // INCLUDE_ALL_GCS
VM_TYPES_CPU(GENERATE_VM_TYPE_ENTRY,
GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
GENERATE_OOP_VM_TYPE_ENTRY,
GENERATE_INTEGER_VM_TYPE_ENTRY,
GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
GENERATE_C2_VM_TYPE_ENTRY,
GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)
VM_TYPES_OS_CPU(GENERATE_VM_TYPE_ENTRY,
GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
GENERATE_OOP_VM_TYPE_ENTRY,
GENERATE_INTEGER_VM_TYPE_ENTRY,
GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
GENERATE_C2_VM_TYPE_ENTRY,
GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)
GENERATE_VM_TYPE_LAST_ENTRY()
};
VMIntConstantEntry VMStructs::localHotSpotVMIntConstants[] = {
VM_INT_CONSTANTS(GENERATE_VM_INT_CONSTANT_ENTRY,
GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
GENERATE_C1_VM_INT_CONSTANT_ENTRY,
GENERATE_C2_VM_INT_CONSTANT_ENTRY,
GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
#if INCLUDE_ALL_GCS
VM_INT_CONSTANTS_CMS(GENERATE_VM_INT_CONSTANT_ENTRY)
VM_INT_CONSTANTS_PARNEW(GENERATE_VM_INT_CONSTANT_ENTRY)
#endif // INCLUDE_ALL_GCS
VM_INT_CONSTANTS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY,
GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
GENERATE_C1_VM_INT_CONSTANT_ENTRY,
GENERATE_C2_VM_INT_CONSTANT_ENTRY,
GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
VM_INT_CONSTANTS_OS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY,
GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
GENERATE_C1_VM_INT_CONSTANT_ENTRY,
GENERATE_C2_VM_INT_CONSTANT_ENTRY,
GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
GENERATE_VM_INT_CONSTANT_LAST_ENTRY()
};
VMLongConstantEntry VMStructs::localHotSpotVMLongConstants[] = {
VM_LONG_CONSTANTS(GENERATE_VM_LONG_CONSTANT_ENTRY,
GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
VM_LONG_CONSTANTS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY,
GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
VM_LONG_CONSTANTS_OS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY,
GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
GENERATE_VM_LONG_CONSTANT_LAST_ENTRY()
};
void
VMStructs::init() {
VM_STRUCTS(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_STATIC_VM_STRUCT_ENTRY,
CHECK_STATIC_PTR_VOLATILE_VM_STRUCT_ENTRY,
CHECK_NO_OP,
CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_NO_OP,
CHECK_NO_OP);
#if INCLUDE_ALL_GCS
VM_STRUCTS_PARALLELGC(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_STATIC_VM_STRUCT_ENTRY);
VM_STRUCTS_CMS(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_STATIC_VM_STRUCT_ENTRY);
VM_STRUCTS_G1(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_STATIC_VM_STRUCT_ENTRY);
#endif // INCLUDE_ALL_GCS
VM_STRUCTS_CPU(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_STATIC_VM_STRUCT_ENTRY,
CHECK_NO_OP,
CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_NO_OP,
CHECK_NO_OP);
VM_STRUCTS_OS_CPU(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_STATIC_VM_STRUCT_ENTRY,
CHECK_NO_OP,
CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY,
CHECK_NO_OP,
CHECK_NO_OP);
VM_TYPES(CHECK_VM_TYPE_ENTRY,
CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY,
CHECK_C2_VM_TYPE_ENTRY,
CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY);
#if INCLUDE_ALL_GCS
VM_TYPES_PARALLELGC(CHECK_VM_TYPE_ENTRY,
CHECK_SINGLE_ARG_VM_TYPE_NO_OP);
VM_TYPES_CMS(CHECK_VM_TYPE_ENTRY,
CHECK_SINGLE_ARG_VM_TYPE_NO_OP);
VM_TYPES_PARNEW(CHECK_VM_TYPE_ENTRY)
VM_TYPES_G1(CHECK_VM_TYPE_ENTRY,
CHECK_SINGLE_ARG_VM_TYPE_NO_OP);
#endif // INCLUDE_ALL_GCS
VM_TYPES_CPU(CHECK_VM_TYPE_ENTRY,
CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY,
CHECK_C2_VM_TYPE_ENTRY,
CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY);
VM_TYPES_OS_CPU(CHECK_VM_TYPE_ENTRY,
CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY,
CHECK_C2_VM_TYPE_ENTRY,
CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY);
#ifndef _WINDOWS
debug_only(VM_STRUCTS(ENSURE_FIELD_TYPE_PRESENT,
CHECK_NO_OP,
CHECK_NO_OP,
CHECK_NO_OP,
CHECK_NO_OP,
CHECK_NO_OP,
CHECK_NO_OP,
CHECK_NO_OP,
CHECK_NO_OP,
CHECK_NO_OP));
debug_only(VM_STRUCTS(CHECK_NO_OP,
ENSURE_FIELD_TYPE_PRESENT,
ENSURE_FIELD_TYPE_PRESENT,
CHECK_NO_OP,
ENSURE_FIELD_TYPE_PRESENT,
ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT,
ENSURE_C1_FIELD_TYPE_PRESENT,
ENSURE_C2_FIELD_TYPE_PRESENT,
CHECK_NO_OP,
CHECK_NO_OP));
#if INCLUDE_ALL_GCS
debug_only(VM_STRUCTS_PARALLELGC(ENSURE_FIELD_TYPE_PRESENT,
ENSURE_FIELD_TYPE_PRESENT));
debug_only(VM_STRUCTS_CMS(ENSURE_FIELD_TYPE_PRESENT,
ENSURE_FIELD_TYPE_PRESENT,
ENSURE_FIELD_TYPE_PRESENT));
debug_only(VM_STRUCTS_G1(ENSURE_FIELD_TYPE_PRESENT,
ENSURE_FIELD_TYPE_PRESENT));
#endif // INCLUDE_ALL_GCS
debug_only(VM_STRUCTS_CPU(ENSURE_FIELD_TYPE_PRESENT,
ENSURE_FIELD_TYPE_PRESENT,
CHECK_NO_OP,
ENSURE_FIELD_TYPE_PRESENT,
ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT,
ENSURE_C2_FIELD_TYPE_PRESENT,
CHECK_NO_OP,
CHECK_NO_OP));
debug_only(VM_STRUCTS_OS_CPU(ENSURE_FIELD_TYPE_PRESENT,
ENSURE_FIELD_TYPE_PRESENT,
CHECK_NO_OP,
ENSURE_FIELD_TYPE_PRESENT,
ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT,
ENSURE_C2_FIELD_TYPE_PRESENT,
CHECK_NO_OP,
CHECK_NO_OP));
#endif
}
extern "C" {
#define ASSIGN_CONST_TO_64BIT_VAR(var, expr) \
JNIEXPORT uint64_t var = cast_uint64_t(expr);
#define ASSIGN_OFFSET_TO_64BIT_VAR(var, type, field) \
ASSIGN_CONST_TO_64BIT_VAR(var, offset_of(type, field))
#define ASSIGN_STRIDE_TO_64BIT_VAR(var, array) \
ASSIGN_CONST_TO_64BIT_VAR(var, (char*)&array[1] - (char*)&array[0])
JNIEXPORT VMStructEntry* gHotSpotVMStructs = VMStructs::localHotSpotVMStructs;
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryTypeNameOffset, VMStructEntry, typeName);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryFieldNameOffset, VMStructEntry, fieldName);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryTypeStringOffset, VMStructEntry, typeString);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryIsStaticOffset, VMStructEntry, isStatic);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryOffsetOffset, VMStructEntry, offset);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryAddressOffset, VMStructEntry, address);
ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMStructEntryArrayStride, gHotSpotVMStructs);
JNIEXPORT VMTypeEntry* gHotSpotVMTypes = VMStructs::localHotSpotVMTypes;
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryTypeNameOffset, VMTypeEntry, typeName);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntrySuperclassNameOffset, VMTypeEntry, superclassName);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsOopTypeOffset, VMTypeEntry, isOopType);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsIntegerTypeOffset, VMTypeEntry, isIntegerType);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsUnsignedOffset, VMTypeEntry, isUnsigned);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntrySizeOffset, VMTypeEntry, size);
ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMTypeEntryArrayStride,gHotSpotVMTypes);
JNIEXPORT VMIntConstantEntry* gHotSpotVMIntConstants = VMStructs::localHotSpotVMIntConstants;
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMIntConstantEntryNameOffset, VMIntConstantEntry, name);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMIntConstantEntryValueOffset, VMIntConstantEntry, value);
ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMIntConstantEntryArrayStride, gHotSpotVMIntConstants);
JNIEXPORT VMLongConstantEntry* gHotSpotVMLongConstants = VMStructs::localHotSpotVMLongConstants;
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMLongConstantEntryNameOffset, VMLongConstantEntry, name);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMLongConstantEntryValueOffset, VMLongConstantEntry, value);
ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMLongConstantEntryArrayStride, gHotSpotVMLongConstants);
}
#ifdef ASSERT
static int recursiveFindType(VMTypeEntry* origtypes, const char* typeName, bool isRecurse) {
{
VMTypeEntry* types = origtypes;
while (types->typeName != NULL) {
if (strcmp(typeName, types->typeName) == 0) {
return 1;
}
++types;
}
}
size_t len = strlen(typeName);
if (typeName[len-1] == '*') {
char * s = NEW_C_HEAP_ARRAY(char, len, mtInternal);
strncpy(s, typeName, len - 1);
s[len-1] = '\0';
if (recursiveFindType(origtypes, s, true) == 1) {
FREE_C_HEAP_ARRAY(char, s, mtInternal);
return 1;
}
FREE_C_HEAP_ARRAY(char, s, mtInternal);
}
const char* start = NULL;
if (strstr(typeName, "GrowableArray<") == typeName) {
start = typeName + strlen("GrowableArray<");
} else if (strstr(typeName, "Array<") == typeName) {
start = typeName + strlen("Array<");
}
if (start != NULL) {
const char * end = strrchr(typeName, '>');
int len = end - start + 1;
char * s = NEW_C_HEAP_ARRAY(char, len, mtInternal);
strncpy(s, start, len - 1);
s[len-1] = '\0';
if (recursiveFindType(origtypes, s, true) == 1) {
FREE_C_HEAP_ARRAY(char, s, mtInternal);
return 1;
}
FREE_C_HEAP_ARRAY(char, s, mtInternal);
}
if (strstr(typeName, "const ") == typeName) {
const char * s = typeName + strlen("const ");
if (recursiveFindType(origtypes, s, true) == 1) {
return 1;
}
}
if (strstr(typeName, " const") == typeName + len - 6) {
char * s = strdup(typeName);
s[len - 6] = '\0';
if (recursiveFindType(origtypes, s, true) == 1) {
free(s);
return 1;
}
free(s);
}
if (!isRecurse) {
tty->print_cr("type \"%s\" not found", typeName);
}
return 0;
}
int
VMStructs::findType(const char* typeName) {
VMTypeEntry* types = gHotSpotVMTypes;
return recursiveFindType(types, typeName, false);
}
#endif
void vmStructs_init() {
debug_only(VMStructs::init());
}
#ifndef PRODUCT
void VMStructs::test() {
static VMStructEntry struct_last_entry = GENERATE_VM_STRUCT_LAST_ENTRY();
assert(memcmp(&localHotSpotVMStructs[(sizeof(localHotSpotVMStructs) / sizeof(VMStructEntry)) - 1],
&struct_last_entry,
sizeof(VMStructEntry)) == 0, "Incorrect last entry in localHotSpotVMStructs");
static VMTypeEntry type_last_entry = GENERATE_VM_TYPE_LAST_ENTRY();
assert(memcmp(&localHotSpotVMTypes[sizeof(localHotSpotVMTypes) / sizeof(VMTypeEntry) - 1],
&type_last_entry,
sizeof(VMTypeEntry)) == 0, "Incorrect last entry in localHotSpotVMTypes");
static VMIntConstantEntry int_last_entry = GENERATE_VM_INT_CONSTANT_LAST_ENTRY();
assert(memcmp(&localHotSpotVMIntConstants[sizeof(localHotSpotVMIntConstants) / sizeof(VMIntConstantEntry) - 1],
&int_last_entry,
sizeof(VMIntConstantEntry)) == 0, "Incorrect last entry in localHotSpotVMIntConstants");
static VMLongConstantEntry long_last_entry = GENERATE_VM_LONG_CONSTANT_LAST_ENTRY();
assert(memcmp(&localHotSpotVMLongConstants[sizeof(localHotSpotVMLongConstants) / sizeof(VMLongConstantEntry) - 1],
&long_last_entry,
sizeof(VMLongConstantEntry)) == 0, "Incorrect last entry in localHotSpotVMLongConstants");
for (int i = 0; localHotSpotVMTypes[i].typeName != NULL; i++) {
for (int j = i + 1; localHotSpotVMTypes[j].typeName != NULL; j++) {
if (strcmp(localHotSpotVMTypes[i].typeName, localHotSpotVMTypes[j].typeName) == 0) {
tty->print_cr("Duplicate entries for '%s'", localHotSpotVMTypes[i].typeName);
assert(false, "Duplicate types in localHotSpotVMTypes array");
}
}
}
}
#endif
C:\hotspot-69087d08d473\src\share\vm/runtime/vmStructs.hpp
#ifndef SHARE_VM_RUNTIME_VMSTRUCTS_HPP
#define SHARE_VM_RUNTIME_VMSTRUCTS_HPP
#include "utilities/debug.hpp"
#ifdef COMPILER1
#include "c1/c1_Runtime1.hpp"
#endif
typedef struct {
const char* typeName; // The type name containing the given field (example: "Klass")
const char* fieldName; // The field name within the type (example: "_name")
const char* typeString; // Quoted name of the type of this field (example: "Symbol*";
int32_t isStatic; // Indicates whether following field is an offset or an address
uint64_t offset; // Offset of field within structure; only used for nonstatic fields
void* address; // Address of field; only used for static fields
} VMStructEntry;
typedef struct {
const char* typeName; // Type name (example: "Method")
const char* superclassName; // Superclass name, or null if none (example: "oopDesc")
int32_t isOopType; // Does this type represent an oop typedef? (i.e., "Method*" or
int32_t isIntegerType; // Does this type represent an integer type (of arbitrary size)?
int32_t isUnsigned; // If so, is it unsigned?
uint64_t size; // Size, in bytes, of the type
} VMTypeEntry;
typedef struct {
const char* name; // Name of constant (example: "_thread_in_native")
int32_t value; // Value of constant
} VMIntConstantEntry;
typedef struct {
const char* name; // Name of constant (example: "_thread_in_native")
uint64_t value; // Value of constant
} VMLongConstantEntry;
class VMStructs {
public:
static VMStructEntry localHotSpotVMStructs[];
static VMTypeEntry localHotSpotVMTypes[];
static VMIntConstantEntry localHotSpotVMIntConstants[];
static VMLongConstantEntry localHotSpotVMLongConstants[];
static void init();
#ifndef PRODUCT
static void test();
#endif
private:
static int findType(const char* typeName);
};
#endif // SHARE_VM_RUNTIME_VMSTRUCTS_HPP
C:\hotspot-69087d08d473\src\share\vm/runtime/vmThread.cpp
#include "precompiled.hpp"
#include "compiler/compileBroker.hpp"
#include "gc_interface/collectedHeap.hpp"
#include "jfr/jfrEvents.hpp"
#include "jfr/support/jfrThreadId.hpp"
#include "memory/resourceArea.hpp"
#include "oops/method.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/os.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/vmThread.hpp"
#include "runtime/vm_operations.hpp"
#include "services/runtimeService.hpp"
#include "utilities/dtrace.hpp"
#include "utilities/events.hpp"
#include "utilities/xmlstream.hpp"
#ifndef USDT2
HS_DTRACE_PROBE_DECL3(hotspot, vmops__request, char *, uintptr_t, int);
HS_DTRACE_PROBE_DECL3(hotspot, vmops__begin, char *, uintptr_t, int);
HS_DTRACE_PROBE_DECL3(hotspot, vmops__end, char *, uintptr_t, int);
#endif /* !USDT2 */
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
class VM_Dummy: public VM_Operation {
VMOp_Type type() const { return VMOp_Dummy; }
void doit() {};
};
VMOperationQueue::VMOperationQueue() {
for(int i = 0; i < nof_priorities; i++) {
_queue_length[i] = 0;
_queue_counter = 0;
_queue[i] = new VM_Dummy();
_queue[i]->set_next(_queue[i]);
_queue[i]->set_prev(_queue[i]);
}
_drain_list = NULL;
}
bool VMOperationQueue::queue_empty(int prio) {
bool empty = (_queue[prio] == _queue[prio]->next());
assert( (_queue_length[prio] == 0 && empty) ||
(_queue_length[prio] > 0 && !empty), "sanity check");
return _queue_length[prio] == 0;
}
void VMOperationQueue::insert(VM_Operation* q, VM_Operation* n) {
assert(q->next()->prev() == q && q->prev()->next() == q, "sanity check");
n->set_prev(q);
n->set_next(q->next());
q->next()->set_prev(n);
q->set_next(n);
}
void VMOperationQueue::queue_add_front(int prio, VM_Operation *op) {
_queue_length[prio]++;
insert(_queue[prio]->next(), op);
}
void VMOperationQueue::queue_add_back(int prio, VM_Operation *op) {
_queue_length[prio]++;
insert(_queue[prio]->prev(), op);
}
void VMOperationQueue::unlink(VM_Operation* q) {
assert(q->next()->prev() == q && q->prev()->next() == q, "sanity check");
q->prev()->set_next(q->next());
q->next()->set_prev(q->prev());
}
VM_Operation* VMOperationQueue::queue_remove_front(int prio) {
if (queue_empty(prio)) return NULL;
assert(_queue_length[prio] >= 0, "sanity check");
_queue_length[prio]--;
VM_Operation* r = _queue[prio]->next();
assert(r != _queue[prio], "cannot remove base element");
unlink(r);
return r;
}
VM_Operation* VMOperationQueue::queue_drain(int prio) {
if (queue_empty(prio)) return NULL;
DEBUG_ONLY(int length = _queue_length[prio];);
assert(length >= 0, "sanity check");
_queue_length[prio] = 0;
VM_Operation* r = _queue[prio]->next();
assert(r != _queue[prio], "cannot remove base element");
r->set_prev(NULL);
_queue[prio]->prev()->set_next(NULL);
_queue[prio]->set_next(_queue[prio]);
_queue[prio]->set_prev(_queue[prio]);
assert(queue_empty(prio), "drain corrupted queue");
#ifdef ASSERT
int len = 0;
VM_Operation* cur;
for(cur = r; cur != NULL; cur=cur->next()) len++;
assert(len == length, "drain lost some ops");
#endif
return r;
}
void VMOperationQueue::queue_oops_do(int queue, OopClosure* f) {
VM_Operation* cur = _queue[queue];
cur = cur->next();
while (cur != _queue[queue]) {
cur->oops_do(f);
cur = cur->next();
}
}
void VMOperationQueue::drain_list_oops_do(OopClosure* f) {
VM_Operation* cur = _drain_list;
while (cur != NULL) {
cur->oops_do(f);
cur = cur->next();
}
}
bool VMOperationQueue::add(VM_Operation *op) {
#ifndef USDT2
HS_DTRACE_PROBE3(hotspot, vmops__request, op->name(), strlen(op->name()),
op->evaluation_mode());
#else /* USDT2 */
HOTSPOT_VMOPS_REQUEST(
(char *) op->name(), strlen(op->name()),
op->evaluation_mode());
#endif /* USDT2 */
if (op->evaluate_at_safepoint()) {
queue_add_back(SafepointPriority, op);
return true;
}
queue_add_back(MediumPriority, op);
return true;
}
VM_Operation* VMOperationQueue::remove_next() {
assert(SafepointPriority == 0 && MediumPriority == 1 && nof_priorities == 2,
"current algorithm does not work");
int high_prio, low_prio;
if (_queue_counter++ < 10) {
high_prio = SafepointPriority;
low_prio = MediumPriority;
} else {
_queue_counter = 0;
high_prio = MediumPriority;
low_prio = SafepointPriority;
}
return queue_remove_front(queue_empty(high_prio) ? low_prio : high_prio);
}
void VMOperationQueue::oops_do(OopClosure* f) {
for(int i = 0; i < nof_priorities; i++) {
queue_oops_do(i, f);
}
drain_list_oops_do(f);
}
bool VMThread::_should_terminate = false;
bool VMThread::_terminated = false;
bool VMThread::_gclog_reentry = false;
Monitor* VMThread::_terminate_lock = NULL;
VMThread* VMThread::_vm_thread = NULL;
VM_Operation* VMThread::_cur_vm_operation = NULL;
VMOperationQueue* VMThread::_vm_queue = NULL;
PerfCounter* VMThread::_perf_accumulated_vm_operation_time = NULL;
void VMThread::create() {
assert(vm_thread() == NULL, "we can only allocate one VMThread");
_vm_thread = new VMThread();
_vm_queue = new VMOperationQueue();
guarantee(_vm_queue != NULL, "just checking");
_terminate_lock = new Monitor(Mutex::safepoint, "VMThread::_terminate_lock", true);
if (UsePerfData) {
Thread* THREAD = Thread::current();
_perf_accumulated_vm_operation_time =
PerfDataManager::create_counter(SUN_THREADS, "vmOperationTime",
PerfData::U_Ticks, CHECK);
}
}
VMThread::VMThread() : NamedThread() {
set_name("VM Thread");
}
void VMThread::destroy() {
if (_vm_thread != NULL) {
delete _vm_thread;
_vm_thread = NULL; // VM thread is gone
}
}
void VMThread::run() {
assert(this == vm_thread(), "check");
this->initialize_thread_local_storage();
this->set_native_thread_name(this->name());
this->record_stack_base_and_size();
this->set_active_handles(JNIHandleBlock::allocate_block());
{
MutexLocker ml(Notify_lock);
Notify_lock->notify();
}
int prio = (VMThreadPriority == -1)
? os::java_to_os_priority[NearMaxPriority]
: VMThreadPriority;
os::set_native_priority( this, prio );
this->loop();
if (xtty != NULL) {
ttyLocker ttyl;
xtty->begin_elem("destroy_vm");
xtty->stamp();
xtty->end_elem();
assert(should_terminate(), "termination flag must be set");
}
SafepointSynchronize::begin();
if (VerifyBeforeExit) {
HandleMark hm(VMThread::vm_thread());
Universe::heap()->prepare_for_verify();
os::check_heap();
Universe::verify(!(PrintGCDetails || Verbose) || VerifySilently);
}
CompileBroker::set_should_block();
VM_Exit::wait_for_threads_in_native_to_block();
{
MutexLockerEx ml(_terminate_lock, Mutex::_no_safepoint_check_flag);
_terminated = true;
_terminate_lock->notify();
}
ThreadLocalStorage::set_thread(NULL);
}
void VMThread::wait_for_vm_thread_exit() {
{ MutexLocker mu(VMOperationQueue_lock);
_should_terminate = true;
VMOperationQueue_lock->notify();
}
{ MutexLockerEx ml(_terminate_lock, Mutex::_no_safepoint_check_flag);
while(!VMThread::is_terminated()) {
_terminate_lock->wait(Mutex::_no_safepoint_check_flag);
}
}
}
void VMThread::print_on(outputStream* st) const {
st->print("\"%s\" ", name());
Thread::print_on(st);
st->cr();
}
static void post_vm_operation_event(EventExecuteVMOperation* event, VM_Operation* op) {
assert(event != NULL, "invariant");
assert(event->should_commit(), "invariant");
assert(op != NULL, "invariant");
const bool is_concurrent = op->evaluate_concurrently();
const bool evaluate_at_safepoint = op->evaluate_at_safepoint();
event->set_operation(op->type());
event->set_safepoint(evaluate_at_safepoint);
event->set_blocking(!is_concurrent);
event->set_caller(is_concurrent ? 0 : JFR_THREAD_ID(op->calling_thread()));
event->set_safepointId(evaluate_at_safepoint ? SafepointSynchronize::safepoint_counter() : 0);
event->commit();
}
void VMThread::evaluate_operation(VM_Operation* op) {
ResourceMark rm;
{
PerfTraceTime vm_op_timer(perf_accumulated_vm_operation_time());
#ifndef USDT2
HS_DTRACE_PROBE3(hotspot, vmops__begin, op->name(), strlen(op->name()),
op->evaluation_mode());
#else /* USDT2 */
HOTSPOT_VMOPS_BEGIN(
(char *) op->name(), strlen(op->name()),
op->evaluation_mode());
#endif /* USDT2 */
EventExecuteVMOperation event;
op->evaluate();
if (event.should_commit()) {
post_vm_operation_event(&event, op);
}
#ifndef USDT2
HS_DTRACE_PROBE3(hotspot, vmops__end, op->name(), strlen(op->name()),
op->evaluation_mode());
#else /* USDT2 */
HOTSPOT_VMOPS_END(
(char *) op->name(), strlen(op->name()),
op->evaluation_mode());
#endif /* USDT2 */
}
bool c_heap_allocated = op->is_cheap_allocated();
if (!op->evaluate_concurrently()) {
op->calling_thread()->increment_vm_operation_completed_count();
}
if (c_heap_allocated) {
delete _cur_vm_operation;
}
}
void VMThread::loop() {
assert(_cur_vm_operation == NULL, "no current one should be executing");
while(true) {
VM_Operation* safepoint_ops = NULL;
{ MutexLockerEx mu_queue(VMOperationQueue_lock,
Mutex::_no_safepoint_check_flag);
assert(_cur_vm_operation == NULL, "no current one should be executing");
_cur_vm_operation = _vm_queue->remove_next();
if (PrintVMQWaitTime && _cur_vm_operation != NULL &&
!_cur_vm_operation->evaluate_concurrently()) {
long stall = os::javaTimeMillis() - _cur_vm_operation->timestamp();
if (stall > 0)
tty->print_cr("%s stall: %Ld", _cur_vm_operation->name(), stall);
}
while (!should_terminate() && _cur_vm_operation == NULL) {
bool timedout =
VMOperationQueue_lock->wait(Mutex::_no_safepoint_check_flag,
GuaranteedSafepointInterval);
if ((SelfDestructTimer != 0) && !is_error_reported() &&
(os::elapsedTime() > SelfDestructTimer * 60)) {
tty->print_cr("VM self-destructed");
exit(-1);
}
if (timedout && (SafepointALot ||
SafepointSynchronize::is_cleanup_needed())) {
MutexUnlockerEx mul(VMOperationQueue_lock,
Mutex::_no_safepoint_check_flag);
SafepointSynchronize::begin();
#ifdef ASSERT
if (GCALotAtAllSafepoints) InterfaceSupport::check_gc_alot();
#endif
SafepointSynchronize::end();
}
_cur_vm_operation = _vm_queue->remove_next();
if (_cur_vm_operation != NULL &&
_cur_vm_operation->evaluate_at_safepoint()) {
safepoint_ops = _vm_queue->drain_at_safepoint_priority();
}
}
if (should_terminate()) break;
} // Release mu_queue_lock
{ HandleMark hm(VMThread::vm_thread());
EventMark em("Executing VM operation: %s", vm_operation()->name());
assert(_cur_vm_operation != NULL, "we should have found an operation to execute");
if( VMThreadHintNoPreempt )
os::hint_no_preempt();
if (_cur_vm_operation->evaluate_at_safepoint()) {
_vm_queue->set_drain_list(safepoint_ops); // ensure ops can be scanned
SafepointSynchronize::begin();
evaluate_operation(_cur_vm_operation);
do {
_cur_vm_operation = safepoint_ops;
if (_cur_vm_operation != NULL) {
do {
EventMark em("Executing coalesced safepoint VM operation: %s", _cur_vm_operation->name());
VM_Operation* next = _cur_vm_operation->next();
_vm_queue->set_drain_list(next);
evaluate_operation(_cur_vm_operation);
_cur_vm_operation = next;
if (PrintSafepointStatistics) {
SafepointSynchronize::inc_vmop_coalesced_count();
}
} while (_cur_vm_operation != NULL);
}
if (_vm_queue->peek_at_safepoint_priority()) {
MutexLockerEx mu_queue(VMOperationQueue_lock,
Mutex::_no_safepoint_check_flag);
safepoint_ops = _vm_queue->drain_at_safepoint_priority();
} else {
safepoint_ops = NULL;
}
} while(safepoint_ops != NULL);
_vm_queue->set_drain_list(NULL);
SafepointSynchronize::end();
} else { // not a safepoint operation
if (TraceLongCompiles) {
elapsedTimer t;
t.start();
evaluate_operation(_cur_vm_operation);
t.stop();
double secs = t.seconds();
if (secs * 1e3 > LongCompileThreshold) {
tty->print_cr("vm %s: %3.7f secs]", _cur_vm_operation->name(), secs);
}
} else {
evaluate_operation(_cur_vm_operation);
}
_cur_vm_operation = NULL;
}
}
{ MutexLockerEx mu(VMOperationRequest_lock,
Mutex::_no_safepoint_check_flag);
VMOperationRequest_lock->notify_all();
}
if (SafepointALot || SafepointSynchronize::is_cleanup_needed()) {
long interval = SafepointSynchronize::last_non_safepoint_interval();
bool max_time_exceeded = GuaranteedSafepointInterval != 0 && (interval > GuaranteedSafepointInterval);
if (SafepointALot || max_time_exceeded) {
HandleMark hm(VMThread::vm_thread());
SafepointSynchronize::begin();
SafepointSynchronize::end();
}
}
}
}
void VMThread::execute(VM_Operation* op) {
Thread* t = Thread::current();
if (!t->is_VM_thread()) {
SkipGCALot sgcalot(t); // avoid re-entrant attempts to gc-a-lot
bool concurrent = op->evaluate_concurrently();
if (!concurrent) {
t->check_for_valid_safepoint_state(true);
}
if (!op->doit_prologue()) {
return; // op was cancelled
}
op->set_calling_thread(t, Thread::get_priority(t));
bool execute_epilog = !op->is_cheap_allocated();
assert(!concurrent || op->is_cheap_allocated(), "concurrent => cheap_allocated");
int ticket = 0;
if (!concurrent) {
ticket = t->vm_operation_ticket();
}
{
VMOperationQueue_lock->lock_without_safepoint_check();
bool ok = _vm_queue->add(op);
op->set_timestamp(os::javaTimeMillis());
VMOperationQueue_lock->notify();
VMOperationQueue_lock->unlock();
if (!ok) {
assert(concurrent, "can only skip concurrent tasks");
if (op->is_cheap_allocated()) delete op;
return;
}
}
if (!concurrent) {
MutexLocker mu(VMOperationRequest_lock);
while(t->vm_operation_completed_count() < ticket) {
VMOperationRequest_lock->wait(!t->is_Java_thread());
}
}
if (execute_epilog) {
op->doit_epilogue();
}
} else {
assert(t->is_VM_thread(), "must be a VM thread");
VM_Operation* prev_vm_operation = vm_operation();
if (prev_vm_operation != NULL) {
if (!prev_vm_operation->allow_nested_vm_operations()) {
fatal(err_msg("Nested VM operation %s requested by operation %s",
op->name(), vm_operation()->name()));
}
op->set_calling_thread(prev_vm_operation->calling_thread(), prev_vm_operation->priority());
}
EventMark em("Executing %s VM operation: %s", prev_vm_operation ? "nested" : "", op->name());
HandleMark hm(t);
_cur_vm_operation = op;
if (op->evaluate_at_safepoint() && !SafepointSynchronize::is_at_safepoint()) {
SafepointSynchronize::begin();
op->evaluate();
SafepointSynchronize::end();
} else {
op->evaluate();
}
if (op->is_cheap_allocated()) delete op;
_cur_vm_operation = prev_vm_operation;
}
}
void VMThread::oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) {
Thread::oops_do(f, cld_f, cf);
_vm_queue->oops_do(f);
}
#ifndef PRODUCT
void VMOperationQueue::verify_queue(int prio) {
int length = _queue_length[prio];
VM_Operation *cur = _queue[prio];
int i;
for(i = 0; i < length; i++) {
cur = cur->next();
assert(cur != _queue[prio], "list to short (forward)");
}
assert(cur->next() == _queue[prio], "list to long (forward)");
cur = _queue[prio];
for(i = 0; i < length; i++) {
cur = cur->prev();
assert(cur != _queue[prio], "list to short (backwards)");
}
assert(cur->prev() == _queue[prio], "list to long (backwards)");
}
#endif
void VMThread::verify() {
oops_do(&VerifyOopClosure::verify_oop, NULL, NULL);
}
C:\hotspot-69087d08d473\src\share\vm/runtime/vmThread.hpp
#ifndef SHARE_VM_RUNTIME_VMTHREAD_HPP
#define SHARE_VM_RUNTIME_VMTHREAD_HPP
#include "runtime/perfData.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/vm_operations.hpp"
class VMOperationQueue : public CHeapObj<mtInternal> {
private:
enum Priorities {
SafepointPriority, // Highest priority (operation executed at a safepoint)
MediumPriority, // Medium priority
nof_priorities
};
int _queue_length[nof_priorities];
int _queue_counter;
VM_Operation* _queue [nof_priorities];
VM_Operation* _drain_list;
void insert(VM_Operation* q,VM_Operation* n);
void unlink(VM_Operation* q);
bool queue_empty (int prio);
void queue_add_front (int prio, VM_Operation *op);
void queue_add_back (int prio, VM_Operation *op);
VM_Operation* queue_remove_front(int prio);
void queue_oops_do(int queue, OopClosure* f);
void drain_list_oops_do(OopClosure* f);
VM_Operation* queue_drain(int prio);
bool queue_peek(int prio) { return _queue_length[prio] > 0; }
public:
VMOperationQueue();
bool add(VM_Operation *op);
VM_Operation* remove_next(); // Returns next or null
VM_Operation* remove_next_at_safepoint_priority() { return queue_remove_front(SafepointPriority); }
VM_Operation* drain_at_safepoint_priority() { return queue_drain(SafepointPriority); }
void set_drain_list(VM_Operation* list) { _drain_list = list; }
bool peek_at_safepoint_priority() { return queue_peek(SafepointPriority); }
void oops_do(OopClosure* f);
void verify_queue(int prio) PRODUCT_RETURN;
};
class VMThread: public NamedThread {
private:
static ThreadPriority _current_priority;
static bool _should_terminate;
static bool _terminated;
static bool _gclog_reentry;
static Monitor * _terminate_lock;
static PerfCounter* _perf_accumulated_vm_operation_time;
void evaluate_operation(VM_Operation* op);
public:
VMThread();
bool is_VM_thread() const { return true; }
bool is_GC_thread() const { return true; }
void loop();
static void wait_for_vm_thread_exit();
static bool should_terminate() { return _should_terminate; }
static bool is_terminated() { return _terminated == true; }
static bool is_gclog_reentry() { return _gclog_reentry; }
static void set_gclog_reentry(bool reentry) { _gclog_reentry = reentry; }
static void execute(VM_Operation* op);
static VM_Operation* vm_operation() { return _cur_vm_operation; }
static VMThread* vm_thread() { return _vm_thread; }
void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);
void print_on(outputStream* st) const;
void print() const { print_on(tty); }
void verify();
static PerfCounter* perf_accumulated_vm_operation_time() { return _perf_accumulated_vm_operation_time; }
virtual void run();
static void create();
static void destroy();
private:
static VM_Operation* _cur_vm_operation; // Current VM operation
static VMOperationQueue* _vm_queue; // Queue (w/ policy) of VM operations
static VMThread* _vm_thread;
};
#endif // SHARE_VM_RUNTIME_VMTHREAD_HPP
C:\hotspot-69087d08d473\src\share\vm/runtime/vm_operations.cpp
#include "precompiled.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/vmSymbols.hpp"
#include "compiler/compileBroker.hpp"
#include "compiler/compilerOracle.hpp"
#include "gc_implementation/shared/isGCActiveMark.hpp"
#include "memory/resourceArea.hpp"
#include "oops/symbol.hpp"
#include "runtime/arguments.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/sweeper.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/vm_operations.hpp"
#include "services/threadService.hpp"
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
#define VM_OP_NAME_INITIALIZE(name) #name,
const char* VM_Operation::_names[VM_Operation::VMOp_Terminating] = \
{ VM_OPS_DO(VM_OP_NAME_INITIALIZE) };
void VM_Operation::set_calling_thread(Thread* thread, ThreadPriority priority) {
_calling_thread = thread;
assert(MinPriority <= priority && priority <= MaxPriority, "sanity check");
_priority = priority;
}
void VM_Operation::evaluate() {
ResourceMark rm;
if (TraceVMOperation) {
tty->print("[");
NOT_PRODUCT(print();)
}
doit();
if (TraceVMOperation) {
tty->print_cr("]");
}
}
const char* VM_Operation::mode_to_string(Mode mode) {
switch(mode) {
case _safepoint : return "safepoint";
case _no_safepoint : return "no safepoint";
case _concurrent : return "concurrent";
case _async_safepoint: return "async safepoint";
default : return "unknown";
}
}
void VM_Operation::print_on_error(outputStream* st) const {
st->print("VM_Operation (" PTR_FORMAT "): ", this);
st->print("%s", name());
const char* mode = mode_to_string(evaluation_mode());
st->print(", mode: %s", mode);
if (calling_thread()) {
st->print(", requested by thread " PTR_FORMAT, calling_thread());
}
}
void VM_ThreadStop::doit() {
assert(SafepointSynchronize::is_at_safepoint(), "must be at a safepoint");
JavaThread* target = java_lang_Thread::thread(target_thread());
if (target != NULL) {
target->send_thread_stop(throwable());
}
}
void VM_Deoptimize::doit() {
ResourceMark rm;
DeoptimizationMarker dm;
Deoptimization::deoptimize_dependents();
CodeCache::make_marked_nmethods_not_entrant();
}
VM_DeoptimizeFrame::VM_DeoptimizeFrame(JavaThread* thread, intptr_t* id) {
_thread = thread;
_id = id;
}
void VM_DeoptimizeFrame::doit() {
Deoptimization::deoptimize_frame_internal(_thread, _id);
}
#ifndef PRODUCT
void VM_DeoptimizeAll::doit() {
DeoptimizationMarker dm;
if (DeoptimizeALot) {
for (JavaThread* thread = Threads::first(); thread != NULL; thread = thread->next()) {
if (thread->has_last_Java_frame()) {
thread->deoptimize();
}
}
} else if (DeoptimizeRandom) {
int tnum = os::random() & 0x3;
int fnum = os::random() & 0x3;
int tcount = 0;
for (JavaThread* thread = Threads::first(); thread != NULL; thread = thread->next()) {
if (thread->has_last_Java_frame()) {
if (tcount++ == tnum) {
tcount = 0;
int fcount = 0;
for(StackFrameStream fst(thread, UseBiasedLocking); !fst.is_done(); fst.next()) {
if (fst.current()->can_be_deoptimized()) {
if (fcount++ == fnum) {
fcount = 0;
Deoptimization::deoptimize(thread, *fst.current(), fst.register_map());
}
}
}
}
}
}
}
}
void VM_ZombieAll::doit() {
JavaThread *thread = (JavaThread *)calling_thread();
assert(thread->is_Java_thread(), "must be a Java thread");
thread->make_zombies();
}
#endif // !PRODUCT
void VM_UnlinkSymbols::doit() {
JavaThread *thread = (JavaThread *)calling_thread();
assert(thread->is_Java_thread(), "must be a Java thread");
SymbolTable::unlink();
}
void VM_Verify::doit() {
Universe::heap()->prepare_for_verify();
Universe::verify(_silent);
}
bool VM_PrintThreads::doit_prologue() {
assert(Thread::current()->is_Java_thread(), "just checking");
if (JDK_Version::is_gte_jdk16x_version()) {
java_util_concurrent_locks_AbstractOwnableSynchronizer::initialize(JavaThread::current());
}
if (_print_concurrent_locks) {
Heap_lock->lock();
}
return true;
}
void VM_PrintThreads::doit() {
Threads::print_on(_out, true, false, _print_concurrent_locks);
}
void VM_PrintThreads::doit_epilogue() {
if (_print_concurrent_locks) {
Heap_lock->unlock();
}
}
void VM_PrintJNI::doit() {
JNIHandles::print_on(_out);
}
VM_FindDeadlocks::~VM_FindDeadlocks() {
if (_deadlocks != NULL) {
DeadlockCycle* cycle = _deadlocks;
while (cycle != NULL) {
DeadlockCycle* d = cycle;
cycle = cycle->next();
delete d;
}
}
}
bool VM_FindDeadlocks::doit_prologue() {
assert(Thread::current()->is_Java_thread(), "just checking");
if (_concurrent_locks && JDK_Version::is_gte_jdk16x_version()) {
java_util_concurrent_locks_AbstractOwnableSynchronizer::initialize(JavaThread::current());
}
return true;
}
void VM_FindDeadlocks::doit() {
_deadlocks = ThreadService::find_deadlocks_at_safepoint(_concurrent_locks);
if (_out != NULL) {
int num_deadlocks = 0;
for (DeadlockCycle* cycle = _deadlocks; cycle != NULL; cycle = cycle->next()) {
num_deadlocks++;
cycle->print_on(_out);
}
if (num_deadlocks == 1) {
_out->print_cr("\nFound 1 deadlock.\n");
_out->flush();
} else if (num_deadlocks > 1) {
_out->print_cr("\nFound %d deadlocks.\n", num_deadlocks);
_out->flush();
}
}
}
VM_ThreadDump::VM_ThreadDump(ThreadDumpResult* result,
int max_depth,
bool with_locked_monitors,
bool with_locked_synchronizers) {
_result = result;
_num_threads = 0; // 0 indicates all threads
_threads = NULL;
_result = result;
_max_depth = max_depth;
_with_locked_monitors = with_locked_monitors;
_with_locked_synchronizers = with_locked_synchronizers;
}
VM_ThreadDump::VM_ThreadDump(ThreadDumpResult* result,
GrowableArray<instanceHandle>* threads,
int num_threads,
int max_depth,
bool with_locked_monitors,
bool with_locked_synchronizers) {
_result = result;
_num_threads = num_threads;
_threads = threads;
_result = result;
_max_depth = max_depth;
_with_locked_monitors = with_locked_monitors;
_with_locked_synchronizers = with_locked_synchronizers;
}
bool VM_ThreadDump::doit_prologue() {
assert(Thread::current()->is_Java_thread(), "just checking");
if (JDK_Version::is_gte_jdk16x_version()) {
java_util_concurrent_locks_AbstractOwnableSynchronizer::initialize(JavaThread::current());
}
if (_with_locked_synchronizers) {
Heap_lock->lock();
}
return true;
}
void VM_ThreadDump::doit_epilogue() {
if (_with_locked_synchronizers) {
Heap_lock->unlock();
}
}
void VM_ThreadDump::doit() {
ResourceMark rm;
ConcurrentLocksDump concurrent_locks(true);
if (_with_locked_synchronizers) {
concurrent_locks.dump_at_safepoint();
}
if (_num_threads == 0) {
for (JavaThread* jt = Threads::first(); jt != NULL; jt = jt->next()) {
if (jt->is_exiting() ||
jt->is_hidden_from_external_view()) {
continue;
}
ThreadConcurrentLocks* tcl = NULL;
if (_with_locked_synchronizers) {
tcl = concurrent_locks.thread_concurrent_locks(jt);
}
ThreadSnapshot* ts = snapshot_thread(jt, tcl);
_result->add_thread_snapshot(ts);
}
} else {
for (int i = 0; i < _num_threads; i++) {
instanceHandle th = _threads->at(i);
if (th() == NULL) {
_result->add_thread_snapshot(new ThreadSnapshot());
continue;
}
JavaThread* jt = java_lang_Thread::thread(th());
if (jt == NULL || /* thread not alive */
jt->is_exiting() ||
jt->is_hidden_from_external_view()) {
_result->add_thread_snapshot(new ThreadSnapshot());
continue;
}
ThreadConcurrentLocks* tcl = NULL;
if (_with_locked_synchronizers) {
tcl = concurrent_locks.thread_concurrent_locks(jt);
}
ThreadSnapshot* ts = snapshot_thread(jt, tcl);
_result->add_thread_snapshot(ts);
}
}
}
ThreadSnapshot* VM_ThreadDump::snapshot_thread(JavaThread* java_thread, ThreadConcurrentLocks* tcl) {
ThreadSnapshot* snapshot = new ThreadSnapshot(java_thread);
snapshot->dump_stack_at_safepoint(_max_depth, _with_locked_monitors);
snapshot->set_concurrent_locks(tcl);
return snapshot;
}
volatile bool VM_Exit::_vm_exited = false;
Thread * VM_Exit::_shutdown_thread = NULL;
int VM_Exit::set_vm_exited() {
Thread * thr_cur = ThreadLocalStorage::get_thread_slow();
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint already");
int num_active = 0;
_shutdown_thread = thr_cur;
_vm_exited = true; // global flag
for(JavaThread *thr = Threads::first(); thr != NULL; thr = thr->next())
if (thr!=thr_cur && thr->thread_state() == _thread_in_native) {
++num_active;
thr->set_terminated(JavaThread::_vm_exited); // per-thread flag
}
return num_active;
}
int VM_Exit::wait_for_threads_in_native_to_block() {
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint already");
Thread * thr_cur = ThreadLocalStorage::get_thread_slow();
Monitor timer(Mutex::leaf, "VM_Exit timer", true);
int max_wait_user_thread = 30; // at least 300 milliseconds
int max_wait_compiler_thread = 1000; // at least 10 seconds
int max_wait = max_wait_compiler_thread;
int attempts = 0;
while (true) {
int num_active = 0;
int num_active_compiler_thread = 0;
for(JavaThread *thr = Threads::first(); thr != NULL; thr = thr->next()) {
if (thr!=thr_cur && thr->thread_state() == _thread_in_native) {
num_active++;
if (thr->is_Compiler_thread()) {
num_active_compiler_thread++;
}
}
}
if (num_active == 0) {
return 0;
} else if (attempts > max_wait) {
return num_active;
} else if (num_active_compiler_thread == 0 && attempts > max_wait_user_thread) {
return num_active;
}
attempts++;
MutexLockerEx ml(&timer, Mutex::_no_safepoint_check_flag);
timer.wait(Mutex::_no_safepoint_check_flag, 10);
}
}
void VM_Exit::doit() {
CompileBroker::set_should_block();
wait_for_threads_in_native_to_block();
set_vm_exited();
exit_globals();
exit_hook_t exit_hook = Arguments::exit_hook();
if (exit_hook != NULL) {
exit_hook(_exit_code);
vm_direct_exit(_exit_code);
} else {
vm_direct_exit(_exit_code);
}
}
void VM_Exit::wait_if_vm_exited() {
if (_vm_exited &&
ThreadLocalStorage::get_thread_slow() != _shutdown_thread) {
Threads_lock->lock_without_safepoint_check();
ShouldNotReachHere();
}
}
C:\hotspot-69087d08d473\src\share\vm/runtime/vm_operations.hpp
#ifndef SHARE_VM_RUNTIME_VM_OPERATIONS_HPP
#define SHARE_VM_RUNTIME_VM_OPERATIONS_HPP
#include "classfile/javaClasses.hpp"
#include "memory/allocation.hpp"
#include "oops/oop.hpp"
#include "runtime/thread.hpp"
#include "utilities/top.hpp"
#define VM_OP_ENUM(type) VMOp_##type,
#define VM_OPS_DO(template) \
template(Dummy) \
template(ThreadStop) \
template(ThreadDump) \
template(PrintThreads) \
template(FindDeadlocks) \
template(ForceSafepoint) \
template(ForceAsyncSafepoint) \
template(Deoptimize) \
template(DeoptimizeFrame) \
template(DeoptimizeAll) \
template(ZombieAll) \
template(UnlinkSymbols) \
template(Verify) \
template(PrintJNI) \
template(HeapDumper) \
template(DeoptimizeTheWorld) \
template(CollectForMetadataAllocation) \
template(GC_HeapInspection) \
template(GenCollectFull) \
template(GenCollectFullConcurrent) \
template(GenCollectForAllocation) \
template(ParallelGCFailedAllocation) \
template(ParallelGCSystemGC) \
template(CGC_Operation) \
template(CMS_Initial_Mark) \
template(CMS_Final_Remark) \
template(G1CollectFull) \
template(G1CollectForAllocation) \
template(G1IncCollectionPause) \
template(DestroyAllocationContext) \
template(EnableBiasedLocking) \
template(RevokeBias) \
template(BulkRevokeBias) \
template(PopulateDumpSharedSpace) \
template(JNIFunctionTableCopier) \
template(RedefineClasses) \
template(GetOwnedMonitorInfo) \
template(GetObjectMonitorUsage) \
template(GetCurrentContendedMonitor) \
template(GetStackTrace) \
template(GetMultipleStackTraces) \
template(GetAllStackTraces) \
template(GetThreadListStackTraces) \
template(GetFrameCount) \
template(GetFrameLocation) \
template(ChangeBreakpoints) \
template(GetOrSetLocal) \
template(GetCurrentLocation) \
template(EnterInterpOnlyMode) \
template(ChangeSingleStep) \
template(HeapWalkOperation) \
template(HeapIterateOperation) \
template(ReportJavaOutOfMemory) \
template(JFRCheckpoint) \
template(Exit) \
template(LinuxDllLoad) \
template(RotateGCLog) \
template(WhiteBoxOperation) \
template(ClassLoaderStatsOperation) \
template(JFROldObject) \
class VM_Operation: public CHeapObj<mtInternal> {
public:
enum Mode {
_safepoint, // blocking, safepoint, vm_op C-heap allocated
_no_safepoint, // blocking, no safepoint, vm_op C-Heap allocated
_concurrent, // non-blocking, no safepoint, vm_op C-Heap allocated
_async_safepoint // non-blocking, safepoint, vm_op C-Heap allocated
};
enum VMOp_Type {
VM_OPS_DO(VM_OP_ENUM)
VMOp_Terminating
};
private:
Thread* _calling_thread;
ThreadPriority _priority;
long _timestamp;
VM_Operation* _next;
VM_Operation* _prev;
static const char* _names[];
public:
VM_Operation() { _calling_thread = NULL; _next = NULL; _prev = NULL; }
virtual ~VM_Operation() {}
Thread* calling_thread() const { return _calling_thread; }
ThreadPriority priority() { return _priority; }
void set_calling_thread(Thread* thread, ThreadPriority priority);
long timestamp() const { return _timestamp; }
void set_timestamp(long timestamp) { _timestamp = timestamp; }
void evaluate();
virtual void doit() = 0;
virtual bool doit_prologue() { return true; };
virtual void doit_epilogue() {}; // Note: Not called if mode is: _concurrent
virtual bool is_methodCompiler() const { return false; }
VM_Operation *next() const { return _next; }
VM_Operation *prev() const { return _prev; }
void set_next(VM_Operation *next) { _next = next; }
void set_prev(VM_Operation *prev) { _prev = prev; }
virtual VMOp_Type type() const = 0;
virtual Mode evaluation_mode() const { return _safepoint; }
virtual bool allow_nested_vm_operations() const { return false; }
virtual bool is_cheap_allocated() const { return false; }
virtual void oops_do(OopClosure* f) { /* do nothing */ };
virtual bool evaluate_at_safepoint() const {
return evaluation_mode() == _safepoint ||
evaluation_mode() == _async_safepoint;
}
virtual bool evaluate_concurrently() const {
return evaluation_mode() == _concurrent ||
evaluation_mode() == _async_safepoint;
}
static const char* mode_to_string(Mode mode);
virtual void print_on_error(outputStream* st) const;
const char* name() const { return _names[type()]; }
static const char* name(int type) {
assert(type >= 0 && type < VMOp_Terminating, "invalid VM operation type");
return _names[type];
}
#ifndef PRODUCT
void print_on(outputStream* st) const { print_on_error(st); }
#endif
};
class VM_ThreadStop: public VM_Operation {
private:
oop _thread; // The Thread that the Throwable is thrown against
oop _throwable; // The Throwable thrown at the target Thread
public:
VM_ThreadStop(oop thread, oop throwable) {
_thread = thread;
_throwable = throwable;
}
VMOp_Type type() const { return VMOp_ThreadStop; }
oop target_thread() const { return _thread; }
oop throwable() const { return _throwable;}
void doit();
bool allow_nested_vm_operations() const { return true; }
Mode evaluation_mode() const { return _async_safepoint; }
bool is_cheap_allocated() const { return true; }
void oops_do(OopClosure* f) {
f->do_oop(&_thread); f->do_oop(&_throwable);
}
};
class VM_ForceSafepoint: public VM_Operation {
public:
VM_ForceSafepoint() {}
void doit() {}
VMOp_Type type() const { return VMOp_ForceSafepoint; }
};
class VM_ForceAsyncSafepoint: public VM_Operation {
public:
VM_ForceAsyncSafepoint() {}
void doit() {}
VMOp_Type type() const { return VMOp_ForceAsyncSafepoint; }
Mode evaluation_mode() const { return _async_safepoint; }
bool is_cheap_allocated() const { return true; }
};
class VM_Deoptimize: public VM_Operation {
public:
VM_Deoptimize() {}
VMOp_Type type() const { return VMOp_Deoptimize; }
void doit();
bool allow_nested_vm_operations() const { return true; }
};
class VM_DeoptimizeFrame: public VM_Operation {
friend class Deoptimization;
private:
JavaThread* _thread;
intptr_t* _id;
VM_DeoptimizeFrame(JavaThread* thread, intptr_t* id);
public:
VMOp_Type type() const { return VMOp_DeoptimizeFrame; }
void doit();
bool allow_nested_vm_operations() const { return true; }
};
#ifndef PRODUCT
class VM_DeoptimizeAll: public VM_Operation {
private:
KlassHandle _dependee;
public:
VM_DeoptimizeAll() {}
VMOp_Type type() const { return VMOp_DeoptimizeAll; }
void doit();
bool allow_nested_vm_operations() const { return true; }
};
class VM_ZombieAll: public VM_Operation {
public:
VM_ZombieAll() {}
VMOp_Type type() const { return VMOp_ZombieAll; }
void doit();
bool allow_nested_vm_operations() const { return true; }
};
#endif // PRODUCT
class VM_UnlinkSymbols: public VM_Operation {
public:
VM_UnlinkSymbols() {}
VMOp_Type type() const { return VMOp_UnlinkSymbols; }
void doit();
bool allow_nested_vm_operations() const { return true; }
};
class VM_Verify: public VM_Operation {
private:
bool _silent;
public:
VM_Verify(bool silent = VerifySilently) : _silent(silent) {}
VMOp_Type type() const { return VMOp_Verify; }
void doit();
};
class VM_PrintThreads: public VM_Operation {
private:
outputStream* _out;
bool _print_concurrent_locks;
public:
VM_PrintThreads() { _out = tty; _print_concurrent_locks = PrintConcurrentLocks; }
VM_PrintThreads(outputStream* out, bool print_concurrent_locks) { _out = out; _print_concurrent_locks = print_concurrent_locks; }
VMOp_Type type() const { return VMOp_PrintThreads; }
void doit();
bool doit_prologue();
void doit_epilogue();
};
class VM_PrintJNI: public VM_Operation {
private:
outputStream* _out;
public:
VM_PrintJNI() { _out = tty; }
VM_PrintJNI(outputStream* out) { _out = out; }
VMOp_Type type() const { return VMOp_PrintJNI; }
void doit();
};
class DeadlockCycle;
class VM_FindDeadlocks: public VM_Operation {
private:
bool _concurrent_locks;
DeadlockCycle* _deadlocks;
outputStream* _out;
public:
VM_FindDeadlocks(bool concurrent_locks) : _concurrent_locks(concurrent_locks), _out(NULL), _deadlocks(NULL) {};
VM_FindDeadlocks(outputStream* st) : _concurrent_locks(true), _out(st), _deadlocks(NULL) {};
~VM_FindDeadlocks();
DeadlockCycle* result() { return _deadlocks; };
VMOp_Type type() const { return VMOp_FindDeadlocks; }
void doit();
bool doit_prologue();
};
class ThreadDumpResult;
class ThreadSnapshot;
class ThreadConcurrentLocks;
class VM_ThreadDump : public VM_Operation {
private:
ThreadDumpResult* _result;
int _num_threads;
GrowableArray<instanceHandle>* _threads;
int _max_depth;
bool _with_locked_monitors;
bool _with_locked_synchronizers;
ThreadSnapshot* snapshot_thread(JavaThread* java_thread, ThreadConcurrentLocks* tcl);
public:
VM_ThreadDump(ThreadDumpResult* result,
int max_depth, // -1 indicates entire stack
bool with_locked_monitors,
bool with_locked_synchronizers);
VM_ThreadDump(ThreadDumpResult* result,
GrowableArray<instanceHandle>* threads,
int num_threads, // -1 indicates entire stack
int max_depth,
bool with_locked_monitors,
bool with_locked_synchronizers);
VMOp_Type type() const { return VMOp_ThreadDump; }
void doit();
bool doit_prologue();
void doit_epilogue();
};
class VM_Exit: public VM_Operation {
private:
int _exit_code;
static volatile bool _vm_exited;
static Thread * _shutdown_thread;
static void wait_if_vm_exited();
public:
VM_Exit(int exit_code) {
_exit_code = exit_code;
}
static int wait_for_threads_in_native_to_block();
static int set_vm_exited();
static bool vm_exited() { return _vm_exited; }
static void block_if_vm_exited() {
if (_vm_exited) {
wait_if_vm_exited();
}
}
VMOp_Type type() const { return VMOp_Exit; }
void doit();
};
class VM_RotateGCLog: public VM_Operation {
private:
outputStream* _out;
public:
VM_RotateGCLog(outputStream* st) : _out(st) {}
VMOp_Type type() const { return VMOp_RotateGCLog; }
void doit() { gclog_or_tty->rotate_log(true, _out); }
};
#endif // SHARE_VM_RUNTIME_VM_OPERATIONS_HPP
C:\hotspot-69087d08d473\src\share\vm/runtime/vm_version.cpp
#include "precompiled.hpp"
#include "memory/universe.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/arguments.hpp"
#ifdef TARGET_ARCH_x86
# include "vm_version_x86.hpp"
#endif
#ifdef TARGET_ARCH_aarch64
# include "vm_version_aarch64.hpp"
#endif
#ifdef TARGET_ARCH_sparc
# include "vm_version_sparc.hpp"
#endif
#ifdef TARGET_ARCH_zero
# include "vm_version_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "vm_version_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "vm_version_ppc.hpp"
#endif
const char* Abstract_VM_Version::_s_vm_release = Abstract_VM_Version::vm_release();
const char* Abstract_VM_Version::_s_internal_vm_info_string = Abstract_VM_Version::internal_vm_info_string();
bool Abstract_VM_Version::_supports_cx8 = false;
bool Abstract_VM_Version::_supports_atomic_getset4 = false;
bool Abstract_VM_Version::_supports_atomic_getset8 = false;
bool Abstract_VM_Version::_supports_atomic_getadd4 = false;
bool Abstract_VM_Version::_supports_atomic_getadd8 = false;
unsigned int Abstract_VM_Version::_logical_processors_per_package = 1U;
unsigned int Abstract_VM_Version::_L1_data_cache_line_size = 0;
int Abstract_VM_Version::_reserve_for_allocation_prefetch = 0;
#ifndef HOTSPOT_RELEASE_VERSION
#error HOTSPOT_RELEASE_VERSION must be defined
#endif
#ifndef JRE_RELEASE_VERSION
#error JRE_RELEASE_VERSION must be defined
#endif
#ifndef HOTSPOT_BUILD_TARGET
#error HOTSPOT_BUILD_TARGET must be defined
#endif
#ifdef PRODUCT
#define VM_RELEASE HOTSPOT_RELEASE_VERSION
#else
#define VM_RELEASE HOTSPOT_RELEASE_VERSION "-" HOTSPOT_BUILD_TARGET
#endif
int Abstract_VM_Version::_vm_major_version = 0;
int Abstract_VM_Version::_vm_minor_version = 0;
int Abstract_VM_Version::_vm_build_number = 0;
bool Abstract_VM_Version::_initialized = false;
int Abstract_VM_Version::_parallel_worker_threads = 0;
bool Abstract_VM_Version::_parallel_worker_threads_initialized = false;
void Abstract_VM_Version::initialize() {
if (_initialized) {
return;
}
char* vm_version = os::strdup(HOTSPOT_RELEASE_VERSION);
char* vm_major_ver = vm_version;
assert(isdigit(vm_major_ver[0]),"wrong vm major version number");
char* vm_minor_ver = strchr(vm_major_ver, '.');
assert(vm_minor_ver != NULL && isdigit(vm_minor_ver[1]),"wrong vm minor version number");
vm_minor_ver[0] = '\0'; // terminate vm_major_ver
vm_minor_ver += 1;
char* vm_build_num = strchr(vm_minor_ver, '-');
assert(vm_build_num != NULL && vm_build_num[1] == 'b' && isdigit(vm_build_num[2]),"wrong vm build number");
vm_build_num[0] = '\0'; // terminate vm_minor_ver
vm_build_num += 2;
_vm_major_version = atoi(vm_major_ver);
_vm_minor_version = atoi(vm_minor_ver);
_vm_build_number = atoi(vm_build_num);
os::free(vm_version);
_initialized = true;
}
#if defined(_LP64)
#define VMLP "64-Bit "
#else
#define VMLP ""
#endif
#ifndef VMTYPE
#ifdef TIERED
#define VMTYPE "Server"
#else // TIERED
#ifdef ZERO
#ifdef SHARK
#define VMTYPE "Shark"
#else // SHARK
#define VMTYPE "Zero"
#endif // SHARK
#else // ZERO
#define VMTYPE COMPILER1_PRESENT("Client") \
COMPILER2_PRESENT("Server")
#endif // ZERO
#endif // TIERED
#endif
#ifndef HOTSPOT_VM_DISTRO
#error HOTSPOT_VM_DISTRO must be defined
#endif
#define VMNAME HOTSPOT_VM_DISTRO " " VMLP EMBEDDED_ONLY("Embedded ") VMTYPE " VM"
const char* Abstract_VM_Version::vm_name() {
return VMNAME;
}
const char* Abstract_VM_Version::vm_vendor() {
#ifdef VENDOR
return VENDOR;
#else
return JDK_Version::is_gte_jdk17x_version() ?
"Oracle Corporation" : "Sun Microsystems Inc.";
#endif
}
const char* Abstract_VM_Version::vm_info_string() {
switch (Arguments::mode()) {
case Arguments::_int:
return UseSharedSpaces ? "interpreted mode, sharing" : "interpreted mode";
case Arguments::_mixed:
return UseSharedSpaces ? "mixed mode, sharing" : "mixed mode";
case Arguments::_comp:
return UseSharedSpaces ? "compiled mode, sharing" : "compiled mode";
};
ShouldNotReachHere();
return "";
}
const char* Abstract_VM_Version::vm_release() {
return VM_RELEASE;
}
const char* Abstract_VM_Version::jre_release_version() {
return JRE_RELEASE_VERSION;
}
#define OS LINUX_ONLY("linux") \
WINDOWS_ONLY("windows") \
SOLARIS_ONLY("solaris") \
AIX_ONLY("aix") \
BSD_ONLY("bsd")
#ifndef CPU
#ifdef ZERO
#define CPU ZERO_LIBARCH
#elif defined(PPC64)
#if defined(VM_LITTLE_ENDIAN)
#define CPU "ppc64le"
#else
#define CPU "ppc64"
#endif
#else
#define CPU IA32_ONLY("x86") \
IA64_ONLY("ia64") \
AMD64_ONLY("amd64") \
AARCH64_ONLY("aarch64") \
SPARC_ONLY("sparc")
#endif // ZERO
#endif
const char *Abstract_VM_Version::vm_platform_string() {
return OS "-" CPU;
}
const char* Abstract_VM_Version::internal_vm_info_string() {
#ifndef HOTSPOT_BUILD_USER
#define HOTSPOT_BUILD_USER unknown
#endif
#ifndef HOTSPOT_BUILD_COMPILER
#ifdef _MSC_VER
#if _MSC_VER == 1100
#define HOTSPOT_BUILD_COMPILER "MS VC++ 5.0"
#elif _MSC_VER == 1200
#define HOTSPOT_BUILD_COMPILER "MS VC++ 6.0"
#elif _MSC_VER == 1310
#define HOTSPOT_BUILD_COMPILER "MS VC++ 7.1 (VS2003)"
#elif _MSC_VER == 1400
#define HOTSPOT_BUILD_COMPILER "MS VC++ 8.0 (VS2005)"
#elif _MSC_VER == 1500
#define HOTSPOT_BUILD_COMPILER "MS VC++ 9.0 (VS2008)"
#elif _MSC_VER == 1600
#define HOTSPOT_BUILD_COMPILER "MS VC++ 10.0 (VS2010)"
#elif _MSC_VER == 1700
#define HOTSPOT_BUILD_COMPILER "MS VC++ 11.0 (VS2012)"
#elif _MSC_VER == 1800
#define HOTSPOT_BUILD_COMPILER "MS VC++ 12.0 (VS2013)"
#elif _MSC_VER == 1900
#define HOTSPOT_BUILD_COMPILER "MS VC++ 14.0 (VS2015)"
#elif _MSC_VER == 1911
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.3 (VS2017)"
#elif _MSC_VER == 1912
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.5 (VS2017)"
#elif _MSC_VER == 1913
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.6 (VS2017)"
#elif _MSC_VER == 1914
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.7 (VS2017)"
#elif _MSC_VER == 1915
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.8 (VS2017)"
#elif _MSC_VER == 1916
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.9 (VS2017)"
#elif _MSC_VER == 1920
#define HOTSPOT_BUILD_COMPILER "MS VC++ 16.0 (VS2019)"
#elif _MSC_VER == 1921
#define HOTSPOT_BUILD_COMPILER "MS VC++ 16.1 (VS2019)"
#elif _MSC_VER == 1922
#define HOTSPOT_BUILD_COMPILER "MS VC++ 16.2 (VS2019)"
#elif _MSC_VER == 1923
#define HOTSPOT_BUILD_COMPILER "MS VC++ 16.3 (VS2019)"
#else
#define HOTSPOT_BUILD_COMPILER "unknown MS VC++:" XSTR(_MSC_VER)
#endif
#elif defined(__SUNPRO_CC)
#if __SUNPRO_CC == 0x420
#define HOTSPOT_BUILD_COMPILER "Workshop 4.2"
#elif __SUNPRO_CC == 0x500
#define HOTSPOT_BUILD_COMPILER "Workshop 5.0 compat=" XSTR(__SUNPRO_CC_COMPAT)
#elif __SUNPRO_CC == 0x520
#define HOTSPOT_BUILD_COMPILER "Workshop 5.2 compat=" XSTR(__SUNPRO_CC_COMPAT)
#elif __SUNPRO_CC == 0x580
#define HOTSPOT_BUILD_COMPILER "Workshop 5.8"
#elif __SUNPRO_CC == 0x590
#define HOTSPOT_BUILD_COMPILER "Workshop 5.9"
#elif __SUNPRO_CC == 0x5100
#define HOTSPOT_BUILD_COMPILER "Sun Studio 12u1"
#elif __SUNPRO_CC == 0x5120
#define HOTSPOT_BUILD_COMPILER "Sun Studio 12u3"
#else
#define HOTSPOT_BUILD_COMPILER "unknown Workshop:" XSTR(__SUNPRO_CC)
#endif
#elif defined(__GNUC__)
#define HOTSPOT_BUILD_COMPILER "gcc " __VERSION__
#elif defined(__IBMCPP__)
#define HOTSPOT_BUILD_COMPILER "xlC " XSTR(__IBMCPP__)
#else
#define HOTSPOT_BUILD_COMPILER "unknown compiler"
#endif
#endif
#ifndef FLOAT_ARCH
#if defined(__SOFTFP__)
#define FLOAT_ARCH_STR "-sflt"
#else
#define FLOAT_ARCH_STR ""
#endif
#else
#define FLOAT_ARCH_STR XSTR(FLOAT_ARCH)
#endif
return VMNAME " (" VM_RELEASE ") for " OS "-" CPU FLOAT_ARCH_STR
" JRE (" JRE_RELEASE_VERSION "), built on " __DATE__ " " __TIME__
" by " XSTR(HOTSPOT_BUILD_USER) " with " HOTSPOT_BUILD_COMPILER;
}
const char *Abstract_VM_Version::vm_build_user() {
return HOTSPOT_BUILD_USER;
}
unsigned int Abstract_VM_Version::jvm_version() {
return ((Abstract_VM_Version::vm_major_version() & 0xFF) << 24) |
((Abstract_VM_Version::vm_minor_version() & 0xFFFF) << 8) |
(Abstract_VM_Version::vm_build_number() & 0xFF);
}
void VM_Version_init() {
VM_Version::initialize();
#ifndef PRODUCT
if (PrintMiscellaneous && Verbose) {
os::print_cpu_info(tty);
}
#endif
}
unsigned int Abstract_VM_Version::nof_parallel_worker_threads(
unsigned int num,
unsigned int den,
unsigned int switch_pt) {
if (FLAG_IS_DEFAULT(ParallelGCThreads)) {
assert(ParallelGCThreads == 0, "Default ParallelGCThreads is not 0");
unsigned int ncpus = (unsigned int) os::initial_active_processor_count();
return (ncpus <= switch_pt) ?
ncpus :
(switch_pt + ((ncpus - switch_pt) * num) / den);
} else {
return ParallelGCThreads;
}
}
unsigned int Abstract_VM_Version::calc_parallel_worker_threads() {
return nof_parallel_worker_threads(5, 8, 8);
}
unsigned int Abstract_VM_Version::parallel_worker_threads() {
if (!_parallel_worker_threads_initialized) {
if (FLAG_IS_DEFAULT(ParallelGCThreads)) {
_parallel_worker_threads = VM_Version::calc_parallel_worker_threads();
} else {
_parallel_worker_threads = ParallelGCThreads;
}
_parallel_worker_threads_initialized = true;
}
return _parallel_worker_threads;
}
C:\hotspot-69087d08d473\src\share\vm/runtime/vm_version.hpp
#ifndef SHARE_VM_RUNTIME_VM_VERSION_HPP
#define SHARE_VM_RUNTIME_VM_VERSION_HPP
#include "memory/allocation.hpp"
#include "utilities/ostream.hpp"
class Abstract_VM_Version: AllStatic {
protected:
friend class VMStructs;
static const char* _s_vm_release;
static const char* _s_internal_vm_info_string;
static bool _supports_cx8;
static bool _supports_atomic_getset4;
static bool _supports_atomic_getset8;
static bool _supports_atomic_getadd4;
static bool _supports_atomic_getadd8;
static unsigned int _logical_processors_per_package;
static unsigned int _L1_data_cache_line_size;
static int _vm_major_version;
static int _vm_minor_version;
static int _vm_build_number;
static bool _initialized;
static int _parallel_worker_threads;
static bool _parallel_worker_threads_initialized;
static int _reserve_for_allocation_prefetch;
static unsigned int nof_parallel_worker_threads(unsigned int num,
unsigned int dem,
unsigned int switch_pt);
public:
static void initialize();
static void early_initialize() { }
static void init_before_ergo() {}
static const char* vm_name();
static const char* vm_vendor();
static const char* vm_info_string();
static const char* vm_release();
static const char* vm_platform_string();
static const char* vm_build_user();
static int vm_major_version() { assert(_initialized, "not initialized"); return _vm_major_version; }
static int vm_minor_version() { assert(_initialized, "not initialized"); return _vm_minor_version; }
static int vm_build_number() { assert(_initialized, "not initialized"); return _vm_build_number; }
static unsigned int jvm_version();
static const char* internal_vm_info_string();
static const char* jre_release_version();
static bool supports_cx8() {
assert(_initialized, "not initialized");
#ifdef SUPPORTS_NATIVE_CX8
return true;
#else
return _supports_cx8;
#endif
}
static bool supports_atomic_getset4() { assert(_initialized, "not initialized"); return _supports_atomic_getset4;}
static bool supports_atomic_getset8() { assert(_initialized, "not initialized"); return _supports_atomic_getset8;}
static bool supports_atomic_getadd4() { assert(_initialized, "not initialized"); return _supports_atomic_getadd4;}
static bool supports_atomic_getadd8() { assert(_initialized, "not initialized"); return _supports_atomic_getadd8;}
static unsigned int logical_processors_per_package() {
return _logical_processors_per_package;
}
static unsigned int L1_data_cache_line_size() {
return _L1_data_cache_line_size;
}
static int reserve_for_allocation_prefetch() {
return _reserve_for_allocation_prefetch;
}
static bool use_biased_locking() { return true; }
static uint page_size_count() { return 2; }
static unsigned int parallel_worker_threads();
static unsigned int calc_parallel_worker_threads();
};
#endif // SHARE_VM_RUNTIME_VM_VERSION_HPP
C:\hotspot-69087d08d473\src\share\vm/services/allocationContextService.hpp
#ifndef SHARE_VM_SERVICES_ALLOCATION_CONTEXT_SERVICE_HPP
#define SHARE_VM_SERVICES_ALLOCATION_CONTEXT_SERVICE_HPP
#include "utilities/exceptions.hpp"
class AllocationContextService: public AllStatic {
public:
static inline bool should_notify();
static inline void notify(TRAPS);
};
bool AllocationContextService::should_notify() { return false; }
void AllocationContextService::notify(TRAPS) { }
#endif // SHARE_VM_SERVICES_ALLOCATION_CONTEXT_SERVICE_HPP
sssssss80
最新推荐文章于 2024-08-02 17:52:30 发布