comparison src/share/vm/oops/klassKlass.cpp @ 4979:18a5539bf19b

More diff vs hsx24 optimizations.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 27 Feb 2012 21:43:51 +0100
parents 75a99b4f1c98
children fdd9dd4508fa
comparison
equal deleted inserted replaced
4978:99d3d8a72252 4979:18a5539bf19b
71 for (juint i = 0; i < Klass::primary_super_limit(); i++) 71 for (juint i = 0; i < Klass::primary_super_limit(); i++)
72 MarkSweep::mark_and_push(k->adr_primary_supers()+i); 72 MarkSweep::mark_and_push(k->adr_primary_supers()+i);
73 MarkSweep::mark_and_push(k->adr_secondary_super_cache()); 73 MarkSweep::mark_and_push(k->adr_secondary_super_cache());
74 MarkSweep::mark_and_push(k->adr_secondary_supers()); 74 MarkSweep::mark_and_push(k->adr_secondary_supers());
75 MarkSweep::mark_and_push(k->adr_java_mirror()); 75 MarkSweep::mark_and_push(k->adr_java_mirror());
76 #ifdef GRAAL
76 MarkSweep::mark_and_push(k->adr_graal_mirror()); 77 MarkSweep::mark_and_push(k->adr_graal_mirror());
78 #endif
77 // We follow the subklass and sibling links at the end of the 79 // We follow the subklass and sibling links at the end of the
78 // marking phase, since otherwise following them will prevent 80 // marking phase, since otherwise following them will prevent
79 // class unloading (all classes are transitively linked from 81 // class unloading (all classes are transitively linked from
80 // java.lang.Object). 82 // java.lang.Object).
81 MarkSweep::revisit_weak_klass_link(k); 83 MarkSweep::revisit_weak_klass_link(k);
91 for (juint i = 0; i < Klass::primary_super_limit(); i++) 93 for (juint i = 0; i < Klass::primary_super_limit(); i++)
92 PSParallelCompact::mark_and_push(cm, k->adr_primary_supers()+i); 94 PSParallelCompact::mark_and_push(cm, k->adr_primary_supers()+i);
93 PSParallelCompact::mark_and_push(cm, k->adr_secondary_super_cache()); 95 PSParallelCompact::mark_and_push(cm, k->adr_secondary_super_cache());
94 PSParallelCompact::mark_and_push(cm, k->adr_secondary_supers()); 96 PSParallelCompact::mark_and_push(cm, k->adr_secondary_supers());
95 PSParallelCompact::mark_and_push(cm, k->adr_java_mirror()); 97 PSParallelCompact::mark_and_push(cm, k->adr_java_mirror());
98 #ifdef GRAAL
96 PSParallelCompact::mark_and_push(cm, k->adr_graal_mirror()); 99 PSParallelCompact::mark_and_push(cm, k->adr_graal_mirror());
100 #endif
97 // We follow the subklass and sibling links at the end of the 101 // We follow the subklass and sibling links at the end of the
98 // marking phase, since otherwise following them will prevent 102 // marking phase, since otherwise following them will prevent
99 // class unloading (all classes are transitively linked from 103 // class unloading (all classes are transitively linked from
100 // java.lang.Object). 104 // java.lang.Object).
101 PSParallelCompact::revisit_weak_klass_link(cm, k); 105 PSParallelCompact::revisit_weak_klass_link(cm, k);
111 for (juint i = 0; i < Klass::primary_super_limit(); i++) 115 for (juint i = 0; i < Klass::primary_super_limit(); i++)
112 blk->do_oop(k->adr_primary_supers()+i); 116 blk->do_oop(k->adr_primary_supers()+i);
113 blk->do_oop(k->adr_secondary_super_cache()); 117 blk->do_oop(k->adr_secondary_super_cache());
114 blk->do_oop(k->adr_secondary_supers()); 118 blk->do_oop(k->adr_secondary_supers());
115 blk->do_oop(k->adr_java_mirror()); 119 blk->do_oop(k->adr_java_mirror());
120 #ifdef GRAAL
116 blk->do_oop(k->adr_graal_mirror()); 121 blk->do_oop(k->adr_graal_mirror());
122 #endif
117 // The following are in the perm gen and are treated 123 // The following are in the perm gen and are treated
118 // specially in a later phase of a perm gen collection; ... 124 // specially in a later phase of a perm gen collection; ...
119 assert(oop(k)->is_perm(), "should be in perm"); 125 assert(oop(k)->is_perm(), "should be in perm");
120 assert(oop(k->subklass())->is_perm_or_null(), "should be in perm"); 126 assert(oop(k->subklass())->is_perm_or_null(), "should be in perm");
121 assert(oop(k->next_sibling())->is_perm_or_null(), "should be in perm"); 127 assert(oop(k->next_sibling())->is_perm_or_null(), "should be in perm");
145 if (mr.contains(adr)) blk->do_oop(adr); 151 if (mr.contains(adr)) blk->do_oop(adr);
146 adr = k->adr_secondary_supers(); 152 adr = k->adr_secondary_supers();
147 if (mr.contains(adr)) blk->do_oop(adr); 153 if (mr.contains(adr)) blk->do_oop(adr);
148 adr = k->adr_java_mirror(); 154 adr = k->adr_java_mirror();
149 if (mr.contains(adr)) blk->do_oop(adr); 155 if (mr.contains(adr)) blk->do_oop(adr);
156 #ifdef GRAAL
150 adr = k->adr_graal_mirror(); 157 adr = k->adr_graal_mirror();
151 if (mr.contains(adr)) blk->do_oop(adr); 158 if (mr.contains(adr)) blk->do_oop(adr);
159 #endif
152 // The following are "weak links" in the perm gen and are 160 // The following are "weak links" in the perm gen and are
153 // treated specially in a later phase of a perm gen collection. 161 // treated specially in a later phase of a perm gen collection.
154 assert(oop(k)->is_perm(), "should be in perm"); 162 assert(oop(k)->is_perm(), "should be in perm");
155 assert(oop(k->adr_subklass())->is_perm(), "should be in perm"); 163 assert(oop(k->adr_subklass())->is_perm(), "should be in perm");
156 assert(oop(k->adr_next_sibling())->is_perm(), "should be in perm"); 164 assert(oop(k->adr_next_sibling())->is_perm(), "should be in perm");
175 for (juint i = 0; i < Klass::primary_super_limit(); i++) 183 for (juint i = 0; i < Klass::primary_super_limit(); i++)
176 MarkSweep::adjust_pointer(k->adr_primary_supers()+i); 184 MarkSweep::adjust_pointer(k->adr_primary_supers()+i);
177 MarkSweep::adjust_pointer(k->adr_secondary_super_cache()); 185 MarkSweep::adjust_pointer(k->adr_secondary_super_cache());
178 MarkSweep::adjust_pointer(k->adr_secondary_supers()); 186 MarkSweep::adjust_pointer(k->adr_secondary_supers());
179 MarkSweep::adjust_pointer(k->adr_java_mirror()); 187 MarkSweep::adjust_pointer(k->adr_java_mirror());
188 #ifdef GRAAL
180 MarkSweep::adjust_pointer(k->adr_graal_mirror()); 189 MarkSweep::adjust_pointer(k->adr_graal_mirror());
190 #endif
181 MarkSweep::adjust_pointer(k->adr_subklass()); 191 MarkSweep::adjust_pointer(k->adr_subklass());
182 MarkSweep::adjust_pointer(k->adr_next_sibling()); 192 MarkSweep::adjust_pointer(k->adr_next_sibling());
183 return size; 193 return size;
184 } 194 }
185 195