8074345: Enable RewriteBytecodes when VM runs with CDS

Enable bytecode rewriting when CDS turned on.

Co-authored-by: Ioi Lam <ioi.lam@oracle.com>
Reviewed-by: coleenp, iklam
This commit is contained in:
Yumin Qi 2015-03-25 15:18:37 -07:00
parent c08ffb03e4
commit 3e6cf09c39
13 changed files with 202 additions and 97 deletions

View file

@ -1848,15 +1848,8 @@ void Arguments::set_heap_size() {
}
}
// This must be called after ergonomics because we want bytecode rewriting
// if the server compiler is used, or if UseSharedSpaces is disabled.
// This must be called after ergonomics.
void Arguments::set_bytecode_flags() {
// Better not attempt to store into a read-only space.
if (UseSharedSpaces) {
FLAG_SET_DEFAULT(RewriteBytecodes, false);
FLAG_SET_DEFAULT(RewriteFrequentPairs, false);
}
if (!RewriteBytecodes) {
FLAG_SET_DEFAULT(RewriteFrequentPairs, false);
}