src/share/vm/oops/cpCacheOop.hpp

changeset 2533
c5a923563727
parent 2314
f95d63e2154a
child 2534
e5383553fd4e
equal deleted inserted replaced
2532:c798c277ddd1 2533:c5a923563727
319 class constantPoolCacheOopDesc: public oopDesc { 319 class constantPoolCacheOopDesc: public oopDesc {
320 friend class VMStructs; 320 friend class VMStructs;
321 private: 321 private:
322 int _length; 322 int _length;
323 constantPoolOop _constant_pool; // the corresponding constant pool 323 constantPoolOop _constant_pool; // the corresponding constant pool
324 // If true, safe for concurrent GC processing,
325 // Set unconditionally in constantPoolCacheKlass::allocate()
326 volatile bool _is_conc_safe;
327 324
328 // Sizing 325 // Sizing
329 debug_only(friend class ClassVerifier;) 326 debug_only(friend class ClassVerifier;)
330 public: 327 public:
331 int length() const { return _length; } 328 int length() const { return _length; }
388 } 385 }
389 assert(!entry_at(primary_index)->is_secondary_entry(), "only one level of indirection"); 386 assert(!entry_at(primary_index)->is_secondary_entry(), "only one level of indirection");
390 return entry_at(primary_index); 387 return entry_at(primary_index);
391 } 388 }
392 389
393 // GC support
394 // If the _length field has not been set, the size of the
395 // constantPoolCache cannot be correctly calculated.
396 bool is_conc_safe() { return _is_conc_safe; }
397 void set_is_conc_safe(bool v) { _is_conc_safe = v; }
398
399 // Code generation 390 // Code generation
400 static ByteSize base_offset() { return in_ByteSize(sizeof(constantPoolCacheOopDesc)); } 391 static ByteSize base_offset() { return in_ByteSize(sizeof(constantPoolCacheOopDesc)); }
401 static ByteSize entry_offset(int raw_index) { 392 static ByteSize entry_offset(int raw_index) {
402 int index = raw_index; 393 int index = raw_index;
403 if (is_secondary_index(raw_index)) 394 if (is_secondary_index(raw_index))

mercurial