mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8164011: --patch-module support for CDS
Allows the use of the --patch-module vm option with CDS. However, classes found in --patch-module during dump time will not be archived. Reviewed-by: iklam, dcubed, lfoltan
This commit is contained in:
parent
6085d008cc
commit
f9707ab4cd
8 changed files with 268 additions and 38 deletions
|
@ -69,6 +69,7 @@ public:
|
|||
// Attempt to locate file_name through this class path entry.
|
||||
// Returns a class file parsing stream if successfull.
|
||||
virtual ClassFileStream* open_stream(const char* name, TRAPS) = 0;
|
||||
virtual bool stream_exists(const char* name) = 0;
|
||||
// Debugging
|
||||
NOT_PRODUCT(virtual void compile_the_world(Handle loader, TRAPS) = 0;)
|
||||
};
|
||||
|
@ -83,6 +84,7 @@ class ClassPathDirEntry: public ClassPathEntry {
|
|||
JImageFile* jimage() const { return NULL; }
|
||||
ClassPathDirEntry(const char* dir);
|
||||
ClassFileStream* open_stream(const char* name, TRAPS);
|
||||
bool stream_exists(const char* name) { return false; }
|
||||
// Debugging
|
||||
NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);)
|
||||
};
|
||||
|
@ -126,6 +128,7 @@ class ClassPathZipEntry: public ClassPathEntry {
|
|||
ClassFileStream* open_stream(const char* name, TRAPS);
|
||||
void contents_do(void f(const char* name, void* context), void* context);
|
||||
bool is_multiple_versioned(TRAPS) NOT_CDS_RETURN_(false);
|
||||
bool stream_exists(const char* name);
|
||||
// Debugging
|
||||
NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);)
|
||||
};
|
||||
|
@ -145,6 +148,7 @@ public:
|
|||
ClassPathImageEntry(JImageFile* jimage, const char* name);
|
||||
~ClassPathImageEntry();
|
||||
ClassFileStream* open_stream(const char* name, TRAPS);
|
||||
bool stream_exists(const char* name) { return false; }
|
||||
|
||||
// Debugging
|
||||
NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);)
|
||||
|
@ -255,6 +259,7 @@ class ClassLoader: AllStatic {
|
|||
|
||||
// Info used by CDS
|
||||
CDS_ONLY(static SharedPathsMiscInfo * _shared_paths_misc_info;)
|
||||
CDS_ONLY(static int _num_patch_mod_prefixes;)
|
||||
|
||||
// Initialization:
|
||||
// - setup the boot loader's system class path
|
||||
|
@ -427,6 +432,9 @@ class ClassLoader: AllStatic {
|
|||
static void initialize_module_loader_map(JImageFile* jimage);
|
||||
static s2 classloader_type(Symbol* class_name, ClassPathEntry* e,
|
||||
int classpath_index, TRAPS);
|
||||
static bool is_in_patch_module(const char* const file_name);
|
||||
static void setup_patch_mod_path(); // Only when -Xshare:dump
|
||||
static int num_patch_mod_prefixes() { return _num_patch_mod_prefixes; }
|
||||
#endif
|
||||
|
||||
static void trace_class_path(const char* msg, const char* name = NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue