hotspot/src/share/vm/gc/cms/cmsOopClosures.inline.hpp
changeset 46968 9119841280f4
parent 35862 411842d0c882
equal deleted inserted replaced
46953:39063b484ec2 46968:9119841280f4
     1 /*
     1 /*
     2  * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2007, 2017, 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.
    72 // Trim our work_queue so its length is below max at return
    72 // Trim our work_queue so its length is below max at return
    73 inline void ParMarkRefsIntoAndScanClosure::trim_queue(uint max) {
    73 inline void ParMarkRefsIntoAndScanClosure::trim_queue(uint max) {
    74   while (_work_queue->size() > max) {
    74   while (_work_queue->size() > max) {
    75     oop newOop;
    75     oop newOop;
    76     if (_work_queue->pop_local(newOop)) {
    76     if (_work_queue->pop_local(newOop)) {
    77       assert(newOop->is_oop(), "Expected an oop");
    77       assert(oopDesc::is_oop(newOop), "Expected an oop");
    78       assert(_bit_map->isMarked((HeapWord*)newOop),
    78       assert(_bit_map->isMarked((HeapWord*)newOop),
    79              "only grey objects on this stack");
    79              "only grey objects on this stack");
    80       // iterate over the oops in this oop, marking and pushing
    80       // iterate over the oops in this oop, marking and pushing
    81       // the ones in CMS heap (i.e. in _span).
    81       // the ones in CMS heap (i.e. in _span).
    82       newOop->oop_iterate(&_parPushAndMarkClosure);
    82       newOop->oop_iterate(&_parPushAndMarkClosure);