comparison src/share/vm/runtime/deoptimization.cpp @ 2059:9508a52cbd32

Add deoptimization blob support.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Wed, 19 Jan 2011 15:48:15 +0100
parents 06f017f7daa7
children d25d4ca69222
comparison
equal deleted inserted replaced
2058:8f033d37798a 2059:9508a52cbd32
1147 thread->popframe_preserve_args(in_ByteSize(bytes_to_save), start_address); 1147 thread->popframe_preserve_args(in_ByteSize(bytes_to_save), start_address);
1148 } 1148 }
1149 JRT_END 1149 JRT_END
1150 1150
1151 1151
1152 #if defined(COMPILER2) || defined(SHARK)
1153 void Deoptimization::load_class_by_index(constantPoolHandle constant_pool, int index, TRAPS) { 1152 void Deoptimization::load_class_by_index(constantPoolHandle constant_pool, int index, TRAPS) {
1154 // in case of an unresolved klass entry, load the class. 1153 // in case of an unresolved klass entry, load the class.
1155 if (constant_pool->tag_at(index).is_unresolved_klass()) { 1154 if (constant_pool->tag_at(index).is_unresolved_klass()) {
1156 klassOop tk = constant_pool->klass_at(index, CHECK); 1155 klassOop tk = constant_pool->klass_at(index, CHECK);
1157 return; 1156 return;
1890 } 1889 }
1891 #undef PRINT_STAT_LINE 1890 #undef PRINT_STAT_LINE
1892 if (xtty != NULL) xtty->tail("statistics"); 1891 if (xtty != NULL) xtty->tail("statistics");
1893 } 1892 }
1894 } 1893 }
1895 #else // COMPILER2 || SHARK
1896
1897
1898 // Stubs for C1 only system.
1899 bool Deoptimization::trap_state_is_recompiled(int trap_state) {
1900 return false;
1901 }
1902
1903 const char* Deoptimization::trap_reason_name(int reason) {
1904 return "unknown";
1905 }
1906
1907 void Deoptimization::print_statistics() {
1908 // no output
1909 }
1910
1911 void
1912 Deoptimization::update_method_data_from_interpreter(methodDataHandle trap_mdo, int trap_bci, int reason) {
1913 // no udpate
1914 }
1915
1916 int Deoptimization::trap_state_has_reason(int trap_state, int reason) {
1917 return 0;
1918 }
1919
1920 void Deoptimization::gather_statistics(DeoptReason reason, DeoptAction action,
1921 Bytecodes::Code bc) {
1922 // no update
1923 }
1924
1925 const char* Deoptimization::format_trap_state(char* buf, size_t buflen,
1926 int trap_state) {
1927 jio_snprintf(buf, buflen, "#%d", trap_state);
1928 return buf;
1929 }
1930
1931 #endif // COMPILER2 || SHARK