src/hotspot/share/gc/parallel/psFileBackedVirtualspace.hpp
author phh
Sat, 30 Nov 2019 14:33:05 -0800
changeset 59330 5b96c12f909d
parent 54264 41af8d0546bc
permissions -rw-r--r--
8234541: C1 emits an empty message when it inlines successfully Summary: Use "inline" as the message when successfull Reviewed-by: thartmann, mdoerr Contributed-by: navy.xliu@gmail.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
53117
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     1
/*
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 53117
diff changeset
     2
 * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
53117
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     4
 *
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     7
 * published by the Free Software Foundation.
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     8
 *
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    13
 * accompanied this code).
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    14
 *
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    18
 *
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    21
 * questions.
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    22
 *
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    23
 */
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    24
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 53117
diff changeset
    25
#ifndef SHARE_GC_PARALLEL_PSFILEBACKEDVIRTUALSPACE_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 53117
diff changeset
    26
#define SHARE_GC_PARALLEL_PSFILEBACKEDVIRTUALSPACE_HPP
53117
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    27
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    28
#include "gc/parallel/psVirtualspace.hpp"
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    29
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    30
class PSFileBackedVirtualSpace : public PSVirtualSpace {
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    31
private:
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    32
  const char* _file_path;
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    33
  int _fd;
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    34
  bool _mapping_succeeded;
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    35
public:
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    36
  PSFileBackedVirtualSpace(ReservedSpace rs, size_t alignment, const char* file_path);
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    37
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    38
  bool   initialize();
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    39
  bool   expand_by(size_t bytes);
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    40
  bool   shrink_by(size_t bytes);
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    41
  size_t expand_into(PSVirtualSpace* space, size_t bytes);
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    42
  void   release();
37930c6ba6d7 8211424: Allocation of old generation of java heap on alternate memory devices - Parallel GC
sangheki
parents:
diff changeset
    43
};
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 53117
diff changeset
    44
#endif // SHARE_GC_PARALLEL_PSFILEBACKEDVIRTUALSPACE_HPP