8142333: Build failure in debugInfoRec.cpp with SS12u4

Reviewed-by: coleenp, dholmes, erikj, kvn
This commit is contained in:
Tom Rodriguez 2015-11-30 15:21:25 -08:00
parent bd35ac3342
commit 4bc206a1b1

View File

@ -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.