hotspot/src/share/vm/oops/method.hpp
changeset 46746 ea379ebb9447
parent 46727 6e4a84748e2c
--- a/hotspot/src/share/vm/oops/method.hpp	Sat Jul 22 15:54:27 2017 -0400
+++ b/hotspot/src/share/vm/oops/method.hpp	Wed Aug 02 18:06:38 2017 -0700
@@ -66,6 +66,8 @@
  friend class VMStructs;
  friend class JVMCIVMStructs;
  private:
+  // If you add a new field that points to any metaspace object, you
+  // must add this field to Method::metaspace_pointers_do().
   ConstMethod*      _constMethod;                // Method read-only data.
   MethodData*       _method_data;
   MethodCounters*   _method_counters;
@@ -471,6 +473,9 @@
   // clear entry points. Used by sharing code during dump time
   void unlink_method() NOT_CDS_RETURN;
 
+  virtual void metaspace_pointers_do(MetaspaceClosure* iter);
+  virtual MetaspaceObj::Type type() const { return MethodType; }
+
   // vtable index
   enum VtableIndexFlag {
     // Valid vtable indexes are non-negative (>= 0).