comparison src/share/vm/code/debugInfoRec.cpp @ 22298:c28cb37b2e1d

Rename JVMCI to INCLUDE_JVMCI.
author twisti
date Wed, 22 Jul 2015 08:56:03 -0700
parents be896a1983c0
children f39ccee58e7a
comparison
equal deleted inserted replaced
22297:571202729bbf 22298:c28cb37b2e1d
35 class DIR_Chunk { 35 class DIR_Chunk {
36 friend class DebugInformationRecorder; 36 friend class DebugInformationRecorder;
37 int _offset; // location in the stream of this scope 37 int _offset; // location in the stream of this scope
38 int _length; // number of bytes in the stream 38 int _length; // number of bytes in the stream
39 int _hash; // hash of stream bytes (for quicker reuse) 39 int _hash; // hash of stream bytes (for quicker reuse)
40 #ifdef JVMCI 40 #if INCLUDE_JVMCI
41 DebugInformationRecorder* _DIR; 41 DebugInformationRecorder* _DIR;
42 #endif 42 #endif
43 43
44 void* operator new(size_t ignore, DebugInformationRecorder* dir) throw() { 44 void* operator new(size_t ignore, DebugInformationRecorder* dir) throw() {
45 assert(ignore == sizeof(DIR_Chunk), ""); 45 assert(ignore == sizeof(DIR_Chunk), "");
52 } 52 }
53 53
54 DIR_Chunk(int offset, int length, DebugInformationRecorder* dir) { 54 DIR_Chunk(int offset, int length, DebugInformationRecorder* dir) {
55 _offset = offset; 55 _offset = offset;
56 _length = length; 56 _length = length;
57 #ifdef JVMCI 57 #if INCLUDE_JVMCI
58 _DIR = dir; 58 _DIR = dir;
59 #endif 59 #endif
60 unsigned int hash = 0; 60 unsigned int hash = 0;
61 address p = dir->stream()->buffer() + _offset; 61 address p = dir->stream()->buffer() + _offset;
62 for (int i = 0; i < length; i++) { 62 for (int i = 0; i < length; i++) {
82 } 82 }
83 } 83 }
84 return NULL; 84 return NULL;
85 } 85 }
86 86
87 #ifdef JVMCI 87 #if INCLUDE_JVMCI
88 static int compare(DIR_Chunk* a, DIR_Chunk* b) { 88 static int compare(DIR_Chunk* a, DIR_Chunk* b) {
89 if (b->_hash > a->_hash) { 89 if (b->_hash > a->_hash) {
90 return 1; 90 return 1;
91 } 91 }
92 if (b->_hash < a->_hash) { 92 if (b->_hash < a->_hash) {
136 assert(_stream->position() > serialized_null, "sanity"); 136 assert(_stream->position() > serialized_null, "sanity");
137 137
138 _oop_recorder = oop_recorder; 138 _oop_recorder = oop_recorder;
139 139
140 _all_chunks = new GrowableArray<DIR_Chunk*>(300); 140 _all_chunks = new GrowableArray<DIR_Chunk*>(300);
141 #ifndef JVMCI 141 #if !INCLUDE_JVMCI
142 _shared_chunks = new GrowableArray<DIR_Chunk*>(30); 142 _shared_chunks = new GrowableArray<DIR_Chunk*>(30);
143 #endif 143 #endif
144 _next_chunk = _next_chunk_limit = NULL; 144 _next_chunk = _next_chunk_limit = NULL;
145 145
146 add_new_pc_offset(PcDesc::lower_offset_limit); // sentinel record 146 add_new_pc_offset(PcDesc::lower_offset_limit); // sentinel record
275 assert(stream_offset != serialized_null, "should not be null"); 275 assert(stream_offset != serialized_null, "should not be null");
276 assert(stream_length != 0, "should not be empty"); 276 assert(stream_length != 0, "should not be empty");
277 277
278 DIR_Chunk* ns = new(this) DIR_Chunk(stream_offset, stream_length, this); 278 DIR_Chunk* ns = new(this) DIR_Chunk(stream_offset, stream_length, this);
279 279
280 #ifdef JVMCI 280 #if INCLUDE_JVMCI
281 DIR_Chunk* match = _all_chunks->find_insert_binary<DIR_Chunk::compare>(ns); 281 DIR_Chunk* match = _all_chunks->find_insert_binary<DIR_Chunk::compare>(ns);
282 if (match != ns) { 282 if (match != ns) {
283 // Found an existing chunk 283 // Found an existing chunk
284 NOT_PRODUCT(++dir_stats.chunks_shared); 284 NOT_PRODUCT(++dir_stats.chunks_shared);
285 assert(ns+1 == _next_chunk, ""); 285 assert(ns+1 == _next_chunk, "");