8078897: Clean out unused code in G1MMUTracker
Reviewed-by: brutisso, jwilhelm, drwhite
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MMUTracker.cpp Wed Apr 29 15:25:41 2015 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MMUTracker.cpp Thu Apr 30 10:14:26 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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
@@ -76,9 +76,6 @@
}
void G1MMUTrackerQueue::add_pause(double start, double end, bool gc_thread) {
- double longest_allowed = longest_pause_internal(start);
- if (longest_allowed < 0.0)
- longest_allowed = 0.0;
double duration = end - start;
remove_expired_entries(end);
@@ -111,41 +108,6 @@
// this is for trying things out in the future and a couple
// of other places (debugging)
-double G1MMUTrackerQueue::longest_pause(double current_time) {
- if (_DISABLE_MMU)
- return _max_gc_time;
-
- MutexLockerEx x(MMUTracker_lock, Mutex::_no_safepoint_check_flag);
- remove_expired_entries(current_time);
-
- return longest_pause_internal(current_time);
-}
-
-double G1MMUTrackerQueue::longest_pause_internal(double current_time) {
- double target_time = _max_gc_time;
-
- while( 1 ) {
- double gc_time =
- calculate_gc_time(current_time + target_time);
- double diff = target_time + gc_time - _max_gc_time;
- if (!is_double_leq_0(diff)) {
- target_time -= diff;
- if (is_double_leq_0(target_time)) {
- target_time = -1.0;
- break;
- }
- } else {
- break;
- }
- }
-
- return target_time;
-}
-
-// basically the _internal call does not remove expired entries
-// this is for trying things out in the future and a couple
-// of other places (debugging)
-
double G1MMUTrackerQueue::when_sec(double current_time, double pause_time) {
if (_DISABLE_MMU)
return 0.0;
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MMUTracker.hpp Wed Apr 29 15:25:41 2015 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MMUTracker.hpp Thu Apr 30 10:14:26 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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
@@ -43,7 +43,6 @@
G1MMUTracker(double time_slice, double max_gc_time);
virtual void add_pause(double start, double end, bool gc_thread) = 0;
- virtual double longest_pause(double current_time) = 0;
virtual double when_sec(double current_time, double pause_time) = 0;
double max_gc_time() {
@@ -122,7 +121,6 @@
void remove_expired_entries(double current_time);
double calculate_gc_time(double current_time);
- double longest_pause_internal(double current_time);
double when_internal(double current_time, double pause_time);
public:
@@ -130,7 +128,6 @@
virtual void add_pause(double start, double end, bool gc_thread);
- virtual double longest_pause(double current_time);
virtual double when_sec(double current_time, double pause_time);
};