Mercurial > hg > truffle
comparison src/share/vm/oops/klass.hpp @ 20375:6e0cb14ce59b
8046070: Class Data Sharing clean up and refactoring
Summary: Cleaned up CDS to be more configurable, maintainable and extensible
Reviewed-by: dholmes, coleenp, acorn, mchung
author | iklam |
---|---|
date | Thu, 21 Aug 2014 13:57:51 -0700 |
parents | 2c6ef90f030a |
children | 8cb56c8cb30d |
comparison
equal
deleted
inserted
replaced
20374:999824269b71 | 20375:6e0cb14ce59b |
---|---|
173 | 173 |
174 // Remembered sets support for the oops in the klasses. | 174 // Remembered sets support for the oops in the klasses. |
175 jbyte _modified_oops; // Card Table Equivalent (YC/CMS support) | 175 jbyte _modified_oops; // Card Table Equivalent (YC/CMS support) |
176 jbyte _accumulated_modified_oops; // Mod Union Equivalent (CMS support) | 176 jbyte _accumulated_modified_oops; // Mod Union Equivalent (CMS support) |
177 | 177 |
178 private: | |
179 // This is an index into FileMapHeader::_classpath_entry_table[], to | |
180 // associate this class with the JAR file where it's loaded from during | |
181 // dump time. If a class is not loaded from the shared archive, this field is | |
182 // -1. | |
183 jshort _shared_class_path_index; | |
184 | |
185 friend class SharedClassUtil; | |
186 protected: | |
187 | |
178 // Constructor | 188 // Constructor |
179 Klass(); | 189 Klass(); |
180 | 190 |
181 void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw(); | 191 void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw(); |
182 | 192 |
278 bool has_modified_oops() { return _modified_oops == 1; } | 288 bool has_modified_oops() { return _modified_oops == 1; } |
279 | 289 |
280 void accumulate_modified_oops() { if (has_modified_oops()) _accumulated_modified_oops = 1; } | 290 void accumulate_modified_oops() { if (has_modified_oops()) _accumulated_modified_oops = 1; } |
281 void clear_accumulated_modified_oops() { _accumulated_modified_oops = 0; } | 291 void clear_accumulated_modified_oops() { _accumulated_modified_oops = 0; } |
282 bool has_accumulated_modified_oops() { return _accumulated_modified_oops == 1; } | 292 bool has_accumulated_modified_oops() { return _accumulated_modified_oops == 1; } |
293 | |
294 int shared_classpath_index() const { | |
295 return _shared_class_path_index; | |
296 }; | |
297 | |
298 void set_shared_classpath_index(int index) { | |
299 _shared_class_path_index = index; | |
300 }; | |
301 | |
283 | 302 |
284 protected: // internal accessors | 303 protected: // internal accessors |
285 Klass* subklass_oop() const { return _subklass; } | 304 Klass* subklass_oop() const { return _subklass; } |
286 Klass* next_sibling_oop() const { return _next_sibling; } | 305 Klass* next_sibling_oop() const { return _next_sibling; } |
287 void set_subklass(Klass* s); | 306 void set_subklass(Klass* s); |
450 virtual Klass* array_klass_impl(bool or_null, TRAPS); | 469 virtual Klass* array_klass_impl(bool or_null, TRAPS); |
451 | 470 |
452 public: | 471 public: |
453 // CDS support - remove and restore oops from metadata. Oops are not shared. | 472 // CDS support - remove and restore oops from metadata. Oops are not shared. |
454 virtual void remove_unshareable_info(); | 473 virtual void remove_unshareable_info(); |
455 virtual void restore_unshareable_info(TRAPS); | 474 virtual void restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, TRAPS); |
456 | 475 |
457 protected: | 476 protected: |
458 // computes the subtype relationship | 477 // computes the subtype relationship |
459 virtual bool compute_is_subtype_of(Klass* k); | 478 virtual bool compute_is_subtype_of(Klass* k); |
460 public: | 479 public: |