# HG changeset patch # User never # Date 1463013803 25200 # Node ID e8a403dd5a7db5459ce28e97359eec51760ada71 # Parent 06ddaebd2564c3c6f79d1998add0bc455eddeac7 8137296: [JVMCI] Enable sharing of debug info by default in all configurations Reviewed-by: kvn, twisti diff -r 06ddaebd2564 -r e8a403dd5a7d hotspot/src/share/vm/code/debugInfoRec.cpp --- a/hotspot/src/share/vm/code/debugInfoRec.cpp Wed May 11 20:27:17 2016 +0000 +++ b/hotspot/src/share/vm/code/debugInfoRec.cpp Wed May 11 17:43:23 2016 -0700 @@ -37,9 +37,7 @@ int _offset; // location in the stream of this scope int _length; // number of bytes in the stream int _hash; // hash of stream bytes (for quicker reuse) -#if INCLUDE_JVMCI DebugInformationRecorder* _DIR; -#endif public: int offset() { return _offset; } @@ -57,9 +55,7 @@ DIR_Chunk(int offset, int length, DebugInformationRecorder* dir) { _offset = offset; _length = length; -#if INCLUDE_JVMCI _DIR = dir; -#endif unsigned int hash = 0; address p = dir->stream()->buffer() + _offset; for (int i = 0; i < length; i++) { @@ -87,7 +83,6 @@ return NULL; } -#if INCLUDE_JVMCI static int compare(DIR_Chunk* const & a, DIR_Chunk* const & b) { if (b->_hash > a->_hash) { return 1; @@ -104,7 +99,6 @@ address buf = a->_DIR->stream()->buffer(); return memcmp(buf + b->_offset, buf + a->_offset, a->_length); } -#endif }; static inline bool compute_recording_non_safepoints() { @@ -141,9 +135,6 @@ _oop_recorder = oop_recorder; _all_chunks = new GrowableArray(300); -#if !INCLUDE_JVMCI - _shared_chunks = new GrowableArray(30); -#endif _next_chunk = _next_chunk_limit = NULL; add_new_pc_offset(PcDesc::lower_offset_limit); // sentinel record @@ -265,14 +256,6 @@ int DebugInformationRecorder::find_sharable_decode_offset(int stream_offset) { -#if !INCLUDE_JVMCI - // Only pull this trick if non-safepoint recording - // is enabled, for now. - if (!recording_non_safepoints()) { - return serialized_null; - } -#endif // INCLUDE_JVMCI - NOT_PRODUCT(++dir_stats.chunks_queried); int stream_length = stream()->position() - stream_offset; assert(stream_offset != serialized_null, "should not be null"); @@ -280,7 +263,6 @@ DIR_Chunk* ns = new(this) DIR_Chunk(stream_offset, stream_length, this); -#if INCLUDE_JVMCI DIR_Chunk* match = _all_chunks->insert_sorted(ns); if (match != ns) { // Found an existing chunk @@ -292,35 +274,6 @@ // Inserted this chunk, so nothing to do return serialized_null; } -#else // INCLUDE_JVMCI - // Look in previously shared scopes first: - DIR_Chunk* ms = ns->find_match(_shared_chunks, 0, this); - if (ms != NULL) { - NOT_PRODUCT(++dir_stats.chunks_reshared); - assert(ns+1 == _next_chunk, ""); - _next_chunk = ns; - return ms->offset(); - } - - // Look in recently encountered scopes next: - const int MAX_RECENT = 50; - int start_index = _all_chunks->length() - MAX_RECENT; - if (start_index < 0) start_index = 0; - ms = ns->find_match(_all_chunks, start_index, this); - if (ms != NULL) { - NOT_PRODUCT(++dir_stats.chunks_shared); - // Searching in _all_chunks is limited to a window, - // but searching in _shared_chunks is unlimited. - _shared_chunks->append(ms); - assert(ns+1 == _next_chunk, ""); - _next_chunk = ns; - return ms->offset(); - } - - // No match. Add this guy to the list, in hopes of future shares. - _all_chunks->append(ns); - return serialized_null; -#endif // INCLUDE_JVMCI } diff -r 06ddaebd2564 -r e8a403dd5a7d hotspot/src/share/vm/code/debugInfoRec.hpp --- a/hotspot/src/share/vm/code/debugInfoRec.hpp Wed May 11 20:27:17 2016 +0000 +++ b/hotspot/src/share/vm/code/debugInfoRec.hpp Wed May 11 17:43:23 2016 -0700 @@ -167,9 +167,6 @@ // Scopes that have been described so far. GrowableArray* _all_chunks; -#if !INCLUDE_JVMCI - GrowableArray* _shared_chunks; -#endif DIR_Chunk* _next_chunk; DIR_Chunk* _next_chunk_limit;