7110718: -XX:MarkSweepAlwaysCompactCount=0 crashes the JVM
Interpret MarkSweepAlwaysCompactCount < 1 as never do full compaction Reviewed-by: ysr, tonyp, jmasa, johnc
This commit is contained in:
parent
3cd36270b7
commit
40c94189f7
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -96,7 +96,8 @@ void PSMarkSweepDecorator::precompact() {
|
|||||||
* by the MarkSweepAlwaysCompactCount parameter. This is a significant
|
* by the MarkSweepAlwaysCompactCount parameter. This is a significant
|
||||||
* performance improvement!
|
* performance improvement!
|
||||||
*/
|
*/
|
||||||
bool skip_dead = ((PSMarkSweep::total_invocations() % MarkSweepAlwaysCompactCount) != 0);
|
bool skip_dead = (MarkSweepAlwaysCompactCount < 1)
|
||||||
|
|| ((PSMarkSweep::total_invocations() % MarkSweepAlwaysCompactCount) != 0);
|
||||||
|
|
||||||
size_t allowed_deadspace = 0;
|
size_t allowed_deadspace = 0;
|
||||||
if (skip_dead) {
|
if (skip_dead) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -533,7 +533,8 @@ protected:
|
|||||||
* by the MarkSweepAlwaysCompactCount parameter. \
|
* by the MarkSweepAlwaysCompactCount parameter. \
|
||||||
*/ \
|
*/ \
|
||||||
int invocations = SharedHeap::heap()->perm_gen()->stat_record()->invocations;\
|
int invocations = SharedHeap::heap()->perm_gen()->stat_record()->invocations;\
|
||||||
bool skip_dead = ((invocations % MarkSweepAlwaysCompactCount) != 0); \
|
bool skip_dead = (MarkSweepAlwaysCompactCount < 1) \
|
||||||
|
||((invocations % MarkSweepAlwaysCompactCount) != 0); \
|
||||||
\
|
\
|
||||||
size_t allowed_deadspace = 0; \
|
size_t allowed_deadspace = 0; \
|
||||||
if (skip_dead) { \
|
if (skip_dead) { \
|
||||||
|
Loading…
Reference in New Issue
Block a user