Mercurial > hg > graal-compiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
10086:e0fb8a213650 | 10408:836a62f43af9 |
---|---|
398 // a method. | 398 // a method. |
399 | 399 |
400 MethodData* MethodData::allocate(ClassLoaderData* loader_data, methodHandle method, TRAPS) { | 400 MethodData* MethodData::allocate(ClassLoaderData* loader_data, methodHandle method, TRAPS) { |
401 int size = MethodData::compute_allocation_size_in_words(method); | 401 int size = MethodData::compute_allocation_size_in_words(method); |
402 | 402 |
403 return new (loader_data, size, false, THREAD) MethodData(method(), size, CHECK_NULL); | 403 return new (loader_data, size, false, MetaspaceObj::MethodDataType, THREAD) |
404 MethodData(method(), size, CHECK_NULL); | |
404 } | 405 } |
405 | 406 |
406 int MethodData::bytecode_cell_count(Bytecodes::Code code) { | 407 int MethodData::bytecode_cell_count(Bytecodes::Code code) { |
407 #if defined(COMPILER1) && !(defined(COMPILER2) || defined(GRAAL)) | 408 #if defined(COMPILER1) && !(defined(COMPILER2) || defined(GRAAL)) |
408 return no_profile_data; | 409 return no_profile_data; |
772 if (TieredCompilation) { | 773 if (TieredCompilation) { |
773 mileage = MAX2(method->invocation_count(), method->backedge_count()); | 774 mileage = MAX2(method->invocation_count(), method->backedge_count()); |
774 } else { | 775 } else { |
775 int iic = method->interpreter_invocation_count(); | 776 int iic = method->interpreter_invocation_count(); |
776 if (mileage < iic) mileage = iic; | 777 if (mileage < iic) mileage = iic; |
777 InvocationCounter* ic = method->invocation_counter(); | 778 MethodCounters* mcs = method->method_counters(); |
778 InvocationCounter* bc = method->backedge_counter(); | 779 if (mcs != NULL) { |
779 int icval = ic->count(); | 780 InvocationCounter* ic = mcs->invocation_counter(); |
780 if (ic->carry()) icval += CompileThreshold; | 781 InvocationCounter* bc = mcs->backedge_counter(); |
781 if (mileage < icval) mileage = icval; | 782 int icval = ic->count(); |
782 int bcval = bc->count(); | 783 if (ic->carry()) icval += CompileThreshold; |
783 if (bc->carry()) bcval += CompileThreshold; | 784 if (mileage < icval) mileage = icval; |
784 if (mileage < bcval) mileage = bcval; | 785 int bcval = bc->count(); |
786 if (bc->carry()) bcval += CompileThreshold; | |
787 if (mileage < bcval) mileage = bcval; | |
788 } | |
785 } | 789 } |
786 return mileage; | 790 return mileage; |
787 } | 791 } |
788 | 792 |
789 bool MethodData::is_mature() const { | 793 bool MethodData::is_mature() const { |