Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2669,8 +2669,7 @@ void G1CollectedHeap::do_collection_pause_at_safepoint_helper(size_t allocation_
}

void G1CollectedHeap::complete_cleaning(bool class_unloading_occurred) {
uint num_workers = workers()->active_workers();
G1ParallelCleaningTask unlink_task(num_workers, class_unloading_occurred);
G1ParallelCleaningTask unlink_task(class_unloading_occurred);
workers()->run_task(&unlink_task);
}

Expand Down
5 changes: 2 additions & 3 deletions src/hotspot/share/gc/g1/g1ParallelCleaning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ void JVMCICleaningTask::work(bool unloading_occurred) {
}
#endif // INCLUDE_JVMCI

G1ParallelCleaningTask::G1ParallelCleaningTask(uint num_workers,
bool unloading_occurred) :
G1ParallelCleaningTask::G1ParallelCleaningTask(bool unloading_occurred) :
WorkerTask("G1 Parallel Cleaning"),
_unloading_occurred(unloading_occurred),
_code_cache_task(num_workers, unloading_occurred),
_code_cache_task(unloading_occurred),
JVMCI_ONLY(_jvmci_cleaning_task() COMMA)
_klass_cleaning_task() {
}
Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/share/gc/g1/g1ParallelCleaning.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ class G1ParallelCleaningTask : public WorkerTask {

public:
// The constructor is run in the VMThread.
G1ParallelCleaningTask(uint num_workers,
bool unloading_occurred);
G1ParallelCleaningTask(bool unloading_occurred);

void work(uint worker_id);
};
Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/share/gc/shared/parallelCleaning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@
#include "oops/klass.inline.hpp"
#include "runtime/atomicAccess.hpp"

CodeCacheUnloadingTask::CodeCacheUnloadingTask(uint num_workers, bool unloading_occurred) :
CodeCacheUnloadingTask::CodeCacheUnloadingTask(bool unloading_occurred) :
_unloading_occurred(unloading_occurred),
_num_workers(num_workers),
_first_nmethod(nullptr),
_claimed_nmethod(nullptr) {
// Get first alive nmethod
Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/share/gc/shared/parallelCleaning.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@
class CodeCacheUnloadingTask {

const bool _unloading_occurred;
const uint _num_workers;

// Variables used to claim nmethods.
nmethod* _first_nmethod;
nmethod* volatile _claimed_nmethod;

public:
CodeCacheUnloadingTask(uint num_workers, bool unloading_occurred);
CodeCacheUnloadingTask(bool unloading_occurred);
~CodeCacheUnloadingTask();

private:
Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2259,8 +2259,7 @@ void ShenandoahHeap::stw_unload_classes(bool full_gc) {
// Clean JVMCI metadata handles.
JVMCI_ONLY(JVMCI::do_unloading(unloading_occurred));

uint num_workers = _workers->active_workers();
ShenandoahClassUnloadingTask unlink_task(phase, num_workers, unloading_occurred);
ShenandoahClassUnloadingTask unlink_task(phase, unloading_occurred);
_workers->run_task(&unlink_task);
}
// Release unloaded nmethods's memory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@
#include "runtime/safepoint.hpp"

ShenandoahClassUnloadingTask::ShenandoahClassUnloadingTask(ShenandoahPhaseTimings::Phase phase,
uint num_workers,
bool unloading_occurred) :
WorkerTask("Shenandoah Class Unloading"),
_phase(phase),
_unloading_occurred(unloading_occurred),
_code_cache_task(num_workers, unloading_occurred),
_code_cache_task(unloading_occurred),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ShenandoahClassUnloadingTask constructor argument num_workers is also unused now?

_klass_cleaning_task() {
assert(SafepointSynchronize::is_at_safepoint(), "Must be at a safepoint");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class ShenandoahClassUnloadingTask : public WorkerTask {
KlassCleaningTask _klass_cleaning_task;
public:
ShenandoahClassUnloadingTask(ShenandoahPhaseTimings::Phase phase,
uint num_workers,
bool unloading_occurred);

void work(uint worker_id);
Expand Down