mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
8080110: Remove usage of CollectedHeap::n_par_threads() from root processing
Reviewed-by: jmasa, kbarrett
This commit is contained in:
parent
e13e75547c
commit
c13872f88d
14 changed files with 176 additions and 142 deletions
|
@ -29,18 +29,21 @@
|
|||
|
||||
class MarkScope : public StackObj {
|
||||
protected:
|
||||
bool _active;
|
||||
public:
|
||||
MarkScope(bool activate = true);
|
||||
MarkScope();
|
||||
~MarkScope();
|
||||
};
|
||||
|
||||
// Sets up and tears down the required state for parallel root processing.
|
||||
|
||||
class StrongRootsScope : public MarkScope {
|
||||
// Number of threads participating in the roots processing.
|
||||
const uint _n_threads;
|
||||
|
||||
public:
|
||||
StrongRootsScope(bool activate = true);
|
||||
StrongRootsScope(uint n_threads);
|
||||
~StrongRootsScope();
|
||||
|
||||
uint n_threads() const { return _n_threads; }
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_GC_SHARED_STRONGROOTSSCOPE_HPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue