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