Mercurial > hg > graal-compiler
diff src/share/vm/oops/methodData.cpp @ 10408:836a62f43af9
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 19 Jun 2013 10:45:56 +0200 |
parents | 2461285a2f90 a1ebd310d5c1 |
children | 359f7e70ae7f |
line wrap: on
line diff
--- a/src/share/vm/oops/methodData.cpp Tue Jun 18 14:23:29 2013 -0700 +++ b/src/share/vm/oops/methodData.cpp Wed Jun 19 10:45:56 2013 +0200 @@ -400,7 +400,8 @@ MethodData* MethodData::allocate(ClassLoaderData* loader_data, methodHandle method, TRAPS) { int size = MethodData::compute_allocation_size_in_words(method); - return new (loader_data, size, false, THREAD) MethodData(method(), size, CHECK_NULL); + return new (loader_data, size, false, MetaspaceObj::MethodDataType, THREAD) + MethodData(method(), size, CHECK_NULL); } int MethodData::bytecode_cell_count(Bytecodes::Code code) { @@ -774,14 +775,17 @@ } else { int iic = method->interpreter_invocation_count(); if (mileage < iic) mileage = iic; - InvocationCounter* ic = method->invocation_counter(); - InvocationCounter* bc = method->backedge_counter(); - int icval = ic->count(); - if (ic->carry()) icval += CompileThreshold; - if (mileage < icval) mileage = icval; - int bcval = bc->count(); - if (bc->carry()) bcval += CompileThreshold; - if (mileage < bcval) mileage = bcval; + MethodCounters* mcs = method->method_counters(); + if (mcs != NULL) { + InvocationCounter* ic = mcs->invocation_counter(); + InvocationCounter* bc = mcs->backedge_counter(); + int icval = ic->count(); + if (ic->carry()) icval += CompileThreshold; + if (mileage < icval) mileage = icval; + int bcval = bc->count(); + if (bc->carry()) bcval += CompileThreshold; + if (mileage < bcval) mileage = bcval; + } } return mileage; }