8198420: Remove unused extension point AllocationContextStats

Reviewed-by: ehelin, tschatzl
This commit is contained in:
Stefan Johansson 2018-02-23 09:38:33 +01:00
parent 1bb8fd058c
commit 38dcf9fdf1
15 changed files with 2 additions and 118 deletions

View File

@ -41,12 +41,4 @@ public:
}
};
class AllocationContextStats: public StackObj {
public:
inline void clear() { }
inline void update(bool full_gc) { }
inline void update_after_mark() { }
inline bool available() { return false; }
};
#endif // SHARE_VM_GC_G1_G1ALLOCATIONCONTEXT_HPP

View File

@ -1995,7 +1995,6 @@ bool G1CollectedHeap::is_user_requested_concurrent_full_gc(GCCause::Cause cause
switch (cause) {
case GCCause::_java_lang_system_gc: return ExplicitGCInvokesConcurrent;
case GCCause::_dcmd_gc_run: return ExplicitGCInvokesConcurrent;
case GCCause::_update_allocation_context_stats_inc: return true;
case GCCause::_wb_conc_mark: return true;
default : return false;
}
@ -2548,8 +2547,6 @@ void G1CollectedHeap::gc_epilogue(bool full) {
resize_all_tlabs();
g1_policy()->phase_times()->record_resize_tlab_time_ms((os::elapsedTime() - start) * 1000.0);
allocation_context_stats().update(full);
MemoryService::track_memory_usage();
// We have just completed a GC. Update the soft reference
// policy with the new heap occupancy

View File

@ -225,9 +225,6 @@ private:
// Class that handles archive allocation ranges.
G1ArchiveAllocator* _archive_allocator;
// Statistics for each allocation context
AllocationContextStats _allocation_context_stats;
// GC allocation statistics policy for survivors.
G1EvacStats _survivor_evac_stats;
@ -280,8 +277,7 @@ private:
// (b) cause == _g1_humongous_allocation
// (c) cause == _java_lang_system_gc and +ExplicitGCInvokesConcurrent.
// (d) cause == _dcmd_gc_run and +ExplicitGCInvokesConcurrent.
// (e) cause == _update_allocation_context_stats_inc
// (f) cause == _wb_conc_mark
// (e) cause == _wb_conc_mark
bool should_do_concurrent_full_gc(GCCause::Cause cause);
// indicates whether we are in young or mixed GC mode
@ -583,8 +579,6 @@ public:
// Determines PLAB size for a given destination.
inline size_t desired_plab_sz(InCSetState dest);
inline AllocationContextStats& allocation_context_stats();
// Do anything common to GC's.
void gc_prologue(bool full);
void gc_epilogue(bool full);
@ -1132,11 +1126,6 @@ public:
// "CollectedHeap" supports.
virtual void collect(GCCause::Cause cause);
virtual bool copy_allocation_context_stats(const jint* contexts,
jlong* totals,
jbyte* accuracy,
jint len);
// True iff an evacuation has failed in the most-recent collection.
bool evacuation_failed() { return _evacuation_failed; }

View File

@ -57,10 +57,6 @@ size_t G1CollectedHeap::desired_plab_sz(InCSetState dest) {
// Inline functions for G1CollectedHeap
inline AllocationContextStats& G1CollectedHeap::allocation_context_stats() {
return _allocation_context_stats;
}
// Return the region with the given index. It assumes the index is valid.
inline HeapRegion* G1CollectedHeap::region_at(uint index) const { return _hrm.at(index); }

View File

@ -30,13 +30,6 @@
class STWGCTimer;
bool G1CollectedHeap::copy_allocation_context_stats(const jint* contexts,
jlong* totals,
jbyte* accuracy,
jint len) {
return false;
}
G1Policy* G1CollectedHeap::create_g1_policy(STWGCTimer* gc_timer) {
return new G1DefaultPolicy(gc_timer);
}

View File

@ -1276,7 +1276,6 @@ void G1ConcurrentMark::cleanup() {
// We reclaimed old regions so we should calculate the sizes to make
// sure we update the old gen/space data.
g1h->g1mm()->update_sizes();
g1h->allocation_context_stats().update_after_mark();
}
void G1ConcurrentMark::complete_cleanup() {

View File

@ -607,20 +607,6 @@ class CollectedHeap : public CHeapObj<mtInternal> {
return (CIFireOOMAt > 1 && _fire_out_of_memory_count >= CIFireOOMAt);
}
#endif
public:
// 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.
// Returns true if there are more stats available.
virtual bool copy_allocation_context_stats(const jint* contexts,
jlong* totals,
jbyte* accuracy,
jint len) {
return false;
}
};
// Class to set and reset the GC cause for a CollectedHeap.

View File

@ -60,10 +60,6 @@ const char* GCCause::to_string(GCCause::Cause cause) {
case _wb_full_gc:
return "WhiteBox Initiated Full GC";
case _update_allocation_context_stats_inc:
case _update_allocation_context_stats_full:
return "Update Allocation Context Stats";
case _no_gc:
return "No GC";

View File

@ -52,8 +52,6 @@ class GCCause : public AllStatic {
_wb_young_gc,
_wb_conc_mark,
_wb_full_gc,
_update_allocation_context_stats_inc,
_update_allocation_context_stats_full,
/* implementation independent, but reserved for GC use */
_no_gc,

View File

@ -134,7 +134,6 @@ oop Universe::_null_ptr_exception_instance = NULL;
oop Universe::_arithmetic_exception_instance = NULL;
oop Universe::_virtual_machine_error_instance = NULL;
oop Universe::_vm_exception = NULL;
oop Universe::_allocation_context_notification_obj = NULL;
oop Universe::_reference_pending_list = NULL;
Array<int>* Universe::_the_empty_int_array = NULL;
@ -213,7 +212,6 @@ void Universe::oops_do(OopClosure* f, bool do_all) {
f->do_oop((oop*)&_main_thread_group);
f->do_oop((oop*)&_system_thread_group);
f->do_oop((oop*)&_vm_exception);
f->do_oop((oop*)&_allocation_context_notification_obj);
f->do_oop((oop*)&_reference_pending_list);
debug_only(f->do_oop((oop*)&_fullgc_alot_dummy_array);)
}

View File

@ -181,8 +181,6 @@ class Universe: AllStatic {
// the vm thread.
static oop _vm_exception;
static oop _allocation_context_notification_obj;
// References waiting to be transferred to the ReferenceHandler
static oop _reference_pending_list;
@ -334,9 +332,6 @@ class Universe: AllStatic {
static oop virtual_machine_error_instance() { return _virtual_machine_error_instance; }
static oop vm_exception() { return _vm_exception; }
static inline oop allocation_context_notification_obj();
static inline void set_allocation_context_notification_obj(oop obj);
// Reference pending list manipulation. Access is protected by
// Heap_lock. The getter, setter and predicate require the caller
// owns the lock. Swap is used by parallel non-concurrent reference

View File

@ -41,12 +41,4 @@ inline bool Universe::field_type_should_be_aligned(BasicType type) {
return type == T_DOUBLE || type == T_LONG;
}
inline oop Universe::allocation_context_notification_obj() {
return _allocation_context_notification_obj;
}
inline void Universe::set_allocation_context_notification_obj(oop obj) {
_allocation_context_notification_obj = obj;
}
#endif // SHARE_VM_MEMORY_UNIVERSE_INLINE_HPP

View File

@ -29,7 +29,6 @@
#include "runtime/mutexLocker.hpp"
#include "runtime/os.hpp"
#include "prims/jvmtiImpl.hpp"
#include "services/allocationContextService.hpp"
#include "services/diagnosticArgument.hpp"
#include "services/diagnosticFramework.hpp"
#include "services/gcNotifier.hpp"
@ -105,8 +104,7 @@ void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
while (!(sensors_changed = LowMemoryDetector::has_pending_requests()) &&
!(has_jvmti_events = JvmtiDeferredEventQueue::has_events()) &&
!(has_gc_notification_event = GCNotifier::has_event()) &&
!(has_dcmd_notification_event = DCmdFactory::has_pending_jmx_notification()) &&
!(acs_notify = AllocationContextService::should_notify())) {
!(has_dcmd_notification_event = DCmdFactory::has_pending_jmx_notification())) {
// wait until one of the sensors has pending requests, or there is a
// pending JVMTI event or JMX GC notification to post
Service_lock->wait(Mutex::_no_safepoint_check_flag);
@ -132,10 +130,6 @@ void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
if(has_dcmd_notification_event) {
DCmdFactory::send_notification(CHECK);
}
if (acs_notify) {
AllocationContextService::notify(CHECK);
}
}
}

View File

@ -1,39 +0,0 @@
/*
* 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.
*
*/
#ifndef SHARE_VM_SERVICES_ALLOCATION_CONTEXT_SERVICE_HPP
#define SHARE_VM_SERVICES_ALLOCATION_CONTEXT_SERVICE_HPP
#include "utilities/exceptions.hpp"
class AllocationContextService: public AllStatic {
public:
static inline bool should_notify();
static inline void notify(TRAPS);
};
bool AllocationContextService::should_notify() { return false; }
void AllocationContextService::notify(TRAPS) { }
#endif // SHARE_VM_SERVICES_ALLOCATION_CONTEXT_SERVICE_HPP

View File

@ -38,8 +38,6 @@ public enum GCCause {
_wb_young_gc ("WhiteBox Initiated Young GC"),
_wb_conc_mark ("WhiteBox Initiated Concurrent Mark"),
_wb_full_gc ("WhiteBox Initiated Full GC"),
_update_allocation_context_stats_inc ("Update Allocation Context Stats"),
_update_allocation_context_stats_full ("Update Allocation Context Stats"),
_no_gc ("No GC"),
_no_cause_specified ("Unknown GCCause"),