--- a/hotspot/src/share/vm/oops/methodData.cpp Thu Jan 24 23:30:45 2013 -0800
+++ b/hotspot/src/share/vm/oops/methodData.cpp Fri Jan 25 15:06:18 2013 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, 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
@@ -27,6 +27,7 @@
#include "interpreter/bytecode.hpp"
#include "interpreter/bytecodeStream.hpp"
#include "interpreter/linkResolver.hpp"
+#include "memory/heapInspection.hpp"
#include "oops/methodData.hpp"
#include "prims/jvmtiRedefineClasses.hpp"
#include "runtime/compilationPolicy.hpp"
@@ -859,6 +860,15 @@
}
#endif
+#if INCLUDE_SERVICES
+// Size Statistics
+void MethodData::collect_statistics(KlassSizeStats *sz) const {
+ int n = sz->count(this);
+ sz->_method_data_bytes += n;
+ sz->_method_all_bytes += n;
+ sz->_rw_bytes += n;
+}
+#endif // INCLUDE_SERVICES
// Verification