Mercurial > hg > graal-compiler
comparison src/share/vm/ci/ciReplay.cpp @ 10105:aeaca88565e6
8010862: The Method counter fields used for profiling can be allocated lazily.
Summary: Allocate the method's profiling related metadata until they are needed.
Reviewed-by: coleenp, roland
author | jiangli |
---|---|
date | Tue, 09 Apr 2013 17:17:41 -0400 |
parents | 8391fdd36e1f |
children | e12c9b3740db |
comparison
equal
deleted
inserted
replaced
9055:dcdeb150988c | 10105:aeaca88565e6 |
---|---|
918 // interfere with reproducing a bug | 918 // interfere with reproducing a bug |
919 tty->print_cr("Warning: requesting ciMethod record for method with no data: "); | 919 tty->print_cr("Warning: requesting ciMethod record for method with no data: "); |
920 method->print_name(tty); | 920 method->print_name(tty); |
921 tty->cr(); | 921 tty->cr(); |
922 } else { | 922 } else { |
923 EXCEPTION_CONTEXT; | |
924 MethodCounters* mcs = method->method_counters(); | |
923 // m->_instructions_size = rec->instructions_size; | 925 // m->_instructions_size = rec->instructions_size; |
924 m->_instructions_size = -1; | 926 m->_instructions_size = -1; |
925 m->_interpreter_invocation_count = rec->interpreter_invocation_count; | 927 m->_interpreter_invocation_count = rec->interpreter_invocation_count; |
926 m->_interpreter_throwout_count = rec->interpreter_throwout_count; | 928 m->_interpreter_throwout_count = rec->interpreter_throwout_count; |
927 method->invocation_counter()->_counter = rec->invocation_counter; | 929 if (mcs == NULL) { |
928 method->backedge_counter()->_counter = rec->backedge_counter; | 930 mcs = Method::build_method_counters(method, CHECK_AND_CLEAR); |
931 } | |
932 mcs->invocation_counter()->_counter = rec->invocation_counter; | |
933 mcs->backedge_counter()->_counter = rec->backedge_counter; | |
929 } | 934 } |
930 } | 935 } |
931 | 936 |
932 bool ciReplay::is_loaded(Method* method) { | 937 bool ciReplay::is_loaded(Method* method) { |
933 if (replay_state == NULL) { | 938 if (replay_state == NULL) { |