Should record dependency on ProfileExceptionHandlers flag

This commit is contained in:
Igor Veresov 2026-07-31 09:46:02 -07:00
parent 835c7b1be5
commit 4ae5c2a9f9
3 changed files with 12 additions and 1 deletions

View File

@ -307,6 +307,7 @@ void FileMapHeader::populate(FileMapInfo *info, size_t core_region_alignment,
_type_profile_width = TypeProfileWidth;
_bci_profile_width = BciProfileWidth;
_profile_traps = ProfileTraps;
_profile_exception_handlers = ProfileExceptionHandlers;
_type_profile_casts = TypeProfileCasts;
_spec_trap_limit_extra_entries = SpecTrapLimitExtraEntries;
_max_heap_size = MaxHeapSize;
@ -1947,6 +1948,14 @@ bool FileMapHeader::validate() {
return false;
}
if (_profile_exception_handlers != ProfileExceptionHandlers) {
AOTMetaspace::report_loading_error("The %s's ProfileExceptionHandlers setting (%s)"
" does not equal the current ProfileExceptionHandlers setting (%s).", file_type,
_profile_exception_handlers ? "enabled" : "disabled",
ProfileExceptionHandlers ? "enabled" : "disabled");
return false;
}
if (_spec_trap_limit_extra_entries != SpecTrapLimitExtraEntries) {
AOTMetaspace::report_loading_error("The %s's SpecTrapLimitExtraEntries setting (%d)"
" does not equal the current SpecTrapLimitExtraEntries setting (%d).", file_type,

View File

@ -193,6 +193,7 @@ private:
intx _type_profile_width;
intx _bci_profile_width;
bool _profile_traps;
bool _profile_exception_handlers;
bool _type_profile_casts;
int _spec_trap_limit_extra_entries;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -121,6 +121,7 @@ public class AOTProfileFlags {
trainAndRun("TypeProfileArgsLimit", "-XX:TypeProfileArgsLimit=2", "-XX:TypeProfileArgsLimit=3", errorPattern);
trainAndRun("TypeProfileParamsLimit", "-XX:TypeProfileParmsLimit=2", "-XX:TypeProfileParmsLimit=3", errorPattern);
trainAndRun("TypeProfileWidth", "-XX:TypeProfileWidth=2", "-XX:TypeProfileWidth=3", errorPattern);
trainAndRun("ProfileExceptionHandlers", "-XX:+ProfileExceptionHandlers", "-XX:-ProfileExceptionHandlers", errorPattern);
if (Platform.isDebugBuild()) {
trainAndRun("ProfileTraps", "-XX:+ProfileTraps", "-XX:-ProfileTraps", errorPattern);
trainAndRun("TypeProfileCasts", "-XX:+TypeProfileCasts", "-XX:-TypeProfileCasts", errorPattern);