comparison src/share/vm/runtime/vframeArray.cpp @ 4668:3dbcd1013cc8

added flag PrintDeoptimizationDetails changes so that TraceDeoptimization only prints basic information added nicer formatting for printing interpreter stack frames
author Christian Haeubl <christian.haeubl@oracle.com>
date Tue, 21 Feb 2012 16:05:46 -0800
parents be4ca325525a
children a03f3fd16b22
comparison
equal deleted inserted replaced
4667:35b2cae45dc5 4668:3dbcd1013cc8
315 address mdp = mdo->bci_to_dp(bci); 315 address mdp = mdo->bci_to_dp(bci);
316 iframe()->interpreter_frame_set_mdp(mdp); 316 iframe()->interpreter_frame_set_mdp(mdp);
317 } 317 }
318 } 318 }
319 319
320 if (TraceDeoptimization) { 320 if (PrintDeoptimizationDetails) {
321 tty->print_cr("Expressions size: %d", expressions()->size()); 321 tty->print_cr("Expressions size: %d", expressions()->size());
322 } 322 }
323 323
324 // Unpack expression stack 324 // Unpack expression stack
325 // If this is an intermediate frame (i.e. not top frame) then this 325 // If this is an intermediate frame (i.e. not top frame) then this
331 intptr_t* addr = iframe()->interpreter_frame_expression_stack_at(i); 331 intptr_t* addr = iframe()->interpreter_frame_expression_stack_at(i);
332 switch(value->type()) { 332 switch(value->type()) {
333 case T_INT: 333 case T_INT:
334 *addr = value->get_int(); 334 *addr = value->get_int();
335 #ifndef PRODUCT 335 #ifndef PRODUCT
336 if (TraceDeoptimization) { 336 if (PrintDeoptimizationDetails) {
337 tty->print_cr("Reconstructed expression %d (INT): %d", i, (int)(*addr)); 337 tty->print_cr("Reconstructed expression %d (INT): %d", i, (int)(*addr));
338 } 338 }
339 #endif 339 #endif
340 break; 340 break;
341 case T_OBJECT: 341 case T_OBJECT:
342 *addr = value->get_int(T_OBJECT); 342 *addr = value->get_int(T_OBJECT);
343 #ifndef PRODUCT 343 #ifndef PRODUCT
344 if (TraceDeoptimization) { 344 if (PrintDeoptimizationDetails) {
345 tty->print("Reconstructed expression %d (OBJECT): ", i); 345 tty->print("Reconstructed expression %d (OBJECT): ", i);
346 oop o = (oop)(*addr); 346 oop o = (oop)(*addr);
347 if (o == NULL) { 347 if (o == NULL) {
348 tty->print_cr("NULL"); 348 tty->print_cr("NULL");
349 } else { 349 } else {
368 intptr_t* addr = iframe()->interpreter_frame_local_at(i); 368 intptr_t* addr = iframe()->interpreter_frame_local_at(i);
369 switch(value->type()) { 369 switch(value->type()) {
370 case T_INT: 370 case T_INT:
371 *addr = value->get_int(); 371 *addr = value->get_int();
372 #ifndef PRODUCT 372 #ifndef PRODUCT
373 if (TraceDeoptimization) { 373 if (PrintDeoptimizationDetails) {
374 tty->print_cr("Reconstructed local %d (INT): %d", i, (int)(*addr)); 374 tty->print_cr("Reconstructed local %d (INT): %d", i, (int)(*addr));
375 } 375 }
376 #endif 376 #endif
377 break; 377 break;
378 case T_OBJECT: 378 case T_OBJECT:
379 *addr = value->get_int(T_OBJECT); 379 *addr = value->get_int(T_OBJECT);
380 #ifndef PRODUCT 380 #ifndef PRODUCT
381 if (TraceDeoptimization) { 381 if (PrintDeoptimizationDetails) {
382 tty->print("Reconstructed local %d (OBJECT): ", i); 382 tty->print("Reconstructed local %d (OBJECT): ", i);
383 oop o = (oop)(*addr); 383 oop o = (oop)(*addr);
384 if (o == NULL) { 384 if (o == NULL) {
385 tty->print_cr("NULL"); 385 tty->print_cr("NULL");
386 } else { 386 } else {
427 thread->popframe_free_preserved_args(); 427 thread->popframe_free_preserved_args();
428 } 428 }
429 } 429 }
430 430
431 #ifndef PRODUCT 431 #ifndef PRODUCT
432 if (TraceDeoptimization && Verbose) { 432 if (PrintDeoptimizationDetails) {
433 ttyLocker ttyl; 433 ttyLocker ttyl;
434 tty->print_cr("[%d Interpreted Frame]", ++unpack_counter); 434 tty->print_cr("[%d Interpreted Frame]", ++unpack_counter);
435 iframe()->print_on(tty); 435 iframe()->print_on(tty);
436 RegisterMap map(thread); 436 RegisterMap map(thread);
437 vframe* f = vframe::new_vframe(iframe(), &map, thread); 437 vframe* f = vframe::new_vframe(iframe(), &map, thread);
438 f->print(); 438 f->print();
439
440 tty->print_cr("locals size %d", locals()->size());
441 tty->print_cr("expression size %d", expressions()->size());
442
443 method()->print_value();
444 tty->cr(); 439 tty->cr();
445 // method()->print_codes(); 440 // method()->print_codes();
446 } else if (TraceDeoptimization) { 441 } else if (TraceDeoptimization) {
447 tty->print(" "); 442 tty->print(" ");
448 method()->print_value(); 443 method()->print_value();