mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8258985: Parallel WeakProcessor may use too few threads
Use total workers rather than active. Reviewed-by: tschatzl, ayang, sjohanss
This commit is contained in:
parent
417e1d1a4e
commit
efc36be5be
2 changed files with 11 additions and 6 deletions
|
@ -47,8 +47,9 @@ public:
|
|||
// Visit all oop*s and apply the given closure.
|
||||
static void oops_do(OopClosure* closure);
|
||||
|
||||
// Parallel version. Uses ergo_workers(), active workers, and
|
||||
// phase_time's max_threads to determine the number of threads to use.
|
||||
// Parallel version. Uses ergo_workers() to determine the number of
|
||||
// threads to use, limited by the total workers and phase_times'
|
||||
// max_threads.
|
||||
// IsAlive must be derived from BoolObjectClosure.
|
||||
// KeepAlive must be derived from OopClosure.
|
||||
template<typename IsAlive, typename KeepAlive>
|
||||
|
@ -57,8 +58,9 @@ public:
|
|||
KeepAlive* keep_alive,
|
||||
WeakProcessorPhaseTimes* phase_times);
|
||||
|
||||
// Convenience parallel version. Uses ergo_workers() and active workers
|
||||
// to determine the number of threads to run. Implicitly logs phase times.
|
||||
// Convenience parallel version. Uses ergo_workers() to determine the
|
||||
// number of threads to use, limited by the total workers. Implicitly
|
||||
// logs phase times.
|
||||
// IsAlive must be derived from BoolObjectClosure.
|
||||
// KeepAlive must be derived from OopClosure.
|
||||
template<typename IsAlive, typename KeepAlive>
|
||||
|
@ -67,7 +69,10 @@ public:
|
|||
KeepAlive* keep_alive,
|
||||
uint indent_log);
|
||||
|
||||
// Uses the total number of weak references and ReferencesPerThread to
|
||||
// determine the number of threads to use, limited by max_workers.
|
||||
static uint ergo_workers(uint max_workers);
|
||||
|
||||
class Task;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue