Mercurial > hg > truffle
comparison src/share/vm/runtime/deoptimization.cpp @ 14422:2b8e28fdf503
Merge
author | kvn |
---|---|
date | Tue, 05 Nov 2013 17:38:04 -0800 |
parents | b5c8a61d7fa0 190899198332 |
children | abec000618bf |
comparison
equal
deleted
inserted
replaced
14421:3068270ba476 | 14422:2b8e28fdf503 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2013, 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. |
235 assert(result == NULL || result->is_oop(), "must be oop"); | 235 assert(result == NULL || result->is_oop(), "must be oop"); |
236 return_value = Handle(thread, result); | 236 return_value = Handle(thread, result); |
237 assert(Universe::heap()->is_in_or_null(result), "must be heap pointer"); | 237 assert(Universe::heap()->is_in_or_null(result), "must be heap pointer"); |
238 if (TraceDeoptimization) { | 238 if (TraceDeoptimization) { |
239 ttyLocker ttyl; | 239 ttyLocker ttyl; |
240 tty->print_cr("SAVED OOP RESULT " INTPTR_FORMAT " in thread " INTPTR_FORMAT, result, thread); | 240 tty->print_cr("SAVED OOP RESULT " INTPTR_FORMAT " in thread " INTPTR_FORMAT, (void *)result, thread); |
241 } | 241 } |
242 } | 242 } |
243 bool reallocated = false; | 243 bool reallocated = false; |
244 if (objects != NULL) { | 244 if (objects != NULL) { |
245 JRT_BLOCK | 245 JRT_BLOCK |
279 if (mi->eliminated()) { | 279 if (mi->eliminated()) { |
280 if (first) { | 280 if (first) { |
281 first = false; | 281 first = false; |
282 tty->print_cr("RELOCK OBJECTS in thread " INTPTR_FORMAT, thread); | 282 tty->print_cr("RELOCK OBJECTS in thread " INTPTR_FORMAT, thread); |
283 } | 283 } |
284 tty->print_cr(" object <" INTPTR_FORMAT "> locked", mi->owner()); | 284 tty->print_cr(" object <" INTPTR_FORMAT "> locked", (void *)mi->owner()); |
285 } | 285 } |
286 } | 286 } |
287 } | 287 } |
288 #endif | 288 #endif |
289 } | 289 } |
978 for (int i = 0; i < objects->length(); i++) { | 978 for (int i = 0; i < objects->length(); i++) { |
979 ObjectValue* sv = (ObjectValue*) objects->at(i); | 979 ObjectValue* sv = (ObjectValue*) objects->at(i); |
980 KlassHandle k(java_lang_Class::as_Klass(sv->klass()->as_ConstantOopReadValue()->value()())); | 980 KlassHandle k(java_lang_Class::as_Klass(sv->klass()->as_ConstantOopReadValue()->value()())); |
981 Handle obj = sv->value(); | 981 Handle obj = sv->value(); |
982 | 982 |
983 tty->print(" object <" INTPTR_FORMAT "> of type ", sv->value()()); | 983 tty->print(" object <" INTPTR_FORMAT "> of type ", (void *)sv->value()()); |
984 k->print_value(); | 984 k->print_value(); |
985 tty->print(" allocated (%d bytes)", obj->size() * HeapWordSize); | 985 tty->print(" allocated (%d bytes)", obj->size() * HeapWordSize); |
986 tty->cr(); | 986 tty->cr(); |
987 | 987 |
988 if (Verbose) { | 988 if (Verbose) { |
1752 int Deoptimization::trap_state_set_recompiled(int trap_state, bool z) { | 1752 int Deoptimization::trap_state_set_recompiled(int trap_state, bool z) { |
1753 if (z) return trap_state | DS_RECOMPILE_BIT; | 1753 if (z) return trap_state | DS_RECOMPILE_BIT; |
1754 else return trap_state & ~DS_RECOMPILE_BIT; | 1754 else return trap_state & ~DS_RECOMPILE_BIT; |
1755 } | 1755 } |
1756 //---------------------------format_trap_state--------------------------------- | 1756 //---------------------------format_trap_state--------------------------------- |
1757 // This is used for debugging and diagnostics, including hotspot.log output. | 1757 // This is used for debugging and diagnostics, including LogFile output. |
1758 const char* Deoptimization::format_trap_state(char* buf, size_t buflen, | 1758 const char* Deoptimization::format_trap_state(char* buf, size_t buflen, |
1759 int trap_state) { | 1759 int trap_state) { |
1760 DeoptReason reason = trap_state_reason(trap_state); | 1760 DeoptReason reason = trap_state_reason(trap_state); |
1761 bool recomp_flag = trap_state_is_recompiled(trap_state); | 1761 bool recomp_flag = trap_state_is_recompiled(trap_state); |
1762 // Re-encode the state from its decoded components. | 1762 // Re-encode the state from its decoded components. |
1829 static char buf[20]; | 1829 static char buf[20]; |
1830 sprintf(buf, "action%d", action); | 1830 sprintf(buf, "action%d", action); |
1831 return buf; | 1831 return buf; |
1832 } | 1832 } |
1833 | 1833 |
1834 // This is used for debugging and diagnostics, including hotspot.log output. | 1834 // This is used for debugging and diagnostics, including LogFile output. |
1835 const char* Deoptimization::format_trap_request(char* buf, size_t buflen, | 1835 const char* Deoptimization::format_trap_request(char* buf, size_t buflen, |
1836 int trap_request) { | 1836 int trap_request) { |
1837 jint unloaded_class_index = trap_request_index(trap_request); | 1837 jint unloaded_class_index = trap_request_index(trap_request); |
1838 const char* reason = trap_reason_name(trap_request_reason(trap_request)); | 1838 const char* reason = trap_reason_name(trap_request_reason(trap_request)); |
1839 const char* action = trap_action_name(trap_request_action(trap_request)); | 1839 const char* action = trap_action_name(trap_request_action(trap_request)); |