src/share/vm/oops/methodData.cpp

changeset 4497
16fb9f942703
parent 4037
da91efe96a93
child 4712
3efdfd6ddbf2
     1.1 --- a/src/share/vm/oops/methodData.cpp	Thu Jan 24 23:30:45 2013 -0800
     1.2 +++ b/src/share/vm/oops/methodData.cpp	Fri Jan 25 15:06:18 2013 -0500
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -27,6 +27,7 @@
    1.11  #include "interpreter/bytecode.hpp"
    1.12  #include "interpreter/bytecodeStream.hpp"
    1.13  #include "interpreter/linkResolver.hpp"
    1.14 +#include "memory/heapInspection.hpp"
    1.15  #include "oops/methodData.hpp"
    1.16  #include "prims/jvmtiRedefineClasses.hpp"
    1.17  #include "runtime/compilationPolicy.hpp"
    1.18 @@ -859,6 +860,15 @@
    1.19  }
    1.20  #endif
    1.21  
    1.22 +#if INCLUDE_SERVICES
    1.23 +// Size Statistics
    1.24 +void MethodData::collect_statistics(KlassSizeStats *sz) const {
    1.25 +  int n = sz->count(this);
    1.26 +  sz->_method_data_bytes += n;
    1.27 +  sz->_method_all_bytes += n;
    1.28 +  sz->_rw_bytes += n;
    1.29 +}
    1.30 +#endif // INCLUDE_SERVICES
    1.31  
    1.32  // Verification
    1.33  

mercurial