hotspot/src/share/vm/oops/methodData.cpp
changeset 46746 ea379ebb9447
parent 46630 75aa3e39d02c
--- a/hotspot/src/share/vm/oops/methodData.cpp	Sat Jul 22 15:54:27 2017 -0400
+++ b/hotspot/src/share/vm/oops/methodData.cpp	Wed Aug 02 18:06:38 2017 -0700
@@ -29,6 +29,7 @@
 #include "interpreter/bytecodeStream.hpp"
 #include "interpreter/linkResolver.hpp"
 #include "memory/heapInspection.hpp"
+#include "memory/metaspaceClosure.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/methodData.hpp"
 #include "prims/jvmtiRedefineClasses.hpp"
@@ -715,7 +716,7 @@
 MethodData* MethodData::allocate(ClassLoaderData* loader_data, const methodHandle& method, TRAPS) {
   int size = MethodData::compute_allocation_size_in_words(method);
 
-  return new (loader_data, size, false, MetaspaceObj::MethodDataType, THREAD)
+  return new (loader_data, size, MetaspaceObj::MethodDataType, THREAD)
     MethodData(method(), size, THREAD);
 }
 
@@ -1634,6 +1635,11 @@
   return m->is_compiled_lambda_form();
 }
 
+void MethodData::metaspace_pointers_do(MetaspaceClosure* it) {
+  log_trace(cds)("Iter(MethodData): %p", this);
+  it->push(&_method);
+}
+
 void MethodData::clean_extra_data_helper(DataLayout* dp, int shift, bool reset) {
   if (shift == 0) {
     return;