src/hotspot/share/gc/shared/gcThreadLocalData.hpp
changeset 49752 93d84f667d12
child 50525 767cdb97f103
equal deleted inserted replaced
49751:c3a10df652c0 49752:93d84f667d12
       
     1 /*
       
     2  * Copyright (c) 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_SHARED_GCTHREADLOCALDATA_HPP
       
    25 #define SHARE_GC_SHARED_GCTHREADLOCALDATA_HPP
       
    26 
       
    27 #include "utilities/globalDefinitions.hpp"
       
    28 
       
    29 // Thread local data area for GC-specific information. Each GC
       
    30 // is free to decide the internal structure and contents of this
       
    31 // area. It is represented as a 64-bit aligned opaque blob to
       
    32 // avoid circular dependencies between Thread and all GCs. For
       
    33 // the same reason, the size of the data area is hard coded to
       
    34 // provide enough space for all current GCs. Adjust the size if
       
    35 // needed, but avoid making it excessively large as it adds to
       
    36 // the memory overhead of creating a thread.
       
    37 //
       
    38 // Use Thread::gc_data<T>() to access the data, where T is the
       
    39 // GC-specific type describing the structure of the data. GCs
       
    40 // should consider placing frequently accessed fields first in
       
    41 // T, so that field offsets relative to Thread are small, which
       
    42 // often allows for a more compact instruction encoding.
       
    43 typedef uint64_t GCThreadLocalData[14]; // 112 bytes
       
    44 
       
    45 #endif // SHARE_GC_SHARED_GCTHREADLOCALDATA_HPP