8032379: Remove the is_scavenging flag to process_strong_roots

Refactor the strong root processing to avoid using a boolean in addition to the ScanOption enum.

Reviewed-by: stefank, tschatzl, ehelin, jmasa
This commit is contained in:
Mikael Gerdin 2014-01-14 16:40:33 +01:00
parent 8ce7c46ec7
commit 4c7c3f0613
10 changed files with 35 additions and 48 deletions

View file

@ -221,7 +221,8 @@ public:
SO_AllClasses = 0x1,
SO_SystemClasses = 0x2,
SO_Strings = 0x4,
SO_CodeCache = 0x8
SO_AllCodeCache = 0x8,
SO_ScavengeCodeCache = 0x10
};
FlexibleWorkGang* workers() const { return _workers; }
@ -232,9 +233,9 @@ public:
// "SO_AllClasses" applies the closure to all entries in the SystemDictionary;
// "SO_SystemClasses" to all the "system" classes and loaders;
// "SO_Strings" applies the closure to all entries in StringTable;
// "SO_CodeCache" applies the closure to all elements of the CodeCache.
// "SO_AllCodeCache" applies the closure to all elements of the CodeCache.
// "SO_ScavengeCodeCache" applies the closure to elements on the scavenge root list in the CodeCache.
void process_strong_roots(bool activate_scope,
bool is_scavenging,
ScanningOption so,
OopClosure* roots,
CodeBlobClosure* code_roots,