src/hotspot/share/gc/z/zRootsIterator.cpp
changeset 54385 9559ba212c18
parent 53894 bf1133e7dfba
child 54511 fbfcebad8e66
equal deleted inserted replaced
54384:cd3b7ad53265 54385:9559ba212c18
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   177     _system_dictionary(this),
   177     _system_dictionary(this),
   178     _threads(this),
   178     _threads(this),
   179     _code_cache(this) {
   179     _code_cache(this) {
   180   assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
   180   assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
   181   ZStatTimer timer(ZSubPhasePauseRootsSetup);
   181   ZStatTimer timer(ZSubPhasePauseRootsSetup);
   182   Threads::change_thread_claim_parity();
   182   Threads::change_thread_claim_token();
   183   COMPILER2_PRESENT(DerivedPointerTable::clear());
   183   COMPILER2_PRESENT(DerivedPointerTable::clear());
   184   if (ClassUnloading) {
   184   if (ClassUnloading) {
   185     nmethod::oops_do_marking_prologue();
   185     nmethod::oops_do_marking_prologue();
   186   } else {
   186   } else {
   187     ZNMethod::oops_do_begin();
   187     ZNMethod::oops_do_begin();
   402 
   402 
   403 ZThreadRootsIterator::ZThreadRootsIterator() :
   403 ZThreadRootsIterator::ZThreadRootsIterator() :
   404     _threads(this) {
   404     _threads(this) {
   405   assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
   405   assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
   406   ZStatTimer timer(ZSubPhasePauseRootsSetup);
   406   ZStatTimer timer(ZSubPhasePauseRootsSetup);
   407   Threads::change_thread_claim_parity();
   407   Threads::change_thread_claim_token();
   408 }
   408 }
   409 
   409 
   410 ZThreadRootsIterator::~ZThreadRootsIterator() {
   410 ZThreadRootsIterator::~ZThreadRootsIterator() {
   411   ZStatTimer timer(ZSubPhasePauseRootsTeardown);
   411   ZStatTimer timer(ZSubPhasePauseRootsTeardown);
   412   Threads::assert_all_threads_claimed();
   412   Threads::assert_all_threads_claimed();