Mercurial > hg > graal-compiler
comparison src/share/vm/code/relocInfo.hpp @ 13512:8085ce95b6f5
reloc info for safepoint polls includes whether the poison page is far or near
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 06 Jan 2014 13:41:59 +0100 |
parents | 9758d9f36299 |
children | fa5180b3c18e |
comparison
equal
deleted
inserted
replaced
13511:51e16c7a5685 | 13512:8085ce95b6f5 |
---|---|
208 // This stub becomes the target of a static call which must be upgraded | 208 // This stub becomes the target of a static call which must be upgraded |
209 // to a virtual call (because the callee is interpreted). | 209 // to a virtual call (because the callee is interpreted). |
210 // See [About Offsets] below. | 210 // See [About Offsets] below. |
211 // //%note reloc_2 | 211 // //%note reloc_2 |
212 // | 212 // |
213 // relocInfo::poll_[return_]type -- a safepoint poll | |
214 // Value: none | |
215 // Instruction types: memory load or test | |
216 // Data: [] the associated set-oops are adjacent to the call | |
217 // [n] n is a poll_Relocation::pollingPageDistance value | |
218 // | |
213 // For example: | 219 // For example: |
214 // | 220 // |
215 // INSTRUCTIONS RELOC: TYPE PREFIX DATA | 221 // INSTRUCTIONS RELOC: TYPE PREFIX DATA |
216 // ------------ ---- ----------- | 222 // ------------ ---- ----------- |
217 // sethi %hi(myObject), R oop_type [n(myObject)] | 223 // sethi %hi(myObject), R oop_type [n(myObject)] |
1269 private: | 1275 private: |
1270 friend class RelocIterator; | 1276 friend class RelocIterator; |
1271 section_word_Relocation() { } | 1277 section_word_Relocation() { } |
1272 }; | 1278 }; |
1273 | 1279 |
1274 | |
1275 class poll_Relocation : public Relocation { | 1280 class poll_Relocation : public Relocation { |
1281 public: | |
1282 enum pollingPageDistance { | |
1283 near, | |
1284 far | |
1285 }; | |
1286 relocInfo::relocType type() { return relocInfo::poll_type; } | |
1276 bool is_data() { return true; } | 1287 bool is_data() { return true; } |
1277 relocInfo::relocType type() { return relocInfo::poll_type; } | |
1278 void fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest); | 1288 void fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest); |
1279 }; | 1289 private: |
1280 | 1290 pollingPageDistance _distance; |
1281 class poll_return_Relocation : public Relocation { | 1291 public: |
1282 bool is_data() { return true; } | 1292 |
1293 static RelocationHolder spec(poll_Relocation::pollingPageDistance distance) { | |
1294 RelocationHolder rh = newHolder(); | |
1295 new(rh) poll_Relocation(distance); | |
1296 return rh; | |
1297 } | |
1298 | |
1299 poll_Relocation(poll_Relocation::pollingPageDistance distance) { | |
1300 _distance = distance; | |
1301 } | |
1302 poll_Relocation::pollingPageDistance distance() { return _distance; } | |
1303 | |
1304 void pack_data_to(CodeSection* dest); | |
1305 void unpack_data(); | |
1306 | |
1307 protected: | |
1308 friend class RelocIterator; | |
1309 poll_Relocation() { } | |
1310 }; | |
1311 | |
1312 class poll_return_Relocation : public poll_Relocation { | |
1313 public: | |
1283 relocInfo::relocType type() { return relocInfo::poll_return_type; } | 1314 relocInfo::relocType type() { return relocInfo::poll_return_type; } |
1284 void fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest); | 1315 |
1316 static RelocationHolder spec(poll_Relocation::pollingPageDistance distance) { | |
1317 RelocationHolder rh = newHolder(); | |
1318 new(rh) poll_return_Relocation(distance); | |
1319 return rh; | |
1320 } | |
1321 | |
1322 poll_return_Relocation(poll_Relocation::pollingPageDistance distance) : poll_Relocation(distance) { } | |
1323 | |
1324 private: | |
1325 friend class RelocIterator; | |
1326 poll_return_Relocation() { } | |
1285 }; | 1327 }; |
1286 | 1328 |
1287 // We know all the xxx_Relocation classes, so now we can define these: | 1329 // We know all the xxx_Relocation classes, so now we can define these: |
1288 #define EACH_CASE(name) \ | 1330 #define EACH_CASE(name) \ |
1289 inline name##_Relocation* RelocIterator::name##_reloc() { \ | 1331 inline name##_Relocation* RelocIterator::name##_reloc() { \ |