< prev index next >

src/share/vm/oops/methodCounters.cpp

Print this page

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -25,11 +25,11 @@
 #include "oops/methodCounters.hpp"
 #include "runtime/handles.inline.hpp"
 
 MethodCounters* MethodCounters::allocate(methodHandle mh, TRAPS) {
   ClassLoaderData* loader_data = mh->method_holder()->class_loader_data();
-  return new(loader_data, size(), false, MetaspaceObj::MethodCountersType, THREAD) MethodCounters(mh);
+  return new(loader_data, method_counters_size(), MetaspaceObj::MethodCountersType, THREAD) MethodCounters(mh);
 }
 
 void MethodCounters::clear_counters() {
   invocation_counter()->reset();
   backedge_counter()->reset();

@@ -71,10 +71,13 @@
 #ifdef TIERED
   _highest_osr_comp_level = level;
 #endif
 }
 
+void MethodCounters::metaspace_pointers_do(MetaspaceClosure* it) {
+  tty->print_cr("Iter(MethodCounters): %p", this); // No embedded pointers
+}
 
 void MethodCounters::print_value_on(outputStream* st) const {
   assert(is_methodCounters(), "must be methodCounters");
   st->print("method counters");
   print_address_on(st);
< prev index next >