comparison src/share/vm/c1/c1_Instruction.hpp @ 12882:ce0cc25bc5e2

8026054: New type profiling points: type of return values at calls Summary: x86 interpreter and c1 type profiling for return values at calls Reviewed-by: kvn, twisti
author roland
date Sat, 12 Oct 2013 12:12:59 +0200
parents d13d7aba8c12
children 2fd0fd493045
comparison
equal deleted inserted replaced
12881:ed2c74787eb5 12882:ce0cc25bc5e2
105 class UnsafeGetAndSetObject; 105 class UnsafeGetAndSetObject;
106 class UnsafePrefetch; 106 class UnsafePrefetch;
107 class UnsafePrefetchRead; 107 class UnsafePrefetchRead;
108 class UnsafePrefetchWrite; 108 class UnsafePrefetchWrite;
109 class ProfileCall; 109 class ProfileCall;
110 class ProfileReturnType;
110 class ProfileInvoke; 111 class ProfileInvoke;
111 class RuntimeCall; 112 class RuntimeCall;
112 class MemBar; 113 class MemBar;
113 class RangeCheckPredicate; 114 class RangeCheckPredicate;
114 #ifdef ASSERT 115 #ifdef ASSERT
209 virtual void do_UnsafePutObject(UnsafePutObject* x) = 0; 210 virtual void do_UnsafePutObject(UnsafePutObject* x) = 0;
210 virtual void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) = 0; 211 virtual void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) = 0;
211 virtual void do_UnsafePrefetchRead (UnsafePrefetchRead* x) = 0; 212 virtual void do_UnsafePrefetchRead (UnsafePrefetchRead* x) = 0;
212 virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) = 0; 213 virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) = 0;
213 virtual void do_ProfileCall (ProfileCall* x) = 0; 214 virtual void do_ProfileCall (ProfileCall* x) = 0;
215 virtual void do_ProfileReturnType (ProfileReturnType* x) = 0;
214 virtual void do_ProfileInvoke (ProfileInvoke* x) = 0; 216 virtual void do_ProfileInvoke (ProfileInvoke* x) = 0;
215 virtual void do_RuntimeCall (RuntimeCall* x) = 0; 217 virtual void do_RuntimeCall (RuntimeCall* x) = 0;
216 virtual void do_MemBar (MemBar* x) = 0; 218 virtual void do_MemBar (MemBar* x) = 0;
217 virtual void do_RangeCheckPredicate(RangeCheckPredicate* x) = 0; 219 virtual void do_RangeCheckPredicate(RangeCheckPredicate* x) = 0;
218 #ifdef ASSERT 220 #ifdef ASSERT
2516 f->visit(_obj_args->adr_at(i)); 2518 f->visit(_obj_args->adr_at(i));
2517 } 2519 }
2518 } 2520 }
2519 }; 2521 };
2520 2522
2523 LEAF(ProfileReturnType, Instruction)
2524 private:
2525 ciMethod* _method;
2526 ciMethod* _callee;
2527 int _bci_of_invoke;
2528 Value _ret;
2529
2530 public:
2531 ProfileReturnType(ciMethod* method, int bci, ciMethod* callee, Value ret)
2532 : Instruction(voidType)
2533 , _method(method)
2534 , _callee(callee)
2535 , _bci_of_invoke(bci)
2536 , _ret(ret)
2537 {
2538 set_needs_null_check(true);
2539 // The ProfileType has side-effects and must occur precisely where located
2540 pin();
2541 }
2542
2543 ciMethod* method() const { return _method; }
2544 ciMethod* callee() const { return _callee; }
2545 int bci_of_invoke() const { return _bci_of_invoke; }
2546 Value ret() const { return _ret; }
2547
2548 virtual void input_values_do(ValueVisitor* f) {
2549 if (_ret != NULL) {
2550 f->visit(&_ret);
2551 }
2552 }
2553 };
2554
2521 // Call some C runtime function that doesn't safepoint, 2555 // Call some C runtime function that doesn't safepoint,
2522 // optionally passing the current thread as the first argument. 2556 // optionally passing the current thread as the first argument.
2523 LEAF(RuntimeCall, Instruction) 2557 LEAF(RuntimeCall, Instruction)
2524 private: 2558 private:
2525 const char* _entry_name; 2559 const char* _entry_name;