Mercurial > hg > graal-compiler
comparison src/share/vm/oops/objArrayKlass.cpp @ 8002:8391fdd36e1f
Merge
author | dlong |
---|---|
date | Sun, 27 Jan 2013 01:07:09 -0800 |
parents | db9981fd3124 |
children | e0c9a1d29eb4 |
comparison
equal
deleted
inserted
replaced
7946:6fbe8a57549d | 8002:8391fdd36e1f |
---|---|
41 #include "oops/oop.inline2.hpp" | 41 #include "oops/oop.inline2.hpp" |
42 #include "oops/symbol.hpp" | 42 #include "oops/symbol.hpp" |
43 #include "runtime/handles.inline.hpp" | 43 #include "runtime/handles.inline.hpp" |
44 #include "runtime/mutexLocker.hpp" | 44 #include "runtime/mutexLocker.hpp" |
45 #include "utilities/copy.hpp" | 45 #include "utilities/copy.hpp" |
46 #ifndef SERIALGC | 46 #include "utilities/macros.hpp" |
47 #if INCLUDE_ALL_GCS | |
47 #include "gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp" | 48 #include "gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp" |
48 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" | 49 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" |
49 #include "gc_implementation/g1/g1OopClosures.inline.hpp" | 50 #include "gc_implementation/g1/g1OopClosures.inline.hpp" |
50 #include "gc_implementation/g1/g1RemSet.inline.hpp" | 51 #include "gc_implementation/g1/g1RemSet.inline.hpp" |
51 #include "gc_implementation/g1/heapRegionSeq.inline.hpp" | 52 #include "gc_implementation/g1/heapRegionSeq.inline.hpp" |
52 #include "gc_implementation/parNew/parOopClosures.inline.hpp" | 53 #include "gc_implementation/parNew/parOopClosures.inline.hpp" |
53 #include "gc_implementation/parallelScavenge/psCompactionManager.hpp" | 54 #include "gc_implementation/parallelScavenge/psCompactionManager.hpp" |
54 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp" | 55 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp" |
55 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp" | 56 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp" |
56 #include "oops/oop.pcgc.inline.hpp" | 57 #include "oops/oop.pcgc.inline.hpp" |
57 #endif | 58 #endif // INCLUDE_ALL_GCS |
58 | 59 |
59 ObjArrayKlass* ObjArrayKlass::allocate(ClassLoaderData* loader_data, int n, KlassHandle klass_handle, Symbol* name, TRAPS) { | 60 ObjArrayKlass* ObjArrayKlass::allocate(ClassLoaderData* loader_data, int n, KlassHandle klass_handle, Symbol* name, TRAPS) { |
60 assert(ObjArrayKlass::header_size() <= InstanceKlass::header_size(), | 61 assert(ObjArrayKlass::header_size() <= InstanceKlass::header_size(), |
61 "array klasses must be same size as InstanceKlass"); | 62 "array klasses must be same size as InstanceKlass"); |
62 | 63 |
459 } else { | 460 } else { |
460 objarray_follow_contents<oop>(obj, 0); | 461 objarray_follow_contents<oop>(obj, 0); |
461 } | 462 } |
462 } | 463 } |
463 | 464 |
464 #ifndef SERIALGC | 465 #if INCLUDE_ALL_GCS |
465 void ObjArrayKlass::oop_follow_contents(ParCompactionManager* cm, | 466 void ObjArrayKlass::oop_follow_contents(ParCompactionManager* cm, |
466 oop obj) { | 467 oop obj) { |
467 assert(obj->is_array(), "obj must be array"); | 468 assert(obj->is_array(), "obj must be array"); |
468 PSParallelCompact::follow_klass(cm, obj->klass()); | 469 PSParallelCompact::follow_klass(cm, obj->klass()); |
469 if (UseCompressedOops) { | 470 if (UseCompressedOops) { |
470 objarray_follow_contents<narrowOop>(cm, obj, 0); | 471 objarray_follow_contents<narrowOop>(cm, obj, 0); |
471 } else { | 472 } else { |
472 objarray_follow_contents<oop>(cm, obj, 0); | 473 objarray_follow_contents<oop>(cm, obj, 0); |
473 } | 474 } |
474 } | 475 } |
475 #endif // SERIALGC | 476 #endif // INCLUDE_ALL_GCS |
476 | 477 |
477 #define if_do_metadata_checked(closure, nv_suffix) \ | 478 #define if_do_metadata_checked(closure, nv_suffix) \ |
478 /* Make sure the non-virtual and the virtual versions match. */ \ | 479 /* Make sure the non-virtual and the virtual versions match. */ \ |
479 assert(closure->do_metadata##nv_suffix() == closure->do_metadata(), \ | 480 assert(closure->do_metadata##nv_suffix() == closure->do_metadata(), \ |
480 "Inconsistency in do_metadata"); \ | 481 "Inconsistency in do_metadata"); \ |
571 MarkSweep::adjust_klass(a->klass()); | 572 MarkSweep::adjust_klass(a->klass()); |
572 ObjArrayKlass_OOP_ITERATE(a, p, MarkSweep::adjust_pointer(p)) | 573 ObjArrayKlass_OOP_ITERATE(a, p, MarkSweep::adjust_pointer(p)) |
573 return size; | 574 return size; |
574 } | 575 } |
575 | 576 |
576 #ifndef SERIALGC | 577 #if INCLUDE_ALL_GCS |
577 void ObjArrayKlass::oop_push_contents(PSPromotionManager* pm, oop obj) { | 578 void ObjArrayKlass::oop_push_contents(PSPromotionManager* pm, oop obj) { |
578 assert(obj->is_objArray(), "obj must be obj array"); | 579 assert(obj->is_objArray(), "obj must be obj array"); |
579 ObjArrayKlass_OOP_ITERATE( \ | 580 ObjArrayKlass_OOP_ITERATE( \ |
580 objArrayOop(obj), p, \ | 581 objArrayOop(obj), p, \ |
581 if (PSScavenge::should_scavenge(p)) { \ | 582 if (PSScavenge::should_scavenge(p)) { \ |
589 int size = a->object_size(); | 590 int size = a->object_size(); |
590 a->update_header(cm); | 591 a->update_header(cm); |
591 ObjArrayKlass_OOP_ITERATE(a, p, PSParallelCompact::adjust_pointer(p)) | 592 ObjArrayKlass_OOP_ITERATE(a, p, PSParallelCompact::adjust_pointer(p)) |
592 return size; | 593 return size; |
593 } | 594 } |
594 #endif // SERIALGC | 595 #endif // INCLUDE_ALL_GCS |
595 | 596 |
596 // JVM support | 597 // JVM support |
597 | 598 |
598 jint ObjArrayKlass::compute_modifier_flags(TRAPS) const { | 599 jint ObjArrayKlass::compute_modifier_flags(TRAPS) const { |
599 // The modifier for an objectArray is the same as its element | 600 // The modifier for an objectArray is the same as its element |