mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8057824: methods to copy allocation context statistics
Reviewed-by: mikael, jmasa, tschatzl
This commit is contained in:
parent
40155ae18d
commit
fd0e5093ca
3 changed files with 46 additions and 0 deletions
|
@ -1250,6 +1250,11 @@ public:
|
||||||
// The same as above but assume that the caller holds the Heap_lock.
|
// The same as above but assume that the caller holds the Heap_lock.
|
||||||
void collect_locked(GCCause::Cause cause);
|
void collect_locked(GCCause::Cause cause);
|
||||||
|
|
||||||
|
virtual void copy_allocation_context_stats(const jint* contexts,
|
||||||
|
jlong* totals,
|
||||||
|
jbyte* accuracy,
|
||||||
|
jint len);
|
||||||
|
|
||||||
// True iff an evacuation has failed in the most-recent collection.
|
// True iff an evacuation has failed in the most-recent collection.
|
||||||
bool evacuation_failed() { return _evacuation_failed; }
|
bool evacuation_failed() { return _evacuation_failed; }
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2014, 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.
|
||||||
|
*
|
||||||
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
* version 2 for more details (a copy is included in the LICENSE file that
|
||||||
|
* accompanied this code).
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License version
|
||||||
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
|
* or visit www.oracle.com if you need additional information or have any
|
||||||
|
* questions.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "precompiled.hpp"
|
||||||
|
#include "gc_implementation/g1/g1CollectedHeap.hpp"
|
||||||
|
|
||||||
|
void G1CollectedHeap::copy_allocation_context_stats(const jint* contexts,
|
||||||
|
jlong* totals,
|
||||||
|
jbyte* accuracy,
|
||||||
|
jint len) {
|
||||||
|
}
|
|
@ -640,6 +640,15 @@ class CollectedHeap : public CHeapObj<mtInternal> {
|
||||||
// actual number may be germane.
|
// actual number may be germane.
|
||||||
static bool use_parallel_gc_threads() { return ParallelGCThreads > 0; }
|
static bool use_parallel_gc_threads() { return ParallelGCThreads > 0; }
|
||||||
|
|
||||||
|
// Copy the current allocation context statistics for the specified contexts.
|
||||||
|
// 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,
|
||||||
|
jlong* totals,
|
||||||
|
jbyte* accuracy,
|
||||||
|
jint len) { }
|
||||||
|
|
||||||
/////////////// Unit tests ///////////////
|
/////////////// Unit tests ///////////////
|
||||||
|
|
||||||
NOT_PRODUCT(static void test_is_in();)
|
NOT_PRODUCT(static void test_is_in();)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue