Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/methodDataKlass.cpp @ 4439:f7251c729b31
profiling info first try
author | Christian Haeubl <christian.haeubl@oracle.com> |
---|---|
date | Thu, 19 Jan 2012 16:29:35 -0800 |
parents | e5383553fd4e |
children | 59d3d0b80975 |
comparison
equal
deleted
inserted
replaced
4288:2bc254976621 | 4439:f7251c729b31 |
---|---|
82 assert (obj->is_methodData(), "object must be method data"); | 82 assert (obj->is_methodData(), "object must be method data"); |
83 methodDataOop m = methodDataOop(obj); | 83 methodDataOop m = methodDataOop(obj); |
84 | 84 |
85 obj->follow_header(); | 85 obj->follow_header(); |
86 MarkSweep::mark_and_push(m->adr_method()); | 86 MarkSweep::mark_and_push(m->adr_method()); |
87 MarkSweep::mark_and_push(m->adr_graal_mirror()); | |
87 ResourceMark rm; | 88 ResourceMark rm; |
88 for (ProfileData* data = m->first_data(); | 89 for (ProfileData* data = m->first_data(); |
89 m->is_valid(data); | 90 m->is_valid(data); |
90 data = m->next_data(data)) { | 91 data = m->next_data(data)) { |
91 data->follow_contents(); | 92 data->follow_contents(); |
98 assert (obj->is_methodData(), "object must be method data"); | 99 assert (obj->is_methodData(), "object must be method data"); |
99 methodDataOop m = methodDataOop(obj); | 100 methodDataOop m = methodDataOop(obj); |
100 | 101 |
101 obj->follow_header(cm); | 102 obj->follow_header(cm); |
102 PSParallelCompact::mark_and_push(cm, m->adr_method()); | 103 PSParallelCompact::mark_and_push(cm, m->adr_method()); |
104 PSParallelCompact::mark_and_push(cm, m->adr_graal_mirror()); | |
103 ResourceMark rm; | 105 ResourceMark rm; |
104 for (ProfileData* data = m->first_data(); | 106 for (ProfileData* data = m->first_data(); |
105 m->is_valid(data); | 107 m->is_valid(data); |
106 data = m->next_data(data)) { | 108 data = m->next_data(data)) { |
107 data->follow_contents(cm); | 109 data->follow_contents(cm); |
117 // Don't call size() or oop_size() since that is a virtual call. | 119 // Don't call size() or oop_size() since that is a virtual call. |
118 int size = m->object_size(); | 120 int size = m->object_size(); |
119 | 121 |
120 obj->oop_iterate_header(blk); | 122 obj->oop_iterate_header(blk); |
121 blk->do_oop(m->adr_method()); | 123 blk->do_oop(m->adr_method()); |
124 blk->do_oop(m->adr_graal_mirror()); | |
122 ResourceMark rm; | 125 ResourceMark rm; |
123 for (ProfileData* data = m->first_data(); | 126 for (ProfileData* data = m->first_data(); |
124 m->is_valid(data); | 127 m->is_valid(data); |
125 data = m->next_data(data)) { | 128 data = m->next_data(data)) { |
126 data->oop_iterate(blk); | 129 data->oop_iterate(blk); |
138 obj->oop_iterate_header(blk, mr); | 141 obj->oop_iterate_header(blk, mr); |
139 oop* adr = m->adr_method(); | 142 oop* adr = m->adr_method(); |
140 if (mr.contains(adr)) { | 143 if (mr.contains(adr)) { |
141 blk->do_oop(m->adr_method()); | 144 blk->do_oop(m->adr_method()); |
142 } | 145 } |
146 adr = m->adr_graal_mirror(); | |
147 if(mr.contains(adr)) { | |
148 blk->do_oop(m->adr_graal_mirror()); | |
149 } | |
150 | |
143 ResourceMark rm; | 151 ResourceMark rm; |
144 for (ProfileData* data = m->first_data(); | 152 for (ProfileData* data = m->first_data(); |
145 m->is_valid(data); | 153 m->is_valid(data); |
146 data = m->next_data(data)) { | 154 data = m->next_data(data)) { |
147 data->oop_iterate_m(blk, mr); | 155 data->oop_iterate_m(blk, mr); |
156 // Don't call size() or oop_size() since that is a virtual call. | 164 // Don't call size() or oop_size() since that is a virtual call. |
157 int size = m->object_size(); | 165 int size = m->object_size(); |
158 | 166 |
159 obj->adjust_header(); | 167 obj->adjust_header(); |
160 MarkSweep::adjust_pointer(m->adr_method()); | 168 MarkSweep::adjust_pointer(m->adr_method()); |
169 MarkSweep::adjust_pointer(m->adr_graal_mirror()); | |
161 ResourceMark rm; | 170 ResourceMark rm; |
162 ProfileData* data; | 171 ProfileData* data; |
163 for (data = m->first_data(); m->is_valid(data); data = m->next_data(data)) { | 172 for (data = m->first_data(); m->is_valid(data); data = m->next_data(data)) { |
164 data->adjust_pointers(); | 173 data->adjust_pointers(); |
165 } | 174 } |
171 void methodDataKlass::oop_push_contents(PSPromotionManager* pm, oop obj) { | 180 void methodDataKlass::oop_push_contents(PSPromotionManager* pm, oop obj) { |
172 assert (obj->is_methodData(), "object must be method data"); | 181 assert (obj->is_methodData(), "object must be method data"); |
173 methodDataOop m = methodDataOop(obj); | 182 methodDataOop m = methodDataOop(obj); |
174 // This should never point into the young gen. | 183 // This should never point into the young gen. |
175 assert(!PSScavenge::should_scavenge(m->adr_method()), "Sanity"); | 184 assert(!PSScavenge::should_scavenge(m->adr_method()), "Sanity"); |
185 | |
186 oop* adr = m->adr_graal_mirror(); | |
187 if(PSScavenge::should_scavenge(adr)) { | |
188 pm->claim_or_forward_depth(adr); | |
189 } | |
176 } | 190 } |
177 | 191 |
178 int methodDataKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) { | 192 int methodDataKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) { |
179 assert(obj->is_methodData(), "should be method data"); | 193 assert(obj->is_methodData(), "should be method data"); |
180 methodDataOop m = methodDataOop(obj); | 194 methodDataOop m = methodDataOop(obj); |
181 | 195 |
182 PSParallelCompact::adjust_pointer(m->adr_method()); | 196 PSParallelCompact::adjust_pointer(m->adr_method()); |
197 PSParallelCompact::adjust_pointer(m->adr_graal_mirror()); | |
183 | 198 |
184 ResourceMark rm; | 199 ResourceMark rm; |
185 ProfileData* data; | 200 ProfileData* data; |
186 for (data = m->first_data(); m->is_valid(data); data = m->next_data(data)) { | 201 for (data = m->first_data(); m->is_valid(data); data = m->next_data(data)) { |
187 data->update_pointers(); | 202 data->update_pointers(); |