< prev index next >

src/share/vm/gc_implementation/shenandoah/shenandoahWorkGroup.cpp

Print this page
rev 10690 : [backport] Cleanup header files and forward declarations
rev 10711 : [backport] Precleaning should use GC workers to do actual work
rev 10772 : [backport] Update copyrights

*** 1,7 **** /* ! * Copyright (c) 2017, Red Hat, Inc. and/or its affiliates. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * --- 1,7 ---- /* ! * Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. *
*** 20,41 **** * questions. * */ #include "precompiled.hpp" ! #include "gc_implementation/shenandoah/shenandoahHeap.hpp" #include "gc_implementation/shenandoah/shenandoahWorkGroup.hpp" #include "gc_implementation/shenandoah/shenandoahLogging.hpp" ! ShenandoahWorkerScope::ShenandoahWorkerScope(ShenandoahWorkGang* workers, uint nworkers, const char* msg) : _n_workers(nworkers), _workers(workers) { assert(msg != NULL, "Missing message"); log_info(gc, task)("Using %u of %u workers for %s", nworkers, ShenandoahHeap::heap()->max_workers(), msg); ShenandoahHeap::heap()->assert_gc_workers(nworkers); _workers->set_active_workers(nworkers); } ShenandoahWorkerScope::~ShenandoahWorkerScope() { assert(_workers->active_workers() == _n_workers, --- 20,44 ---- * questions. * */ #include "precompiled.hpp" ! ! #include "gc_implementation/shenandoah/shenandoahHeap.inline.hpp" #include "gc_implementation/shenandoah/shenandoahWorkGroup.hpp" #include "gc_implementation/shenandoah/shenandoahLogging.hpp" ! ShenandoahWorkerScope::ShenandoahWorkerScope(ShenandoahWorkGang* workers, uint nworkers, const char* msg, bool check) : _n_workers(nworkers), _workers(workers) { assert(msg != NULL, "Missing message"); log_info(gc, task)("Using %u of %u workers for %s", nworkers, ShenandoahHeap::heap()->max_workers(), msg); + if (check) { ShenandoahHeap::heap()->assert_gc_workers(nworkers); + } _workers->set_active_workers(nworkers); } ShenandoahWorkerScope::~ShenandoahWorkerScope() { assert(_workers->active_workers() == _n_workers,
< prev index next >