File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -394,6 +394,14 @@ oop HeapShared::get_archived_object(int permanent_index) {
394
394
// table[i] = offset of oop whose permanent index is i.
395
395
void CachedCodeDirectoryInternal::dumptime_init_internal () {
396
396
const int count = _dumptime_permanent_oop_count;
397
+ if (count == 0 ) {
398
+ // Avoid confusing CDS code with zero-sized tables, just return.
399
+ log_info (cds)(" No permanent oops" );
400
+ _permanent_oop_count = count;
401
+ _permanent_oop_offsets = nullptr ;
402
+ return ;
403
+ }
404
+
397
405
int * table = (int *)CDSAccess::allocate_from_code_cache (count * sizeof (int ));
398
406
for (int i = 0 ; i < count; i++) {
399
407
table[count] = -1 ;
Original file line number Diff line number Diff line change @@ -334,6 +334,13 @@ void CompilerConfig::set_compilation_policy_flags() {
334
334
}
335
335
}
336
336
337
+ // Current Leyden implementation requires SegmentedCodeCache: the archive-backed code
338
+ // cache would be initialized only then. Force SegmentedCodeCache if we are loading/storing
339
+ // cached code. TODO: Resolve this in code cache initialization code.
340
+ if (!SegmentedCodeCache && (LoadCachedCode || StoreCachedCode)) {
341
+ FLAG_SET_ERGO (SegmentedCodeCache, true );
342
+ }
343
+
337
344
if (CompileThresholdScaling < 0 ) {
338
345
vm_exit_during_initialization (" Negative value specified for CompileThresholdScaling" , nullptr );
339
346
}
You can’t perform that action at this time.
0 commit comments