8168850: Mark module entries that have been specified by --patch-module

Adds a boolean to ModuleEntry to specify whether the module has been patched using the command line --patch-module

Reviewed-by: jiangli, lfoltan, dholmes
This commit is contained in:
Rachel Protacio 2016-12-05 11:45:20 -05:00
parent 78e6980e1a
commit 83ff43e737
5 changed files with 39 additions and 3 deletions

View file

@ -63,6 +63,7 @@ private:
bool _can_read_all_unnamed;
bool _has_default_read_edges; // JVMTI redefine/retransform support
bool _must_walk_reads; // walk module's reads list at GC safepoints to purge out dead modules
bool _is_patched; // whether the module is patched via --patch-module
TRACE_DEFINE_TRACE_ID_FIELD;
enum {MODULE_READS_SIZE = 101}; // Initial size of list of modules that the module can read.
@ -77,6 +78,7 @@ public:
_can_read_all_unnamed = false;
_has_default_read_edges = false;
_must_walk_reads = false;
_is_patched = false;
}
Symbol* name() const { return literal(); }
@ -131,6 +133,13 @@ public:
return prev;
}
void set_is_patched() {
_is_patched = true;
}
bool is_patched() {
return _is_patched;
}
ModuleEntry* next() const {
return (ModuleEntry*)HashtableEntry<Symbol*, mtModule>::next();
}