< prev index next >
src/share/vm/oops/method.cpp
Print this page
*** 35,44 ****
--- 35,45 ----
#include "interpreter/bytecodes.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/oopMapCache.hpp"
#include "memory/heapInspection.hpp"
#include "memory/metadataFactory.hpp"
+ #include "memory/metaspaceClosure.hpp"
#include "memory/metaspaceShared.hpp"
#include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp"
#include "oops/constMethod.hpp"
#include "oops/method.hpp"
*** 75,85 ****
byte_code_size,
sizes,
method_type,
CHECK_NULL);
int size = Method::size(access_flags.is_native());
! return new (loader_data, size, false, MetaspaceObj::MethodType, THREAD) Method(cm, access_flags);
}
Method::Method(ConstMethod* xconst, AccessFlags access_flags) {
NoSafepointVerifier no_safepoint;
set_constMethod(xconst);
--- 76,86 ----
byte_code_size,
sizes,
method_type,
CHECK_NULL);
int size = Method::size(access_flags.is_native());
! return new (loader_data, size, MetaspaceObj::MethodType, THREAD) Method(cm, access_flags);
}
Method::Method(ConstMethod* xconst, AccessFlags access_flags) {
NoSafepointVerifier no_safepoint;
set_constMethod(xconst);
*** 301,310 ****
--- 302,319 ----
Symbol* Method::klass_name() const {
return method_holder()->name();
}
+ void Method::metaspace_pointers_do(MetaspaceClosure* it) {
+ log_trace(cds)("Iter(Method): %p", this);
+
+ it->push(&_constMethod);
+ it->push(&_method_data);
+ it->push(&_method_counters);
+ }
+
// Attempt to return method oop to original state. Clear any pointers
// (to objects outside the shared spaces). We won't be able to predict
// where they should point in a new JVM. Further initialize some
// entries now in order allow them to be write protected later.
< prev index next >