Mercurial > hg > truffle
comparison src/share/vm/ci/ciMethod.cpp @ 12883:f50418dfb1b7
Merge
author | iveresov |
---|---|
date | Sun, 13 Oct 2013 13:22:24 -0700 |
parents | c775af091fe9 |
children | b2ee5dc63353 |
comparison
equal
deleted
inserted
replaced
12844:7c26dced065e | 12883:f50418dfb1b7 |
---|---|
844 // | 844 // |
845 // Generate new MethodData* objects at compile time. | 845 // Generate new MethodData* objects at compile time. |
846 // Return true if allocation was successful or no MDO is required. | 846 // Return true if allocation was successful or no MDO is required. |
847 bool ciMethod::ensure_method_data(methodHandle h_m) { | 847 bool ciMethod::ensure_method_data(methodHandle h_m) { |
848 EXCEPTION_CONTEXT; | 848 EXCEPTION_CONTEXT; |
849 if (is_native() || is_abstract() || h_m()->is_accessor()) return true; | 849 if (is_native() || is_abstract() || h_m()->is_accessor()) { |
850 return true; | |
851 } | |
850 if (h_m()->method_data() == NULL) { | 852 if (h_m()->method_data() == NULL) { |
851 Method::build_interpreter_method_data(h_m, THREAD); | 853 Method::build_interpreter_method_data(h_m, THREAD); |
852 if (HAS_PENDING_EXCEPTION) { | 854 if (HAS_PENDING_EXCEPTION) { |
853 CLEAR_PENDING_EXCEPTION; | 855 CLEAR_PENDING_EXCEPTION; |
854 } | 856 } |
901 // ciMethod::method_data_or_null | 903 // ciMethod::method_data_or_null |
902 // Returns a pointer to ciMethodData if MDO exists on the VM side, | 904 // Returns a pointer to ciMethodData if MDO exists on the VM side, |
903 // NULL otherwise. | 905 // NULL otherwise. |
904 ciMethodData* ciMethod::method_data_or_null() { | 906 ciMethodData* ciMethod::method_data_or_null() { |
905 ciMethodData *md = method_data(); | 907 ciMethodData *md = method_data(); |
906 if (md->is_empty()) return NULL; | 908 if (md->is_empty()) { |
909 return NULL; | |
910 } | |
907 return md; | 911 return md; |
908 } | 912 } |
909 | 913 |
910 // ------------------------------------------------------------------ | 914 // ------------------------------------------------------------------ |
911 // ciMethod::ensure_method_counters | 915 // ciMethod::ensure_method_counters |
912 // | 916 // |
913 address ciMethod::ensure_method_counters() { | 917 MethodCounters* ciMethod::ensure_method_counters() { |
914 check_is_loaded(); | 918 check_is_loaded(); |
915 VM_ENTRY_MARK; | 919 VM_ENTRY_MARK; |
916 methodHandle mh(THREAD, get_Method()); | 920 methodHandle mh(THREAD, get_Method()); |
917 MethodCounters *counter = mh->method_counters(); | 921 MethodCounters* method_counters = mh->get_method_counters(CHECK_NULL); |
918 if (counter == NULL) { | 922 return method_counters; |
919 counter = Method::build_method_counters(mh(), CHECK_AND_CLEAR_NULL); | |
920 } | |
921 return (address)counter; | |
922 } | 923 } |
923 | 924 |
924 // ------------------------------------------------------------------ | 925 // ------------------------------------------------------------------ |
925 // ciMethod::should_exclude | 926 // ciMethod::should_exclude |
926 // | 927 // |
1245 } | 1246 } |
1246 | 1247 |
1247 #undef FETCH_FLAG_FROM_VM | 1248 #undef FETCH_FLAG_FROM_VM |
1248 | 1249 |
1249 void ciMethod::dump_replay_data(outputStream* st) { | 1250 void ciMethod::dump_replay_data(outputStream* st) { |
1250 ASSERT_IN_VM; | |
1251 ResourceMark rm; | 1251 ResourceMark rm; |
1252 Method* method = get_Method(); | 1252 Method* method = get_Method(); |
1253 MethodCounters* mcs = method->method_counters(); | 1253 MethodCounters* mcs = method->method_counters(); |
1254 Klass* holder = method->method_holder(); | 1254 Klass* holder = method->method_holder(); |
1255 st->print_cr("ciMethod %s %s %s %d %d %d %d %d", | 1255 st->print_cr("ciMethod %s %s %s %d %d %d %d %d", |