Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/methodDataOop.cpp @ 5036:8e6db1a5c537
exit the VM when an endless recompilation is detected
author | Christian Haeubl <christian.haeubl@oracle.com> |
---|---|
date | Mon, 05 Mar 2012 12:01:38 -0800 |
parents | 18a5539bf19b |
children | f3d2447db2d9 |
comparison
equal
deleted
inserted
replaced
5022:cbedef8b4d15 | 5036:8e6db1a5c537 |
---|---|
859 | 859 |
860 bool methodDataOopDesc::is_mature() const { | 860 bool methodDataOopDesc::is_mature() const { |
861 return CompilationPolicy::policy()->is_mature(_method); | 861 return CompilationPolicy::policy()->is_mature(_method); |
862 } | 862 } |
863 | 863 |
864 void methodDataOopDesc::inc_decompile_count() { | |
865 _nof_decompiles += 1; | |
866 if (decompile_count() > (uint)PerMethodRecompilationCutoff) { | |
867 #ifdef GRAAL | |
868 // TODO (ch) enable this in the fastdebug build only once we are more stable | |
869 ResourceMark m; | |
870 tty->print_cr("WARN: endless recompilation of %s. Method was set to not compilable.", method()->name_and_sig_as_C_string()); | |
871 vm_exit(1); | |
872 #endif | |
873 method()->set_not_compilable(CompLevel_full_optimization); | |
874 } | |
875 } | |
876 | |
864 // Translate a bci to its corresponding data index (di). | 877 // Translate a bci to its corresponding data index (di). |
865 address methodDataOopDesc::bci_to_dp(int bci) { | 878 address methodDataOopDesc::bci_to_dp(int bci) { |
866 ResourceMark rm; | 879 ResourceMark rm; |
867 ProfileData* data = data_before(bci); | 880 ProfileData* data = data_before(bci); |
868 ProfileData* prev = NULL; | 881 ProfileData* prev = NULL; |