src/hotspot/share/gc/z/zAddress.hpp
changeset 54617 24f6b0e413a0
parent 52382 2e280ecec246
child 55223 3f8a81f5d1b2
equal deleted inserted replaced
54616:3ab77d8dc60a 54617:24f6b0e413a0
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2019, 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.
    25 #define SHARE_GC_Z_ZADDRESS_HPP
    25 #define SHARE_GC_Z_ZADDRESS_HPP
    26 
    26 
    27 #include "memory/allocation.hpp"
    27 #include "memory/allocation.hpp"
    28 
    28 
    29 class ZAddress : public AllStatic {
    29 class ZAddress : public AllStatic {
       
    30   friend class ZAddressTest;
       
    31 
       
    32 private:
       
    33   static void set_good_mask(uintptr_t mask);
       
    34 
    30 public:
    35 public:
       
    36   static void initialize();
       
    37 
       
    38   static void flip_to_marked();
       
    39   static void flip_to_remapped();
       
    40 
    31   static bool is_null(uintptr_t value);
    41   static bool is_null(uintptr_t value);
    32   static bool is_bad(uintptr_t value);
    42   static bool is_bad(uintptr_t value);
    33   static bool is_good(uintptr_t value);
    43   static bool is_good(uintptr_t value);
    34   static bool is_good_or_null(uintptr_t value);
    44   static bool is_good_or_null(uintptr_t value);
    35   static bool is_weak_bad(uintptr_t value);
    45   static bool is_weak_bad(uintptr_t value);
    50   static uintptr_t marked1(uintptr_t value);
    60   static uintptr_t marked1(uintptr_t value);
    51   static uintptr_t remapped(uintptr_t value);
    61   static uintptr_t remapped(uintptr_t value);
    52   static uintptr_t remapped_or_null(uintptr_t value);
    62   static uintptr_t remapped_or_null(uintptr_t value);
    53 };
    63 };
    54 
    64 
    55 class ZAddressMasks : public AllStatic {
       
    56   friend class ZAddressTest;
       
    57 
       
    58 private:
       
    59   static void set_good_mask(uintptr_t mask);
       
    60 
       
    61 public:
       
    62   static void initialize();
       
    63   static void flip_to_marked();
       
    64   static void flip_to_remapped();
       
    65 };
       
    66 
       
    67 #endif // SHARE_GC_Z_ZADDRESS_HPP
    65 #endif // SHARE_GC_Z_ZADDRESS_HPP