diff a/src/hotspot/share/ci/ciMethod.hpp b/src/hotspot/share/ci/ciMethod.hpp
--- a/src/hotspot/share/ci/ciMethod.hpp
+++ b/src/hotspot/share/ci/ciMethod.hpp
@@ -70,10 +70,11 @@
   ciFlags          _flags;
   ciSymbol*        _name;
   ciInstanceKlass* _holder;
   ciSignature*     _signature;
   ciMethodData*    _method_data;
+  ciMethodData*    _method_data_recorded;
   ciMethodBlocks*   _method_blocks;
 
   // Code attributes.
   int _code_size;
   int _max_stack;
@@ -93,10 +94,12 @@
   bool _can_be_statically_bound;
   bool _can_omit_stack_trace;
   bool _has_reserved_stack_access;
   bool _is_overpass;
 
+  GrowableArray<int>* _has_trap_at_bci;
+
   // Lazy fields, filled in on demand
   address              _code;
   ciExceptionHandler** _exception_handlers;
 
   // Optional liveness analyzer.
@@ -115,11 +118,11 @@
 
   void print_impl(outputStream* st);
 
   void load_code();
 
-  bool ensure_method_data(const methodHandle& h_m);
+  bool ensure_method_data(const methodHandle& h_m, bool training_data_only);
 
   void code_at_put(int bci, Bytecodes::Code code) {
     Bytecodes::check(code);
     assert(0 <= bci && bci < code_size(), "valid bci");
     address bcp = _code + bci;
@@ -192,17 +195,19 @@
   int size_of_parameters() const                 { check_is_loaded(); return _size_of_parameters; }
 
   // Code size for inlining decisions.
   int code_size_for_inlining();
 
-  bool caller_sensitive()       const { return get_Method()->caller_sensitive();       }
-  bool force_inline()           const { return get_Method()->force_inline();           }
-  bool dont_inline()            const { return get_Method()->dont_inline();            }
-  bool intrinsic_candidate()    const { return get_Method()->intrinsic_candidate();    }
-  bool is_static_initializer()  const { return get_Method()->is_static_initializer();  }
-  bool changes_current_thread() const { return get_Method()->changes_current_thread(); }
-  bool deprecated()             const { return is_loaded() && get_Method()->deprecated(); }
+  bool caller_sensitive()           const { return get_Method()->caller_sensitive();           }
+  bool force_inline()               const { return get_Method()->force_inline();               }
+  bool dont_inline()                const { return get_Method()->dont_inline();                }
+  bool intrinsic_candidate()        const { return get_Method()->intrinsic_candidate();        }
+  bool is_static_initializer()      const { return get_Method()->is_static_initializer();      }
+  bool changes_current_thread()     const { return get_Method()->changes_current_thread();     }
+  bool deprecated()                 const { return is_loaded() && get_Method()->deprecated();  }
+  bool has_upcall_on_method_entry() const { return get_Method()->has_upcall_on_method_entry(); }
+  bool has_upcall_on_method_exit()  const { return get_Method()->has_upcall_on_method_exit();  }
 
   bool check_intrinsic_candidate() const {
     if (intrinsic_id() == vmIntrinsics::_blackhole) {
       // This is the intrinsic without an associated method, so no intrinsic_candidate
       // flag is set. The intrinsic is still correct.
@@ -312,11 +317,11 @@
   bool is_not_reached(int bci);
   bool was_executed_more_than(int times);
   bool has_unloaded_classes_in_signature();
   bool is_klass_loaded(int refinfo_index, Bytecodes::Code bc, bool must_be_resolved) const;
   bool check_call(int refinfo_index, bool is_static) const;
-  bool ensure_method_data();  // make sure it exists in the VM also
+  bool ensure_method_data(bool training_data_only = false);  // make sure it exists in the VM also
   MethodCounters* ensure_method_counters();
 
   int inline_instructions_size();
   int scale_count(int count, float prof_factor = 1.);  // make MDO count commensurate with IIC
 
@@ -382,8 +387,12 @@
   // Print the name of this method in various incarnations.
   void print_name(outputStream* st = tty);
   void print_short_name(outputStream* st = tty);
 
   static bool is_consistent_info(ciMethod* declared_method, ciMethod* resolved_method);
+  bool has_trap_at(int bci) {
+    return _has_trap_at_bci != nullptr &&
+           _has_trap_at_bci->contains(bci);
+  }
 };
 
 #endif // SHARE_CI_CIMETHOD_HPP
