Mercurial > hg > graal-compiler
comparison src/share/vm/oops/instanceClassLoaderKlass.cpp @ 8001:db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
Summary: Rename INCLUDE_ALTERNATE_GCS to INCLUDE_ALL_GCS and replace SERIALGC with INCLUDE_ALL_GCS.
Reviewed-by: coleenp, stefank
author | jprovino |
---|---|
date | Wed, 23 Jan 2013 13:02:39 -0500 |
parents | aed758eda82a |
children | ad72068ac41e |
comparison
equal
deleted
inserted
replaced
7619:46e60405583b | 8001:db9981fd3124 |
---|---|
34 #include "oops/instanceMirrorKlass.hpp" | 34 #include "oops/instanceMirrorKlass.hpp" |
35 #include "oops/instanceOop.hpp" | 35 #include "oops/instanceOop.hpp" |
36 #include "oops/oop.inline.hpp" | 36 #include "oops/oop.inline.hpp" |
37 #include "oops/symbol.hpp" | 37 #include "oops/symbol.hpp" |
38 #include "runtime/handles.inline.hpp" | 38 #include "runtime/handles.inline.hpp" |
39 #ifndef SERIALGC | 39 #include "utilities/macros.hpp" |
40 #if INCLUDE_ALL_GCS | |
40 #include "gc_implementation/parNew/parOopClosures.inline.hpp" | 41 #include "gc_implementation/parNew/parOopClosures.inline.hpp" |
41 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp" | 42 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp" |
42 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp" | 43 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp" |
43 #include "oops/oop.pcgc.inline.hpp" | 44 #include "oops/oop.pcgc.inline.hpp" |
44 #endif | 45 #endif // INCLUDE_ALL_GCS |
45 | 46 |
46 #define if_do_metadata_checked(closure, nv_suffix) \ | 47 #define if_do_metadata_checked(closure, nv_suffix) \ |
47 /* Make sure the non-virtual and the virtual versions match. */ \ | 48 /* Make sure the non-virtual and the virtual versions match. */ \ |
48 assert(closure->do_metadata##nv_suffix() == closure->do_metadata(), \ | 49 assert(closure->do_metadata##nv_suffix() == closure->do_metadata(), \ |
49 "Inconsistency in do_metadata"); \ | 50 "Inconsistency in do_metadata"); \ |
71 } \ | 72 } \ |
72 \ | 73 \ |
73 return size; \ | 74 return size; \ |
74 } | 75 } |
75 | 76 |
76 #ifndef SERIALGC | 77 #if INCLUDE_ALL_GCS |
77 #define InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \ | 78 #define InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \ |
78 \ | 79 \ |
79 int InstanceClassLoaderKlass:: \ | 80 int InstanceClassLoaderKlass:: \ |
80 oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) { \ | 81 oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) { \ |
81 /* Get size before changing pointers */ \ | 82 /* Get size before changing pointers */ \ |
82 SpecializationStats::record_iterate_call##nv_suffix(SpecializationStats::irk);\ | 83 SpecializationStats::record_iterate_call##nv_suffix(SpecializationStats::irk);\ |
83 int size = InstanceKlass::oop_oop_iterate_backwards##nv_suffix(obj, closure); \ | 84 int size = InstanceKlass::oop_oop_iterate_backwards##nv_suffix(obj, closure); \ |
84 return size; \ | 85 return size; \ |
85 } | 86 } |
86 #endif // !SERIALGC | 87 #endif // INCLUDE_ALL_GCS |
87 | 88 |
88 | 89 |
89 #define InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \ | 90 #define InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \ |
90 \ | 91 \ |
91 int InstanceClassLoaderKlass:: \ | 92 int InstanceClassLoaderKlass:: \ |
109 return size; \ | 110 return size; \ |
110 } | 111 } |
111 | 112 |
112 ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN) | 113 ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN) |
113 ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN) | 114 ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN) |
114 #ifndef SERIALGC | 115 #if INCLUDE_ALL_GCS |
115 ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN) | 116 ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN) |
116 ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN) | 117 ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN) |
117 #endif // SERIALGC | 118 #endif // INCLUDE_ALL_GCS |
118 ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m) | 119 ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m) |
119 ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m) | 120 ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m) |
120 | 121 |
121 void InstanceClassLoaderKlass::oop_follow_contents(oop obj) { | 122 void InstanceClassLoaderKlass::oop_follow_contents(oop obj) { |
122 InstanceKlass::oop_follow_contents(obj); | 123 InstanceKlass::oop_follow_contents(obj); |
127 if(loader_data != NULL) { | 128 if(loader_data != NULL) { |
128 MarkSweep::follow_class_loader(loader_data); | 129 MarkSweep::follow_class_loader(loader_data); |
129 } | 130 } |
130 } | 131 } |
131 | 132 |
132 #ifndef SERIALGC | 133 #if INCLUDE_ALL_GCS |
133 void InstanceClassLoaderKlass::oop_follow_contents(ParCompactionManager* cm, | 134 void InstanceClassLoaderKlass::oop_follow_contents(ParCompactionManager* cm, |
134 oop obj) { | 135 oop obj) { |
135 InstanceKlass::oop_follow_contents(cm, obj); | 136 InstanceKlass::oop_follow_contents(cm, obj); |
136 ClassLoaderData * const loader_data = java_lang_ClassLoader::loader_data(obj); | 137 ClassLoaderData * const loader_data = java_lang_ClassLoader::loader_data(obj); |
137 if (loader_data != NULL) { | 138 if (loader_data != NULL) { |
153 if (loader_data != NULL) { | 154 if (loader_data != NULL) { |
154 PSParallelCompact::adjust_class_loader(cm, loader_data); | 155 PSParallelCompact::adjust_class_loader(cm, loader_data); |
155 } | 156 } |
156 return size_helper(); | 157 return size_helper(); |
157 } | 158 } |
158 #endif // SERIALGC | 159 #endif // INCLUDE_ALL_GCS |
159 | 160 |