Lines Matching refs:to

16  * 2 along with this work; if not, write to the Free Software Foundation,
64 // Later on we'll try to be more parsimonious with swap.
77 // First we must round addr *up* to a possible object boundary.
172 vm_exit_during_initialization("Failed to allocate CM region mark stack");
203 // Otherwise, we need to try again.
230 // Otherwise, we need to try again.
303 // accidentally add something to the mark stack during GC, it
347 // If someone has set the should_abort flag, we return NULL to
348 // force the caller to bail out of their loop.
360 // We just claimed the last survivor so store NULL to indicate
368 // to take the lock so nothing else to do.
477 assert(cmThread()->cm() != NULL, "CM Thread should refer to this cm");
543 // on a target overhead with respect to the soft real-time goal
604 // If concurrent marking is not in progress, then we do not need to
644 // different number of active threads. So, it's easiest to have all
650 // we need this to make sure that the flag is on during the evac
676 // Need to update the three data structures below according to the
687 // We propagate this to all tasks, not just the active ones.
694 // We currently assume that the concurrent flag has been set to
699 err_msg("only way to get here: _finger: "PTR_FORMAT", _heap_end: "PTR_FORMAT,
706 // We set the global marking state to some default values when we're
722 // Make sure that the concurrent mark thread looks to still be in
732 // clear the mark bitmap (no grey objects to start with).
733 // We need to do this in chunks and offer to yield in between
749 // Repeat the asserts from above. We'll do them as asserts here to
752 // clearing to get some checking in the product.
788 // Initialise marking structures. This has to be done in a STW phase.
805 // every remark and we'll eventually not need to cause one.
812 rp->setup_policy(false); // snapshot the soft ref policy to be used in this cycle
816 // threads to have SATB queues with active set to false.
824 // initial-mark pause to update the heap end, if the heap expands
825 // during it. No need to call it here.
832 * be in the barrier sync code, waiting for the other thread to also
833 * sync up, whereas another one could be trying to yield, while also
834 * waiting for the other threads to sync up too.
837 * this case we should not attempt to leave / enter the STS, otherwise
843 * is possible to be suspended for a Full GC or an evacuation pause
880 // we exit this method to abort the pause and restart concurent
909 // at this point everything should be re-initialized and ready to go
1082 // scan_in_progress() will have been set to true only if there was
1083 // at least one root region to scan. So, if it's false, we
1084 // should not attempt to do any further work.
1107 // we might be tempted to assert that:
1178 gclog_or_tty->print_cr("\nRemark led to restart for overflow.");
1191 // marking due to overflowing the global mark stack.
1201 // threads to have SATB queues with active set to true.
1247 // bitmap to 1. If the region is "starts humongous" it will also set
1248 // to 1 the bits on the region bitmap that correspond to its
1291 // associated "starts humongous" region to have their bit set to
1292 // 1 since, due to the region chunking in the parallel region
1321 // will then correspond to a (non-existent) card that is also
1324 // end of object is not card aligned - increment to cover
1332 // Add the size of this object to the number of marked bytes.
1347 // will then correspond to a (non-existent) card that is also
1350 // end of object is not card aligned - increment to cover
1377 // the remark pause. This closure is applied to the heap
1384 BitMap* _region_bm; // Region BM to be verified
1385 BitMap* _card_bm; // Card BM to be verified
1413 // associated "starts humongous" region to have their bit set to
1414 // 1 since, due to the region chunking in the parallel region
1422 // Call the CalcLiveObjectsClosure to walk the marking bitmap for
1530 // in the call to run_task().
1571 // Sets the bits corresponding to the interval [NTAMS, top]
1589 // associated "starts humongous" region to have their bit set to
1590 // 1 since, due to the region chunking in the parallel region
1612 // will then correspond to a (non-existent) card that is also
1615 // end of object is not card aligned - increment to cover
1655 // in the call to run_task().
1794 // cleanup to do this printing we will not guarantee to only
1798 // printing here, before we append the new regions to the global
1886 // Done with the parallel phase so reset to 0.
1900 // Bitmaps to hold expected values
1913 // Done with the parallel phase so reset to 0.
1957 // The cleanup list is not empty, so we'll have to process it
2004 // We need to make this be a "collection" so any collection pause that
2005 // races with it goes around and waits for completeCleanup to finish.
2008 // We reclaimed old regions so we should calculate the sizes to make
2039 // so it's not necessary to take any locks
2046 // Instead of adding one region at a time to the secondary_free_list,
2056 "appending %u entries to the secondary_free_list, "
2089 // processing the CMTask for worker 0 is used) to preserve (mark) and
2131 // and objects reachable from them on to the local stack (and
2132 // possibly the global stack). Call CMTask::do_marking_step() to
2136 // there's nothing more to do (i.e. we're done with the entries that
2141 // flag while there may still be some work to do. (See the comment at
2166 // to drain the marking data structures of the remaining entries
2186 // We call CMTask::do_marking_step() to completely drain the local
2191 // if there's nothing more to do (i.e. we'completely drained the
2193 // closure to the entries on the discovered ref lists) or we overflow
2197 // flag while there may still be some work to do. (See the comment at
2265 // We need to reset the concurrency level before each
2268 // how many workers to wait for.
2297 // We need to reset the concurrency level before each
2300 // how many workers to wait for.
2311 // only get discovered once so it is OK to not
2326 // Inner scope to exclude the cleaning of the string and symbol
2348 // These closures do not need to synchronize with the worker
2375 // Set the concurrency level. The phase was already set prior to
2402 // This should have been done already when we tried to push an
2403 // entry on to the global mark stack. But let's do it again.
2434 // only proceed if we're supposed to be actived.
2443 // If we overflow, then we do not want to restart. We instead
2444 // want to abort remark and do concurrent marking again.
2490 // the thread to execute the remark - serially. We have
2491 // to pass true for the is_serial parameter so that
2619 HeapWord* to = t;
2621 if (to > from) {
2622 _out->print_cr("Objects in ["PTR_FORMAT", "PTR_FORMAT"]", from, to);
2625 hr->object_iterate_mem_careful(MemRegion(from, to), &ocl);
2657 gclog_or_tty->print_cr(" dumping to file %s", file_name);
2715 // thread does not need to hold the Heap_lock when it gets
2719 // a) Miss the update to the region's end, in which case it will
2725 // scenario will be similar to b). So, the race between
2727 // to do a bit of unnecessary work (due to some unnecessary bitmap
2886 // The global finger always points to a heap region boundary. We
2887 // use heap_region_containing_raw() to get the containing region
2888 // given that the global finger could be pointing to a free region
2939 // "starts humongous" region to have their bit set to 1
2940 // since, due to the region chunking in the parallel region
2959 // NTAMS of this region has not been set so nothing to do.
2977 // limit_idx will then correspond to a (non-existent) card
2994 // add it to the running total for this region.
3080 // Clear the per-worker arrays used to store the per-region counting data
3116 // abandon current marking iteration due to a Full GC
3118 // Clear all marks to force marking thread to do nothing
3188 // We take a break if someone is trying to stop the world.
3272 // if the has_aborted flag has been raised, we need to bail out of
3296 assert(_ref_processor == NULL, "should be initialized to NULL");
3333 // We set the finger to bottom to ensure that the bitmap
3336 // as the region is not supposed to be empty in the first place)
3341 assert(limit < _region_limit, "only way to get here");
3346 // alloc region (NTAMS will move to top() and the objects
3349 // and we do not need in fact to scan anything else. So, we simply
3350 // set _finger to be limit to ensure that the bitmap iteration
3369 // holding on to a region.
3427 // quit if, for some reason, this task wants to abort or the global
3442 // First, we need to recalculate the words scanned and refs reached
3455 // to check anything else. The other steps are only needed during
3492 // (4) We check whether we should yield. If we have to, then we abort.
3516 gclog_or_tty->print_cr("[%d] aborting to deal with pending SATB buffers",
3519 // we do need to process SATB buffers, we'll abort and restart
3520 // the marking task to do so
3536 // This is called when we believe that we're going to do an infrequent
3538 // entries to/from the global stack). It basically tries to decrease the
3570 gclog_or_tty->print_cr("[%d] aborting due to global stack overflow",
3578 gclog_or_tty->print_cr("[%d] pushed %d entries to the global stack",
3612 // given target limit. So, we do not expect this push to fail.
3630 // Decide what the target size is, depending whether we're going to
3632 // of things to do) or totally (at the very end).
3679 // We have a policy to drain the local queue before we attempt to
3683 // Decide what the target size is, depending whether we're going to
3685 // of things to do) or totally (at the very end). Notice that,
3714 // SATB Queue has several assumptions on whether to call the par or
3717 // of the code to simplify things.
3735 // This keeps claiming and applying the closure to completed buffers
3736 // until we run out of buffers or we need to abort.
3779 // limits to get the regular clock call early
3809 gclog_or_tty->print_cr(" transfers to = %d, transfers from = %d",
3815 gclog_or_tty->print_cr(" Aborted: %d, due to", _aborted);
3834 it needs to yield.
3836 The data structures that it uses to do marking work are the
3843 regions whose bitmap they then scan to find gray objects. A
3846 scanned. The two fingers are used to determine how to gray an
3848 visited by a task in the future, or whether it needs to be also
3854 task attempts to keep its local queue short but not totally
3861 queues, as access to it requires a mutex and more fine-grain
3864 over the bitmap to identify gray objects. Throughout the marking
3865 phase, tasks attempt to keep the global mark stack at a small
3876 The do_marking_step() method tries to abort when the time target
3884 the other tasks to ensure that all the marking data structures
3890 do_marking_step() method only tries to drain SATB buffers right
3895 (4) To yield. when we have to yield then we abort and yield
3912 decides when the task should abort. A work-based scheme is used to
3915 phase has visited reach a given limit. Additional invocations to
3917 too. The initial reason for the clock method was to avoid calling
3919 place, it was natural to piggy-back all the other conditions on it
3953 // possible for two threads to set the _claimed flag at the same
3961 // If do_stealing is true then do_marking_step will attempt to
3962 // steal work from the other CMTasks. It only makes sense to
3971 // set up the variables that are used in the work-based scheme to
3991 // eventually called from this method, so it is OK to allocate these
3999 // and this task, after a yield point, restarts. We have to abort
4000 // as we need to get into the overflow protocol which happens
4016 // This means that we're already holding on to a region.
4021 // which might have evacuated the region we're holding on to
4022 // underneath our feet. Let's read its limit again to make sure
4025 // _finger to the start of the region if it is found empty).
4029 // through scanning this region. In this case, _finger points to
4031 // fresh region, _finger points to start().
4049 assert(has_aborted(), "currently the only way to do so");
4050 // The only way to abort the bitmap iteration is to return
4052 // do_bit() method we move the _finger to point to the
4054 // have definitely set _finger to something non-null.
4058 // points to the address of the object we last scanned. If we
4060 // the object. It is easy to avoid this. We move the finger by
4061 // enough to point to the next possible object header (the
4062 // bitmap knows by how much we need to move it as it knows its
4075 // region we were holding on to, or we have aborted.
4084 // claiming and why we have to check out_of_regions() to determine
4087 // We are going to try to claim a new region. We should have
4094 gclog_or_tty->print_cr("[%d] trying to claim a new region", _task_id);
4098 // Yes, we managed to claim one
4110 // It is important to call the regular clock here. It might take
4111 // a while to claim a region if, for example, we hit a large
4112 // block of empty regions. So we need to call the regular clock
4113 // method once round the loop to make sure it's called
4126 // tasks might be pushing objects to it concurrently.
4134 // Try to reduce the number of available SATB buffers so that
4135 // remark has less work to do.
4147 // we could. Let's try to do some stealing...
4150 // tasks might be pushing objects to it concurrently.
4152 "only way to reach here");
4155 gclog_or_tty->print_cr("[%d] starting to steal", _task_id);
4184 // If we are about to wrap up and go into termination, check if we
4193 // We still haven't aborted. Now, let's try to get into the
4199 assert(_cm->out_of_regions(), "only way to reach here");
4200 assert(_task_queue->size() == 0, "only way to reach here");
4210 // whether to exit the termination protocol or not.
4221 // let's allow task 0 to do this
4224 // we need to set this to false before the next
4235 guarantee(_cm->out_of_regions(), "only way to reach here");
4236 guarantee(_cm->mark_stack_empty(), "only way to reach here");
4237 guarantee(_task_queue->size() == 0, "only way to reach here");
4238 guarantee(!_cm->has_overflown(), "only way to reach here");
4239 guarantee(!_cm->mark_stack_overflow(), "only way to reach here");
4245 // Apparently there's more work to do. Let's abort this task. It
4246 // will restart it and we can hopefully find more things to do.
4249 gclog_or_tty->print_cr("[%d] apparently there is more work to do",
4258 // Mainly for debugging purposes to make sure that a pointer to the
4274 // Keep statistics of how well we did with respect to hitting
4282 // overflow was raised. This means we have to restart the
4284 // order to do this we have to make sure that all tasks stop
4293 // We only need to enter the sync barrier if being called
4298 // stopped doing marking work. So, it's now safe to
4314 // ready to restart.
4361 // These are formatting macros that are used below to ensure
4362 // consistent formatting. The *_H_* versions are used to format the
4366 // easier to compose.
4368 // All the output lines are prefixed with this string to be able to
4436 // It takes as a parameter a reference to one of the _hum_* fields, it
4442 // The > 0 check is to deal with the prev and next live bytes which