1896 : LIR_Op(lir_profile_call, LIR_OprFact::illegalOpr, NULL) // no result, no info 1897 , _profiled_method(profiled_method) 1898 , _profiled_bci(profiled_bci) 1899 , _profiled_callee(profiled_callee) 1900 , _mdo(mdo) 1901 , _recv(recv) 1902 , _tmp1(t1) 1903 , _known_holder(known_holder) { } 1904 1905 ciMethod* profiled_method() const { return _profiled_method; } 1906 int profiled_bci() const { return _profiled_bci; } 1907 ciMethod* profiled_callee() const { return _profiled_callee; } 1908 LIR_Opr mdo() const { return _mdo; } 1909 LIR_Opr recv() const { return _recv; } 1910 LIR_Opr tmp1() const { return _tmp1; } 1911 ciKlass* known_holder() const { return _known_holder; } 1912 1913 virtual void emit_code(LIR_Assembler* masm); 1914 virtual LIR_OpProfileCall* as_OpProfileCall() { return this; } 1915 virtual void print_instr(outputStream* out) const PRODUCT_RETURN; 1916 }; 1917 1918 // LIR_OpProfileType 1919 class LIR_OpProfileType : public LIR_Op { 1920 friend class LIR_OpVisitState; 1921 1922 private: 1923 LIR_Opr _mdp; 1924 LIR_Opr _obj; 1925 LIR_Opr _tmp; 1926 ciKlass* _exact_klass; // non NULL if we know the klass statically (no need to load it from _obj) 1927 intptr_t _current_klass; // what the profiling currently reports 1928 bool _not_null; // true if we know statically that _obj cannot be null 1929 bool _no_conflict; // true if we're profling parameters, _exact_klass is not NULL and we know 1930 // _exact_klass it the only possible type for this parameter in any context. 1931 1932 public: 1933 // Destroys recv 1934 LIR_OpProfileType(LIR_Opr mdp, LIR_Opr obj, ciKlass* exact_klass, intptr_t current_klass, LIR_Opr tmp, bool not_null, bool no_conflict) 1935 : LIR_Op(lir_profile_type, LIR_OprFact::illegalOpr, NULL) // no result, no info | 1896 : LIR_Op(lir_profile_call, LIR_OprFact::illegalOpr, NULL) // no result, no info 1897 , _profiled_method(profiled_method) 1898 , _profiled_bci(profiled_bci) 1899 , _profiled_callee(profiled_callee) 1900 , _mdo(mdo) 1901 , _recv(recv) 1902 , _tmp1(t1) 1903 , _known_holder(known_holder) { } 1904 1905 ciMethod* profiled_method() const { return _profiled_method; } 1906 int profiled_bci() const { return _profiled_bci; } 1907 ciMethod* profiled_callee() const { return _profiled_callee; } 1908 LIR_Opr mdo() const { return _mdo; } 1909 LIR_Opr recv() const { return _recv; } 1910 LIR_Opr tmp1() const { return _tmp1; } 1911 ciKlass* known_holder() const { return _known_holder; } 1912 1913 virtual void emit_code(LIR_Assembler* masm); 1914 virtual LIR_OpProfileCall* as_OpProfileCall() { return this; } 1915 virtual void print_instr(outputStream* out) const PRODUCT_RETURN; 1916 bool should_profile_receiver_type() const { 1917 bool callee_is_static = _profiled_callee->is_loaded() && _profiled_callee->is_static(); 1918 Bytecodes::Code bc = _profiled_method->java_code_at_bci(_profiled_bci); 1919 bool call_is_virtual = (bc == Bytecodes::_invokevirtual && !_profiled_callee->can_be_statically_bound()) || bc == Bytecodes::_invokeinterface; 1920 return C1ProfileVirtualCalls && call_is_virtual && !callee_is_static; 1921 } 1922 }; 1923 1924 // LIR_OpProfileType 1925 class LIR_OpProfileType : public LIR_Op { 1926 friend class LIR_OpVisitState; 1927 1928 private: 1929 LIR_Opr _mdp; 1930 LIR_Opr _obj; 1931 LIR_Opr _tmp; 1932 ciKlass* _exact_klass; // non NULL if we know the klass statically (no need to load it from _obj) 1933 intptr_t _current_klass; // what the profiling currently reports 1934 bool _not_null; // true if we know statically that _obj cannot be null 1935 bool _no_conflict; // true if we're profling parameters, _exact_klass is not NULL and we know 1936 // _exact_klass it the only possible type for this parameter in any context. 1937 1938 public: 1939 // Destroys recv 1940 LIR_OpProfileType(LIR_Opr mdp, LIR_Opr obj, ciKlass* exact_klass, intptr_t current_klass, LIR_Opr tmp, bool not_null, bool no_conflict) 1941 : LIR_Op(lir_profile_type, LIR_OprFact::illegalOpr, NULL) // no result, no info |