33 #include "gc/shared/gcTimer.hpp"
34 #include "gc/shared/gcTrace.hpp"
35 #include "gc/shared/gcTraceTime.inline.hpp"
36 #include "gc/shared/genCollectedHeap.hpp"
37 #include "gc/shared/genOopClosures.inline.hpp"
38 #include "gc/shared/generationSpec.hpp"
39 #include "gc/shared/preservedMarks.inline.hpp"
40 #include "gc/shared/referencePolicy.hpp"
41 #include "gc/shared/space.inline.hpp"
42 #include "gc/shared/spaceDecorator.hpp"
43 #include "gc/shared/strongRootsScope.hpp"
44 #include "logging/log.hpp"
45 #include "memory/iterator.hpp"
46 #include "memory/resourceArea.hpp"
47 #include "oops/instanceRefKlass.hpp"
48 #include "oops/oop.inline.hpp"
49 #include "runtime/atomic.hpp"
50 #include "runtime/java.hpp"
51 #include "runtime/prefetch.inline.hpp"
52 #include "runtime/thread.inline.hpp"
53 #include "utilities/copy.hpp"
54 #include "utilities/globalDefinitions.hpp"
55 #include "utilities/stack.inline.hpp"
56 #if INCLUDE_ALL_GCS
57 #include "gc/cms/parOopClosures.hpp"
58 #endif
59
60 //
61 // DefNewGeneration functions.
62
63 // Methods of protected closure types.
64
65 DefNewGeneration::IsAliveClosure::IsAliveClosure(Generation* young_gen) : _young_gen(young_gen) {
66 assert(_young_gen->kind() == Generation::ParNew ||
67 _young_gen->kind() == Generation::DefNew, "Expected the young generation here");
68 }
69
70 bool DefNewGeneration::IsAliveClosure::do_object_b(oop p) {
71 return (HeapWord*)p >= _young_gen->reserved().end() || p->is_forwarded();
72 }
|
33 #include "gc/shared/gcTimer.hpp"
34 #include "gc/shared/gcTrace.hpp"
35 #include "gc/shared/gcTraceTime.inline.hpp"
36 #include "gc/shared/genCollectedHeap.hpp"
37 #include "gc/shared/genOopClosures.inline.hpp"
38 #include "gc/shared/generationSpec.hpp"
39 #include "gc/shared/preservedMarks.inline.hpp"
40 #include "gc/shared/referencePolicy.hpp"
41 #include "gc/shared/space.inline.hpp"
42 #include "gc/shared/spaceDecorator.hpp"
43 #include "gc/shared/strongRootsScope.hpp"
44 #include "logging/log.hpp"
45 #include "memory/iterator.hpp"
46 #include "memory/resourceArea.hpp"
47 #include "oops/instanceRefKlass.hpp"
48 #include "oops/oop.inline.hpp"
49 #include "runtime/atomic.hpp"
50 #include "runtime/java.hpp"
51 #include "runtime/prefetch.inline.hpp"
52 #include "runtime/thread.inline.hpp"
53 #include "utilities/align.hpp"
54 #include "utilities/copy.hpp"
55 #include "utilities/globalDefinitions.hpp"
56 #include "utilities/stack.inline.hpp"
57 #if INCLUDE_ALL_GCS
58 #include "gc/cms/parOopClosures.hpp"
59 #endif
60
61 //
62 // DefNewGeneration functions.
63
64 // Methods of protected closure types.
65
66 DefNewGeneration::IsAliveClosure::IsAliveClosure(Generation* young_gen) : _young_gen(young_gen) {
67 assert(_young_gen->kind() == Generation::ParNew ||
68 _young_gen->kind() == Generation::DefNew, "Expected the young generation here");
69 }
70
71 bool DefNewGeneration::IsAliveClosure::do_object_b(oop p) {
72 return (HeapWord*)p >= _young_gen->reserved().end() || p->is_forwarded();
73 }
|