8183002: Remove unused concurrent parameter in HeapRegionManager::par_iterate

Reviewed-by: ehelin, sjohanss
This commit is contained in:
Thomas Schatzl 2017-06-28 12:11:48 +02:00
parent 52a1ad0388
commit c0fff2604d
5 changed files with 13 additions and 18 deletions

View file

@ -2397,12 +2397,10 @@ void G1CollectedHeap::heap_region_iterate(HeapRegionClosure* cl) const {
_hrm.iterate(cl); _hrm.iterate(cl);
} }
void void G1CollectedHeap::heap_region_par_iterate(HeapRegionClosure* cl,
G1CollectedHeap::heap_region_par_iterate(HeapRegionClosure* cl, uint worker_id,
uint worker_id, HeapRegionClaimer *hrclaimer) const {
HeapRegionClaimer *hrclaimer, _hrm.par_iterate(cl, worker_id, hrclaimer);
bool concurrent) const {
_hrm.par_iterate(cl, worker_id, hrclaimer, concurrent);
} }
void G1CollectedHeap::collection_set_iterate(HeapRegionClosure* cl) { void G1CollectedHeap::collection_set_iterate(HeapRegionClosure* cl) {

View file

@ -1195,17 +1195,14 @@ public:
inline HeapWord* bottom_addr_for_region(uint index) const; inline HeapWord* bottom_addr_for_region(uint index) const;
// Iterate over the heap regions in parallel. Assumes that this will be called // Iterate over the heap regions in parallel. Assumes that this will be called
// in parallel by ParallelGCThreads worker threads with distinct worker ids // in parallel by a number of worker threads with distinct worker ids
// in the range [0..max(ParallelGCThreads-1, 1)]. Applies "blk->doHeapRegion" // in the range passed to the HeapRegionClaimer. Applies "blk->doHeapRegion"
// to each of the regions, by attempting to claim the region using the // to each of the regions, by attempting to claim the region using the
// HeapRegionClaimer and, if successful, applying the closure to the claimed // HeapRegionClaimer and, if successful, applying the closure to the claimed
// region. The concurrent argument should be set to true if iteration is // region.
// performed concurrently, during which no assumptions are made for consistent
// attributes of the heap regions (as they might be modified while iterating).
void heap_region_par_iterate(HeapRegionClosure* cl, void heap_region_par_iterate(HeapRegionClosure* cl,
uint worker_id, uint worker_id,
HeapRegionClaimer* hrclaimer, HeapRegionClaimer* hrclaimer) const;
bool concurrent = false) const;
// Iterate over the regions (if any) in the current collection set. // Iterate over the regions (if any) in the current collection set.
void collection_set_iterate(HeapRegionClosure* blk); void collection_set_iterate(HeapRegionClosure* blk);

View file

@ -703,7 +703,7 @@ public:
void work(uint worker_id) { void work(uint worker_id) {
SuspendibleThreadSetJoiner sts_join(_suspendible); SuspendibleThreadSetJoiner sts_join(_suspendible);
G1CollectedHeap::heap()->heap_region_par_iterate(&_cl, worker_id, &_hr_claimer, true); G1CollectedHeap::heap()->heap_region_par_iterate(&_cl, worker_id, &_hr_claimer);
} }
bool is_complete() { bool is_complete() {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -327,7 +327,7 @@ bool HeapRegionManager::allocate_containing_regions(MemRegion range, size_t* com
return true; return true;
} }
void HeapRegionManager::par_iterate(HeapRegionClosure* blk, uint worker_id, HeapRegionClaimer* hrclaimer, bool concurrent) const { void HeapRegionManager::par_iterate(HeapRegionClosure* blk, uint worker_id, HeapRegionClaimer* hrclaimer) const {
const uint start_index = hrclaimer->start_region_for_worker(worker_id); const uint start_index = hrclaimer->start_region_for_worker(worker_id);
// Every worker will actually look at all regions, skipping over regions that // Every worker will actually look at all regions, skipping over regions that

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -240,7 +240,7 @@ public:
// terminating the iteration early if doHeapRegion() returns true. // terminating the iteration early if doHeapRegion() returns true.
void iterate(HeapRegionClosure* blk) const; void iterate(HeapRegionClosure* blk) const;
void par_iterate(HeapRegionClosure* blk, uint worker_id, HeapRegionClaimer* hrclaimer, bool concurrent) const; void par_iterate(HeapRegionClosure* blk, uint worker_id, HeapRegionClaimer* hrclaimer) const;
// Uncommit up to num_regions_to_remove regions that are completely free. // Uncommit up to num_regions_to_remove regions that are completely free.
// Return the actual number of uncommitted regions. // Return the actual number of uncommitted regions.