8061234: ResourceContext.requestAccurateUpdate() is unreliable

Thu, 30 Oct 2014 10:51:06 +0100

author
sjohanss
date
Thu, 30 Oct 2014 10:51:06 +0100
changeset 7298
ef9eda2c1abe
parent 7297
678a467a733b
child 7299
90297adbda9d
child 7302
41dcdd636080
child 7307
2eda90444a0d

8061234: ResourceContext.requestAccurateUpdate() is unreliable
Summary: Changing copy_allocation_context_stats to return if there are more stats available after the copy.
Reviewed-by: rriggs, jcoomes

src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/g1/g1CollectedHeap_ext.cpp file | annotate | diff | comparison | revisions
src/share/vm/gc_interface/collectedHeap.hpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Tue May 27 08:44:23 2014 -0700
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Thu Oct 30 10:51:06 2014 +0100
     1.3 @@ -1249,7 +1249,7 @@
     1.4    // The same as above but assume that the caller holds the Heap_lock.
     1.5    void collect_locked(GCCause::Cause cause);
     1.6  
     1.7 -  virtual void copy_allocation_context_stats(const jint* contexts,
     1.8 +  virtual bool copy_allocation_context_stats(const jint* contexts,
     1.9                                               jlong* totals,
    1.10                                               jbyte* accuracy,
    1.11                                               jint len);
     2.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap_ext.cpp	Tue May 27 08:44:23 2014 -0700
     2.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap_ext.cpp	Thu Oct 30 10:51:06 2014 +0100
     2.3 @@ -25,8 +25,9 @@
     2.4  #include "precompiled.hpp"
     2.5  #include "gc_implementation/g1/g1CollectedHeap.hpp"
     2.6  
     2.7 -void G1CollectedHeap::copy_allocation_context_stats(const jint* contexts,
     2.8 +bool G1CollectedHeap::copy_allocation_context_stats(const jint* contexts,
     2.9                                                      jlong* totals,
    2.10                                                      jbyte* accuracy,
    2.11                                                      jint len) {
    2.12 +  return false;
    2.13  }
     3.1 --- a/src/share/vm/gc_interface/collectedHeap.hpp	Tue May 27 08:44:23 2014 -0700
     3.2 +++ b/src/share/vm/gc_interface/collectedHeap.hpp	Thu Oct 30 10:51:06 2014 +0100
     3.3 @@ -641,10 +641,13 @@
     3.4    // For each context in contexts, set the corresponding entries in the totals
     3.5    // and accuracy arrays to the current values held by the statistics.  Each
     3.6    // array should be of length len.
     3.7 -  virtual void copy_allocation_context_stats(const jint* contexts,
     3.8 +  // Returns true if there are more stats available.
     3.9 +  virtual bool copy_allocation_context_stats(const jint* contexts,
    3.10                                               jlong* totals,
    3.11                                               jbyte* accuracy,
    3.12 -                                             jint len) { }
    3.13 +                                             jint len) {
    3.14 +    return false;
    3.15 +  }
    3.16  
    3.17    /////////////// Unit tests ///////////////
    3.18  

mercurial