1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
986 void CodeSection::dump() { |
986 void CodeSection::dump() { |
987 address ptr = start(); |
987 address ptr = start(); |
988 for (csize_t step; ptr < end(); ptr += step) { |
988 for (csize_t step; ptr < end(); ptr += step) { |
989 step = end() - ptr; |
989 step = end() - ptr; |
990 if (step > jintSize * 4) step = jintSize * 4; |
990 if (step > jintSize * 4) step = jintSize * 4; |
991 tty->print(PTR_FORMAT ": ", ptr); |
991 tty->print(INTPTR_FORMAT ": ", p2i(ptr)); |
992 while (step > 0) { |
992 while (step > 0) { |
993 tty->print(" " PTR32_FORMAT, *(jint*)ptr); |
993 tty->print(" " PTR32_FORMAT, *(jint*)ptr); |
994 ptr += jintSize; |
994 ptr += jintSize; |
995 } |
995 } |
996 tty->cr(); |
996 tty->cr(); |
1096 if (_strings != NULL) { |
1096 if (_strings != NULL) { |
1097 CodeString* c = find(offset); |
1097 CodeString* c = find(offset); |
1098 while (c && c->offset() == offset) { |
1098 while (c && c->offset() == offset) { |
1099 stream->bol(); |
1099 stream->bol(); |
1100 stream->print(" ;; "); |
1100 stream->print(" ;; "); |
1101 stream->print_cr(c->string()); |
1101 stream->print_cr("%s", c->string()); |
1102 c = c->next_comment(); |
1102 c = c->next_comment(); |
1103 } |
1103 } |
1104 } |
1104 } |
1105 } |
1105 } |
1106 |
1106 |
1152 |
1152 |
1153 |
1153 |
1154 void CodeSection::print(const char* name) { |
1154 void CodeSection::print(const char* name) { |
1155 csize_t locs_size = locs_end() - locs_start(); |
1155 csize_t locs_size = locs_end() - locs_start(); |
1156 tty->print_cr(" %7s.code = " PTR_FORMAT " : " PTR_FORMAT " : " PTR_FORMAT " (%d of %d)%s", |
1156 tty->print_cr(" %7s.code = " PTR_FORMAT " : " PTR_FORMAT " : " PTR_FORMAT " (%d of %d)%s", |
1157 name, start(), end(), limit(), size(), capacity(), |
1157 name, p2i(start()), p2i(end()), p2i(limit()), size(), capacity(), |
1158 is_frozen()? " [frozen]": ""); |
1158 is_frozen()? " [frozen]": ""); |
1159 tty->print_cr(" %7s.locs = " PTR_FORMAT " : " PTR_FORMAT " : " PTR_FORMAT " (%d of %d) point=%d", |
1159 tty->print_cr(" %7s.locs = " PTR_FORMAT " : " PTR_FORMAT " : " PTR_FORMAT " (%d of %d) point=%d", |
1160 name, locs_start(), locs_end(), locs_limit(), locs_size, locs_capacity(), locs_point_off()); |
1160 name, p2i(locs_start()), p2i(locs_end()), p2i(locs_limit()), locs_size, locs_capacity(), locs_point_off()); |
1161 if (PrintRelocations) { |
1161 if (PrintRelocations) { |
1162 RelocIterator iter(this); |
1162 RelocIterator iter(this); |
1163 iter.print(); |
1163 iter.print(); |
1164 } |
1164 } |
1165 } |
1165 } |