1.1 --- a/src/share/vm/c1/c1_LIR.hpp Mon Jul 23 13:04:59 2012 -0700 1.2 +++ b/src/share/vm/c1/c1_LIR.hpp Tue Jul 24 10:51:00 2012 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -26,6 +26,7 @@ 1.11 #define SHARE_VM_C1_C1_LIR_HPP 1.12 1.13 #include "c1/c1_ValueType.hpp" 1.14 +#include "oops/methodOop.hpp" 1.15 1.16 class BlockBegin; 1.17 class BlockList; 1.18 @@ -1162,8 +1163,9 @@ 1.19 return 1.20 is_invokedynamic() // An invokedynamic is always a MethodHandle call site. 1.21 || 1.22 - (method()->holder()->name() == ciSymbol::java_lang_invoke_MethodHandle() && 1.23 - methodOopDesc::is_method_handle_invoke_name(method()->name()->sid())); 1.24 + method()->is_compiled_lambda_form() // Java-generated adapter 1.25 + || 1.26 + method()->is_method_handle_intrinsic(); // JVM-generated MH intrinsic 1.27 } 1.28 1.29 intptr_t vtable_offset() const { 1.30 @@ -1823,18 +1825,20 @@ 1.31 1.32 private: 1.33 ciMethod* _profiled_method; 1.34 - int _profiled_bci; 1.35 - LIR_Opr _mdo; 1.36 - LIR_Opr _recv; 1.37 - LIR_Opr _tmp1; 1.38 - ciKlass* _known_holder; 1.39 + int _profiled_bci; 1.40 + ciMethod* _profiled_callee; 1.41 + LIR_Opr _mdo; 1.42 + LIR_Opr _recv; 1.43 + LIR_Opr _tmp1; 1.44 + ciKlass* _known_holder; 1.45 1.46 public: 1.47 // Destroys recv 1.48 - LIR_OpProfileCall(LIR_Code code, ciMethod* profiled_method, int profiled_bci, LIR_Opr mdo, LIR_Opr recv, LIR_Opr t1, ciKlass* known_holder) 1.49 + LIR_OpProfileCall(LIR_Code code, ciMethod* profiled_method, int profiled_bci, ciMethod* profiled_callee, LIR_Opr mdo, LIR_Opr recv, LIR_Opr t1, ciKlass* known_holder) 1.50 : LIR_Op(code, LIR_OprFact::illegalOpr, NULL) // no result, no info 1.51 , _profiled_method(profiled_method) 1.52 , _profiled_bci(profiled_bci) 1.53 + , _profiled_callee(profiled_callee) 1.54 , _mdo(mdo) 1.55 , _recv(recv) 1.56 , _tmp1(t1) 1.57 @@ -1842,6 +1846,7 @@ 1.58 1.59 ciMethod* profiled_method() const { return _profiled_method; } 1.60 int profiled_bci() const { return _profiled_bci; } 1.61 + ciMethod* profiled_callee() const { return _profiled_callee; } 1.62 LIR_Opr mdo() const { return _mdo; } 1.63 LIR_Opr recv() const { return _recv; } 1.64 LIR_Opr tmp1() const { return _tmp1; } 1.65 @@ -2145,8 +2150,8 @@ 1.66 CodeEmitInfo* info_for_exception, CodeEmitInfo* info_for_patch, CodeStub* stub, 1.67 ciMethod* profiled_method, int profiled_bci); 1.68 // methodDataOop profiling 1.69 - void profile_call(ciMethod* method, int bci, LIR_Opr mdo, LIR_Opr recv, LIR_Opr t1, ciKlass* cha_klass) { 1.70 - append(new LIR_OpProfileCall(lir_profile_call, method, bci, mdo, recv, t1, cha_klass)); 1.71 + void profile_call(ciMethod* method, int bci, ciMethod* callee, LIR_Opr mdo, LIR_Opr recv, LIR_Opr t1, ciKlass* cha_klass) { 1.72 + append(new LIR_OpProfileCall(lir_profile_call, method, bci, callee, mdo, recv, t1, cha_klass)); 1.73 } 1.74 }; 1.75