--- a/src/hotspot/share/gc/shared/collectedHeap.inline.hpp Thu Mar 15 21:24:10 2018 +0100
+++ b/src/hotspot/share/gc/shared/collectedHeap.inline.hpp Thu Mar 15 21:29:36 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, 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
@@ -299,39 +299,4 @@
}
}
-#ifndef PRODUCT
-
-inline bool
-CollectedHeap::promotion_should_fail(volatile size_t* count) {
- // Access to count is not atomic; the value does not have to be exact.
- if (PromotionFailureALot) {
- const size_t gc_num = total_collections();
- const size_t elapsed_gcs = gc_num - _promotion_failure_alot_gc_number;
- if (elapsed_gcs >= PromotionFailureALotInterval) {
- // Test for unsigned arithmetic wrap-around.
- if (++*count >= PromotionFailureALotCount) {
- *count = 0;
- return true;
- }
- }
- }
- return false;
-}
-
-inline bool CollectedHeap::promotion_should_fail() {
- return promotion_should_fail(&_promotion_failure_alot_count);
-}
-
-inline void CollectedHeap::reset_promotion_should_fail(volatile size_t* count) {
- if (PromotionFailureALot) {
- _promotion_failure_alot_gc_number = total_collections();
- *count = 0;
- }
-}
-
-inline void CollectedHeap::reset_promotion_should_fail() {
- reset_promotion_should_fail(&_promotion_failure_alot_count);
-}
-#endif // #ifndef PRODUCT
-
#endif // SHARE_VM_GC_SHARED_COLLECTEDHEAP_INLINE_HPP