comparison src/share/vm/runtime/deoptimization.cpp @ 12355:cefad50507d8

Merge with hs25-b53
author Gilles Duboscq <duboscq@ssw.jku.at>
date Fri, 11 Oct 2013 10:38:03 +0200
parents 5fc4aedf7910 190899198332
children 359f7e70ae7f
comparison
equal deleted inserted replaced
12058:ccb4f2af2319 12355:cefad50507d8
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.
259 assert(result == NULL || result->is_oop(), "must be oop"); 259 assert(result == NULL || result->is_oop(), "must be oop");
260 return_value = Handle(thread, result); 260 return_value = Handle(thread, result);
261 assert(Universe::heap()->is_in_or_null(result), "must be heap pointer"); 261 assert(Universe::heap()->is_in_or_null(result), "must be heap pointer");
262 if (TraceDeoptimization) { 262 if (TraceDeoptimization) {
263 ttyLocker ttyl; 263 ttyLocker ttyl;
264 tty->print_cr("SAVED OOP RESULT " INTPTR_FORMAT " in thread " INTPTR_FORMAT, result, thread); 264 tty->print_cr("SAVED OOP RESULT " INTPTR_FORMAT " in thread " INTPTR_FORMAT, (void *)result, thread);
265 } 265 }
266 } 266 }
267 bool reallocated = false; 267 bool reallocated = false;
268 if (objects != NULL) { 268 if (objects != NULL) {
269 JRT_BLOCK 269 JRT_BLOCK
305 if (mi->eliminated()) { 305 if (mi->eliminated()) {
306 if (first) { 306 if (first) {
307 first = false; 307 first = false;
308 tty->print_cr("RELOCK OBJECTS in thread " INTPTR_FORMAT, thread); 308 tty->print_cr("RELOCK OBJECTS in thread " INTPTR_FORMAT, thread);
309 } 309 }
310 tty->print_cr(" object <" INTPTR_FORMAT "> locked", mi->owner()); 310 tty->print_cr(" object <" INTPTR_FORMAT "> locked", (void *)mi->owner());
311 } 311 }
312 } 312 }
313 } 313 }
314 #endif // !PRODUCT 314 #endif // !PRODUCT
315 } 315 }
1022 for (int i = 0; i < objects->length(); i++) { 1022 for (int i = 0; i < objects->length(); i++) {
1023 ObjectValue* sv = (ObjectValue*) objects->at(i); 1023 ObjectValue* sv = (ObjectValue*) objects->at(i);
1024 KlassHandle k(java_lang_Class::as_Klass(sv->klass()->as_ConstantOopReadValue()->value()())); 1024 KlassHandle k(java_lang_Class::as_Klass(sv->klass()->as_ConstantOopReadValue()->value()()));
1025 Handle obj = sv->value(); 1025 Handle obj = sv->value();
1026 1026
1027 tty->print(" object <" INTPTR_FORMAT "> of type ", sv->value()()); 1027 tty->print(" object <" INTPTR_FORMAT "> of type ", (void *)sv->value()());
1028 k->print_value(); 1028 k->print_value();
1029 tty->print(" allocated (%d bytes)", obj->size() * HeapWordSize); 1029 tty->print(" allocated (%d bytes)", obj->size() * HeapWordSize);
1030 tty->cr(); 1030 tty->cr();
1031 1031
1032 if (Verbose) { 1032 if (Verbose) {
1842 int Deoptimization::trap_state_set_recompiled(int trap_state, bool z) { 1842 int Deoptimization::trap_state_set_recompiled(int trap_state, bool z) {
1843 if (z) return trap_state | DS_RECOMPILE_BIT; 1843 if (z) return trap_state | DS_RECOMPILE_BIT;
1844 else return trap_state & ~DS_RECOMPILE_BIT; 1844 else return trap_state & ~DS_RECOMPILE_BIT;
1845 } 1845 }
1846 //---------------------------format_trap_state--------------------------------- 1846 //---------------------------format_trap_state---------------------------------
1847 // This is used for debugging and diagnostics, including hotspot.log output. 1847 // This is used for debugging and diagnostics, including LogFile output.
1848 const char* Deoptimization::format_trap_state(char* buf, size_t buflen, 1848 const char* Deoptimization::format_trap_state(char* buf, size_t buflen,
1849 int trap_state) { 1849 int trap_state) {
1850 DeoptReason reason = trap_state_reason(trap_state); 1850 DeoptReason reason = trap_state_reason(trap_state);
1851 bool recomp_flag = trap_state_is_recompiled(trap_state); 1851 bool recomp_flag = trap_state_is_recompiled(trap_state);
1852 // Re-encode the state from its decoded components. 1852 // Re-encode the state from its decoded components.
1919 static char buf[20]; 1919 static char buf[20];
1920 sprintf(buf, "action%d", action); 1920 sprintf(buf, "action%d", action);
1921 return buf; 1921 return buf;
1922 } 1922 }
1923 1923
1924 // This is used for debugging and diagnostics, including hotspot.log output. 1924 // This is used for debugging and diagnostics, including LogFile output.
1925 const char* Deoptimization::format_trap_request(char* buf, size_t buflen, 1925 const char* Deoptimization::format_trap_request(char* buf, size_t buflen,
1926 int trap_request) { 1926 int trap_request) {
1927 jint unloaded_class_index = trap_request_index(trap_request); 1927 jint unloaded_class_index = trap_request_index(trap_request);
1928 const char* reason = trap_reason_name(trap_request_reason(trap_request)); 1928 const char* reason = trap_reason_name(trap_request_reason(trap_request));
1929 const char* action = trap_action_name(trap_request_action(trap_request)); 1929 const char* action = trap_action_name(trap_request_action(trap_request));