src/hotspot/share/gc/z/zGlobals.cpp
author pliden
Wed, 20 Nov 2019 10:37:46 +0100
changeset 59149 3b998574be4b
parent 58294 872465abbfe3
permissions -rw-r--r--
8234338: ZGC: Improve small heap usage Reviewed-by: eosterlund, stefank
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     1
/*
54617
24f6b0e413a0 8221786: ZGC: Increase max heap size to 16TB
pliden
parents: 50525
diff changeset
     2
 * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     4
 *
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     7
 * published by the Free Software Foundation.
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     8
 *
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    13
 * accompanied this code).
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    14
 *
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    18
 *
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    21
 * questions.
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    22
 */
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    23
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    24
#include "precompiled.hpp"
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    25
#include "gc/z/zGlobals.hpp"
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    26
59149
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    27
uint32_t   ZGlobalPhase                = ZPhaseRelocate;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    28
uint32_t   ZGlobalSeqNum               = 1;
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    29
59149
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    30
size_t     ZPageSizeMediumShift;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    31
size_t     ZPageSizeMedium;
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    32
59149
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    33
size_t     ZObjectSizeLimitMedium;
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    34
59149
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    35
const int& ZObjectAlignmentSmallShift  = LogMinObjAlignmentInBytes;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    36
int        ZObjectAlignmentMediumShift;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    37
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    38
const int& ZObjectAlignmentSmall       = MinObjAlignmentInBytes;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    39
int        ZObjectAlignmentMedium;
54617
24f6b0e413a0 8221786: ZGC: Increase max heap size to 16TB
pliden
parents: 50525
diff changeset
    40
59149
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    41
uintptr_t  ZAddressGoodMask;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    42
uintptr_t  ZAddressBadMask;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    43
uintptr_t  ZAddressWeakBadMask;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    44
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    45
uintptr_t  ZAddressBase;
54617
24f6b0e413a0 8221786: ZGC: Increase max heap size to 16TB
pliden
parents: 50525
diff changeset
    46
59149
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    47
size_t     ZAddressOffsetBits;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    48
uintptr_t  ZAddressOffsetMask;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    49
size_t     ZAddressOffsetMax;
54617
24f6b0e413a0 8221786: ZGC: Increase max heap size to 16TB
pliden
parents: 50525
diff changeset
    50
59149
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    51
size_t     ZAddressMetadataShift;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    52
uintptr_t  ZAddressMetadataMask;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    53
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    54
uintptr_t  ZAddressMetadataMarked;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    55
uintptr_t  ZAddressMetadataMarked0;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    56
uintptr_t  ZAddressMetadataMarked1;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    57
uintptr_t  ZAddressMetadataRemapped;
3b998574be4b 8234338: ZGC: Improve small heap usage
pliden
parents: 58294
diff changeset
    58
uintptr_t  ZAddressMetadataFinalizable;