comparison src/share/vm/oops/methodData.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 46f6f063b272
children 8df6ddda8090
comparison
equal deleted inserted replaced
9055:dcdeb150988c 10105:aeaca88565e6
730 if (TieredCompilation) { 730 if (TieredCompilation) {
731 mileage = MAX2(method->invocation_count(), method->backedge_count()); 731 mileage = MAX2(method->invocation_count(), method->backedge_count());
732 } else { 732 } else {
733 int iic = method->interpreter_invocation_count(); 733 int iic = method->interpreter_invocation_count();
734 if (mileage < iic) mileage = iic; 734 if (mileage < iic) mileage = iic;
735 InvocationCounter* ic = method->invocation_counter(); 735 MethodCounters* mcs = method->method_counters();
736 InvocationCounter* bc = method->backedge_counter(); 736 if (mcs != NULL) {
737 int icval = ic->count(); 737 InvocationCounter* ic = mcs->invocation_counter();
738 if (ic->carry()) icval += CompileThreshold; 738 InvocationCounter* bc = mcs->backedge_counter();
739 if (mileage < icval) mileage = icval; 739 int icval = ic->count();
740 int bcval = bc->count(); 740 if (ic->carry()) icval += CompileThreshold;
741 if (bc->carry()) bcval += CompileThreshold; 741 if (mileage < icval) mileage = icval;
742 if (mileage < bcval) mileage = bcval; 742 int bcval = bc->count();
743 if (bc->carry()) bcval += CompileThreshold;
744 if (mileage < bcval) mileage = bcval;
745 }
743 } 746 }
744 return mileage; 747 return mileage;
745 } 748 }
746 749
747 bool MethodData::is_mature() const { 750 bool MethodData::is_mature() const {