src/share/vm/oops/methodData.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/oops/methodData.hpp

src/share/vm/oops/methodData.hpp

Print this page
rev 6953 : 8057038: Speculative traps not robust when compilation and class unloading are concurrent
Summary: speculative traps can be removed from MDO while being copied by compiler
Reviewed-by:

*** 2105,2115 **** --- 2105,2120 ---- // Size of _data array in bytes. (Excludes header and extra_data fields.) int _data_size; // data index for the area dedicated to parameters. -1 if no // parameter profiling. + enum { no_parameters = -2, parameters_uninitialized = -1 }; int _parameters_type_data_di; + int parameters_size_in_bytes() const { + ParametersTypeData* param = parameters_type_data(); + return param == NULL ? 0 : param->size_in_bytes(); + } // Beginning of the data entries intptr_t _data[1]; // Helper for size computation
*** 2128,2138 **** // the segment in bytes. int initialize_data(BytecodeStream* stream, int data_index); // Helper for data_at DataLayout* limit_data_position() const { ! return (DataLayout*)((address)data_base() + _data_size); } bool out_of_bounds(int data_index) const { return data_index >= data_size(); } --- 2133,2143 ---- // the segment in bytes. int initialize_data(BytecodeStream* stream, int data_index); // Helper for data_at DataLayout* limit_data_position() const { ! return data_layout_at(_data_size); } bool out_of_bounds(int data_index) const { return data_index >= data_size(); }
*** 2371,2382 **** } // Add a handful of extra data records, for trap tracking. DataLayout* extra_data_base() const { return limit_data_position(); } DataLayout* extra_data_limit() const { return (DataLayout*)((address)this + size_in_bytes()); } ! int extra_data_size() const { return (address)extra_data_limit() ! - (address)extra_data_base(); } static DataLayout* next_extra(DataLayout* dp); // Return (uint)-1 for overflow. uint trap_count(int reason) const { assert((uint)reason < _trap_hist_limit, "oob"); --- 2376,2388 ---- } // Add a handful of extra data records, for trap tracking. DataLayout* extra_data_base() const { return limit_data_position(); } DataLayout* extra_data_limit() const { return (DataLayout*)((address)this + size_in_bytes()); } ! DataLayout* args_data_limit() const { return (DataLayout*)((address)this + size_in_bytes() - ! parameters_size_in_bytes()); } ! int extra_data_size() const { return (address)extra_data_limit() - (address)extra_data_base(); } static DataLayout* next_extra(DataLayout* dp); // Return (uint)-1 for overflow. uint trap_count(int reason) const { assert((uint)reason < _trap_hist_limit, "oob");
*** 2427,2441 **** _tenure_traps += 1; } // Return pointer to area dedicated to parameters in MDO ParametersTypeData* parameters_type_data() const { ! return _parameters_type_data_di != -1 ? data_layout_at(_parameters_type_data_di)->data_in()->as_ParametersTypeData() : NULL; } int parameters_type_data_di() const { ! assert(_parameters_type_data_di != -1, "no args type data"); return _parameters_type_data_di; } // Support for code generation static ByteSize data_offset() { --- 2433,2448 ---- _tenure_traps += 1; } // Return pointer to area dedicated to parameters in MDO ParametersTypeData* parameters_type_data() const { ! assert(_parameters_type_data_di != parameters_uninitialized, "called too early"); ! return _parameters_type_data_di != no_parameters ? data_layout_at(_parameters_type_data_di)->data_in()->as_ParametersTypeData() : NULL; } int parameters_type_data_di() const { ! assert(_parameters_type_data_di != parameters_uninitialized && _parameters_type_data_di != no_parameters, "no args type data"); return _parameters_type_data_di; } // Support for code generation static ByteSize data_offset() {
*** 2478,2487 **** static bool profile_return(); static bool profile_parameters(); static bool profile_return_jsr292_only(); void clean_method_data(BoolObjectClosure* is_alive); - void clean_weak_method_links(); }; #endif // SHARE_VM_OOPS_METHODDATAOOP_HPP --- 2485,2494 ---- static bool profile_return(); static bool profile_parameters(); static bool profile_return_jsr292_only(); void clean_method_data(BoolObjectClosure* is_alive); void clean_weak_method_links(); + Mutex* extra_data_lock() { return &_extra_data_lock; } }; #endif // SHARE_VM_OOPS_METHODDATAOOP_HPP
src/share/vm/oops/methodData.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File