Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/space.hpp @ 4091:d06a2d7fcd5b
7110718: -XX:MarkSweepAlwaysCompactCount=0 crashes the JVM
Summary: Interpret MarkSweepAlwaysCompactCount < 1 as never do full compaction
Reviewed-by: ysr, tonyp, jmasa, johnc
author | brutisso |
---|---|
date | Mon, 21 Nov 2011 07:47:34 +0100 |
parents | f08d439fab8c |
children | 3c648b9ad052 |
comparison
equal
deleted
inserted
replaced
4090:a88de71c4e3a | 4091:d06a2d7fcd5b |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
531 * we don't start compacting before there is a significant gain to be made.\ | 531 * we don't start compacting before there is a significant gain to be made.\ |
532 * Occasionally, we want to ensure a full compaction, which is determined \ | 532 * Occasionally, we want to ensure a full compaction, which is determined \ |
533 * by the MarkSweepAlwaysCompactCount parameter. \ | 533 * by the MarkSweepAlwaysCompactCount parameter. \ |
534 */ \ | 534 */ \ |
535 int invocations = SharedHeap::heap()->perm_gen()->stat_record()->invocations;\ | 535 int invocations = SharedHeap::heap()->perm_gen()->stat_record()->invocations;\ |
536 bool skip_dead = ((invocations % MarkSweepAlwaysCompactCount) != 0); \ | 536 bool skip_dead = (MarkSweepAlwaysCompactCount < 1) \ |
537 ||((invocations % MarkSweepAlwaysCompactCount) != 0); \ | |
537 \ | 538 \ |
538 size_t allowed_deadspace = 0; \ | 539 size_t allowed_deadspace = 0; \ |
539 if (skip_dead) { \ | 540 if (skip_dead) { \ |
540 const size_t ratio = allowed_dead_ratio(); \ | 541 const size_t ratio = allowed_dead_ratio(); \ |
541 allowed_deadspace = (capacity() * ratio / 100) / HeapWordSize; \ | 542 allowed_deadspace = (capacity() * ratio / 100) / HeapWordSize; \ |