src/share/vm/gc_implementation/g1/g1OopClosures.cpp

Thu, 14 Jun 2018 09:15:08 -0700

author
kevinw
date
Thu, 14 Jun 2018 09:15:08 -0700
changeset 9327
f96fcd9e1e1b
parent 6939
cd43876f692e
permissions
-rw-r--r--

8081202: Hotspot compile warning: "Invalid suffix on literal; C++11 requires a space between literal and identifier"
Summary: Need to add a space between macro identifier and string literal
Reviewed-by: bpittore, stefank, dholmes, kbarrett

aoqi@0 1 /*
aoqi@0 2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 4 *
aoqi@0 5 * This code is free software; you can redistribute it and/or modify it
aoqi@0 6 * under the terms of the GNU General Public License version 2 only, as
aoqi@0 7 * published by the Free Software Foundation.
aoqi@0 8 *
aoqi@0 9 * This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 12 * version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 13 * accompanied this code).
aoqi@0 14 *
aoqi@0 15 * You should have received a copy of the GNU General Public License version
aoqi@0 16 * 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 18 *
aoqi@0 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 20 * or visit www.oracle.com if you need additional information or have any
aoqi@0 21 * questions.
aoqi@0 22 *
aoqi@0 23 */
aoqi@0 24
aoqi@0 25 #include "precompiled.hpp"
aoqi@0 26 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
aoqi@0 27 #include "gc_implementation/g1/g1OopClosures.inline.hpp"
tschatzl@6939 28 #include "gc_implementation/g1/g1ParScanThreadState.hpp"
aoqi@0 29
aoqi@0 30 G1ParCopyHelper::G1ParCopyHelper(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state) :
aoqi@0 31 G1ParClosureSuper(g1, par_scan_state), _scanned_klass(NULL),
aoqi@0 32 _cm(_g1->concurrent_mark()) {}
tschatzl@6937 33
tschatzl@6939 34 G1ParClosureSuper::G1ParClosureSuper(G1CollectedHeap* g1) :
tschatzl@6939 35 _g1(g1), _par_scan_state(NULL), _worker_id(UINT_MAX) { }
tschatzl@6939 36
tschatzl@6937 37 G1ParClosureSuper::G1ParClosureSuper(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state) :
tschatzl@6939 38 _g1(g1), _par_scan_state(NULL),
tschatzl@6939 39 _worker_id(UINT_MAX) {
tschatzl@6939 40 set_par_scan_thread_state(par_scan_state);
tschatzl@6939 41 }
tschatzl@6939 42
tschatzl@6939 43 void G1ParClosureSuper::set_par_scan_thread_state(G1ParScanThreadState* par_scan_state) {
tschatzl@6939 44 assert(_par_scan_state == NULL, "_par_scan_state must only be set once");
tschatzl@6939 45 assert(par_scan_state != NULL, "Must set par_scan_state to non-NULL.");
tschatzl@6939 46
tschatzl@6939 47 _par_scan_state = par_scan_state;
tschatzl@6939 48 _worker_id = par_scan_state->queue_num();
tschatzl@6939 49
tschatzl@6939 50 assert(_worker_id < MAX2((uint)ParallelGCThreads, 1u),
tschatzl@6939 51 err_msg("The given worker id %u must be less than the number of threads %u", _worker_id, MAX2((uint)ParallelGCThreads, 1u)));
tschatzl@6939 52 }

mercurial