diff --git a/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp b/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp index 0e869f5b60767eaaea0d7880db559d747bf08faf..6aaa9dd5ff89cf4e38c165d3617ae907f255c0bc 100644 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @@ -1249,7 +1249,7 @@ public: // The same as above but assume that the caller holds the Heap_lock. void collect_locked(GCCause::Cause cause); - virtual void copy_allocation_context_stats(const jint* contexts, + virtual bool copy_allocation_context_stats(const jint* contexts, jlong* totals, jbyte* accuracy, jint len); diff --git a/src/share/vm/gc_implementation/g1/g1CollectedHeap_ext.cpp b/src/share/vm/gc_implementation/g1/g1CollectedHeap_ext.cpp index 401b28b6feec73dba7e024546091519c536ea336..7f71451b6cabfea9b5d81582913f8ff5fefa442b 100644 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap_ext.cpp +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap_ext.cpp @@ -25,8 +25,9 @@ #include "precompiled.hpp" #include "gc_implementation/g1/g1CollectedHeap.hpp" -void G1CollectedHeap::copy_allocation_context_stats(const jint* contexts, +bool G1CollectedHeap::copy_allocation_context_stats(const jint* contexts, jlong* totals, jbyte* accuracy, jint len) { + return false; } diff --git a/src/share/vm/gc_interface/collectedHeap.hpp b/src/share/vm/gc_interface/collectedHeap.hpp index b03c1cc4ea249ccdaed2eade622d188d16273a93..dd4c3db3f3c2efcbcbc3a3cbb89c56b4a0a4b9c1 100644 --- a/src/share/vm/gc_interface/collectedHeap.hpp +++ b/src/share/vm/gc_interface/collectedHeap.hpp @@ -641,10 +641,13 @@ class CollectedHeap : public CHeapObj { // For each context in contexts, set the corresponding entries in the totals // and accuracy arrays to the current values held by the statistics. Each // array should be of length len. - virtual void copy_allocation_context_stats(const jint* contexts, + // Returns true if there are more stats available. + virtual bool copy_allocation_context_stats(const jint* contexts, jlong* totals, jbyte* accuracy, - jint len) { } + jint len) { + return false; + } /////////////// Unit tests ///////////////