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

@ -301,6 +301,14 @@ ModuleEntry* ModuleEntryTable::new_entry(unsigned int hash, Handle module_handle
entry->set_version(version);
entry->set_location(location);
if (ClassLoader::is_in_patch_mod_entries(name)) {
entry->set_is_patched();
if (log_is_enabled(Trace, modules, patch)) {
ResourceMark rm;
log_trace(modules, patch)("Marked module %s as patched from --patch-module", name->as_C_string());
}
}
TRACE_INIT_MODULE_ID(entry);
return entry;