From 4bc206a1b19a4c4b85e1cecd0f779daa398cdb2d Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Mon, 30 Nov 2015 15:21:25 -0800 Subject: [PATCH] 8142333: Build failure in debugInfoRec.cpp with SS12u4 Reviewed-by: coleenp, dholmes, erikj, kvn --- hotspot/src/share/vm/code/debugInfoRec.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hotspot/src/share/vm/code/debugInfoRec.cpp b/hotspot/src/share/vm/code/debugInfoRec.cpp index e82d9801d12..36c35a92f55 100644 --- a/hotspot/src/share/vm/code/debugInfoRec.cpp +++ b/hotspot/src/share/vm/code/debugInfoRec.cpp @@ -33,7 +33,7 @@ // We keep track of these chunks in order to detect // repetition and enable sharing. class DIR_Chunk { - friend class DebugInformationRecorder; +private: 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) @@ -41,6 +41,9 @@ class DIR_Chunk { DebugInformationRecorder* _DIR; #endif +public: + int offset() { return _offset; } + void* operator new(size_t ignore, DebugInformationRecorder* dir) throw() { assert(ignore == sizeof(DIR_Chunk), ""); if (dir->_next_chunk >= dir->_next_chunk_limit) { @@ -284,7 +287,7 @@ int DebugInformationRecorder::find_sharable_decode_offset(int stream_offset) { NOT_PRODUCT(++dir_stats.chunks_shared); assert(ns+1 == _next_chunk, ""); _next_chunk = ns; - return match->_offset; + return match->offset(); } else { // Inserted this chunk, so nothing to do return serialized_null; @@ -296,7 +299,7 @@ int DebugInformationRecorder::find_sharable_decode_offset(int stream_offset) { NOT_PRODUCT(++dir_stats.chunks_reshared); assert(ns+1 == _next_chunk, ""); _next_chunk = ns; - return ms->_offset; + return ms->offset(); } // Look in recently encountered scopes next: @@ -311,7 +314,7 @@ int DebugInformationRecorder::find_sharable_decode_offset(int stream_offset) { _shared_chunks->append(ms); assert(ns+1 == _next_chunk, ""); _next_chunk = ns; - return ms->_offset; + return ms->offset(); } // No match. Add this guy to the list, in hopes of future shares.