< prev index next >

src/hotspot/share/gc/z/zPage.hpp

Print this page
rev 48258 : Patch from Stephan
   1 /*
   2  * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 #ifndef SHARE_GC_Z_ZPAGE_HPP
  25 #define SHARE_GC_Z_ZPAGE_HPP
  26 
  27 #include "gc/z/zForwardingTable.hpp"
  28 #include "gc/z/zList.hpp"
  29 #include "gc/z/zLiveMap.hpp"
  30 #include "gc/z/zPhysicalMemory.hpp"
  31 #include "gc/z/zVirtualMemory.hpp"
  32 #include "memory/allocation.hpp"
  33 
  34 class ZPage : public CHeapObj<mtGC> {

  35   friend class ZList<ZPage>;
  36 
  37 private:
  38   // First cacheline (always hot)
  39   const uint8_t        _type;             // Page type
  40   volatile uint8_t     _pinned;           // Pinned flag
  41   uint8_t              _numa_id;          // NUMA node affinity
  42   uint32_t             _seqnum;           // Allocation sequence number
  43   const ZVirtualMemory _virtual;          // Virtual start/end address
  44   volatile uintptr_t   _top;              // Virtual top address
  45   ZLiveMap             _livemap;          // Live map
  46 
  47   // Second cacheline (hot when relocated and cached)
  48   volatile uint32_t    _refcount;         // Page reference count
  49   ZForwardingTable     _forwarding;       // Forwarding table
  50   ZPhysicalMemory      _physical;         // Physical memory for page
  51   ZListNode<ZPage>     _node;             // Page list node
  52 
  53   const char* type_to_string() const;
  54   uint32_t object_max_count() const;


   1 /*
   2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 #ifndef SHARE_GC_Z_ZPAGE_HPP
  25 #define SHARE_GC_Z_ZPAGE_HPP
  26 
  27 #include "gc/z/zForwardingTable.hpp"
  28 #include "gc/z/zList.hpp"
  29 #include "gc/z/zLiveMap.hpp"
  30 #include "gc/z/zPhysicalMemory.hpp"
  31 #include "gc/z/zVirtualMemory.hpp"
  32 #include "memory/allocation.hpp"
  33 
  34 class ZPage : public CHeapObj<mtGC> {
  35   friend class VMStructs;
  36   friend class ZList<ZPage>;
  37 
  38 private:
  39   // First cacheline (always hot)
  40   const uint8_t        _type;             // Page type
  41   volatile uint8_t     _pinned;           // Pinned flag
  42   uint8_t              _numa_id;          // NUMA node affinity
  43   uint32_t             _seqnum;           // Allocation sequence number
  44   const ZVirtualMemory _virtual;          // Virtual start/end address
  45   volatile uintptr_t   _top;              // Virtual top address
  46   ZLiveMap             _livemap;          // Live map
  47 
  48   // Second cacheline (hot when relocated and cached)
  49   volatile uint32_t    _refcount;         // Page reference count
  50   ZForwardingTable     _forwarding;       // Forwarding table
  51   ZPhysicalMemory      _physical;         // Physical memory for page
  52   ZListNode<ZPage>     _node;             // Page list node
  53 
  54   const char* type_to_string() const;
  55   uint32_t object_max_count() const;


< prev index next >