comparison src/share/vm/oops/methodData.cpp @ 8616:d343737786fe

changed profiling of exceptions so that the ExceptionSeen flag also works without GRAALVM
author Christian Haeubl <haeubl@ssw.jku.at>
date Thu, 28 Mar 2013 17:11:06 +0100
parents 91c79e13b9cf
children b9a918201d47
comparison
equal deleted inserted replaced
8615:91c79e13b9cf 8616:d343737786fe
454 // a DataLayout header, with no extra cells. 454 // a DataLayout header, with no extra cells.
455 assert(cell_count >= 0, "sanity"); 455 assert(cell_count >= 0, "sanity");
456 return DataLayout::compute_size_in_bytes(cell_count); 456 return DataLayout::compute_size_in_bytes(cell_count);
457 } 457 }
458 458
459 #ifdef GRAALVM 459 #ifdef GRAAL
460 int MethodData::compute_extra_data_count(int data_size, int empty_bc_count) { 460 int MethodData::compute_extra_data_count(int data_size, int empty_bc_count) {
461 if (!ProfileTraps) return 0; 461 if (!ProfileTraps) return 0;
462 462
463 // Assume that up to 30% of the possibly trapping BCIs with no MDP will need to allocate one. 463 // Assume that up to 30% of the possibly trapping BCIs with no MDP will need to allocate one.
464 return MIN2(empty_bc_count, MAX2(4, (empty_bc_count * 30) / 100)); 464 return MIN2(empty_bc_count, MAX2(4, (empty_bc_count * 30) / 100));
733 733
734 set_size(object_size); 734 set_size(object_size);
735 } 735 }
736 736
737 bool MethodData::is_empty_data(int size_in_bytes, Bytecodes::Code code) { 737 bool MethodData::is_empty_data(int size_in_bytes, Bytecodes::Code code) {
738 #ifdef GRAALVM 738 #ifdef GRAAL
739 return size_in_bytes == 0 && Bytecodes::can_trap(code); 739 return size_in_bytes == 0 && Bytecodes::can_trap(code);
740 #else 740 #else
741 return size_in_bytes == 0; 741 return size_in_bytes == 0;
742 #endif 742 #endif
743 } 743 }