src/share/vm/oops/methodData.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2000, 2012, 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.
--- 1,7 ----
/*
! * 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 25,34 ****
--- 25,35 ----
#include "precompiled.hpp"
#include "classfile/systemDictionary.hpp"
#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"
#include "runtime/deoptimization.hpp"
#include "runtime/handles.inline.hpp"
*** 857,866 ****
--- 858,876 ----
data->print_data_on(st);
}
}
#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
void MethodData::verify_on(outputStream* st) {
guarantee(is_methodData(), "object must be method data");