< prev index next >

src/share/vm/oops/methodData.cpp

Print this page

@@ -27,10 +27,11 @@
 #include "compiler/compilerOracle.hpp"
 #include "interpreter/bytecode.hpp"
 #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"
 #include "runtime/arguments.hpp"
 #include "runtime/compilationPolicy.hpp"

@@ -710,11 +711,11 @@
 // a method.
 
 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);
 }
 
 int MethodData::bytecode_cell_count(Bytecodes::Code code) {
   if (is_client_compilation_mode_vm()) {

@@ -1610,10 +1611,15 @@
 
   assert(profile_parameters_jsr292_only(), "inconsistent");
   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;
   }
   if (!reset) {
< prev index next >