diff --git a/src/hotspot/cpu/aarch64/vmStructs_aarch64.hpp b/src/hotspot/cpu/aarch64/vmStructs_aarch64.hpp index ceb40dce921..bf9c965213c 100644 --- a/src/hotspot/cpu/aarch64/vmStructs_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/vmStructs_aarch64.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -30,17 +30,17 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \ +#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) \ volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*) \ static_field(VM_Version, _rop_protection, bool) \ static_field(VM_Version, _pac_mask, uintptr_t) -#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) \ +#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) \ declare_toplevel_type(VM_Version) -#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) #define DECLARE_INT_CPU_FEATURE_CONSTANT(id, name, bit) GENERATE_VM_INT_CONSTANT_ENTRY(VM_Version::CPU_##id) #define VM_INT_CPU_FEATURE_CONSTANTS CPU_FEATURE_FLAGS(DECLARE_INT_CPU_FEATURE_CONSTANT) diff --git a/src/hotspot/cpu/arm/vmStructs_arm.hpp b/src/hotspot/cpu/arm/vmStructs_arm.hpp index 4ce78d517e8..453938a824e 100644 --- a/src/hotspot/cpu/arm/vmStructs_arm.hpp +++ b/src/hotspot/cpu/arm/vmStructs_arm.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2025, 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 @@ -29,7 +29,7 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \ +#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) \ \ /******************************/ \ /* JavaCallWrapper */ \ @@ -39,10 +39,10 @@ /******************************/ \ volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*) -#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) #endif // CPU_ARM_VMSTRUCTS_ARM_HPP diff --git a/src/hotspot/cpu/ppc/vmStructs_ppc.hpp b/src/hotspot/cpu/ppc/vmStructs_ppc.hpp index c1bdc1b1eb5..efe7fb9ad7b 100644 --- a/src/hotspot/cpu/ppc/vmStructs_ppc.hpp +++ b/src/hotspot/cpu/ppc/vmStructs_ppc.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -30,12 +30,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) -#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) #endif // CPU_PPC_VMSTRUCTS_PPC_HPP diff --git a/src/hotspot/cpu/riscv/vmStructs_riscv.hpp b/src/hotspot/cpu/riscv/vmStructs_riscv.hpp index 6c89133de02..ba250f77268 100644 --- a/src/hotspot/cpu/riscv/vmStructs_riscv.hpp +++ b/src/hotspot/cpu/riscv/vmStructs_riscv.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2021, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -30,13 +30,13 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \ +#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) \ volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*) -#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) #endif // CPU_RISCV_VMSTRUCTS_RISCV_HPP diff --git a/src/hotspot/cpu/s390/vmStructs_s390.hpp b/src/hotspot/cpu/s390/vmStructs_s390.hpp index 1f65002977a..100fc97560e 100644 --- a/src/hotspot/cpu/s390/vmStructs_s390.hpp +++ b/src/hotspot/cpu/s390/vmStructs_s390.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -30,12 +30,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) -#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) #endif // CPU_S390_VMSTRUCTS_S390_HPP diff --git a/src/hotspot/cpu/x86/vmStructs_x86.hpp b/src/hotspot/cpu/x86/vmStructs_x86.hpp index 4569bd9a216..d894d8b09a7 100644 --- a/src/hotspot/cpu/x86/vmStructs_x86.hpp +++ b/src/hotspot/cpu/x86/vmStructs_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, 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 @@ -29,17 +29,17 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \ +#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) \ volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*) -#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) \ +#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) \ -#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \ +#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) \ LP64_ONLY(declare_constant(frame::arg_reg_save_area_bytes)) \ declare_constant(frame::interpreter_frame_sender_sp_offset) \ declare_constant(frame::interpreter_frame_last_sp_offset) -#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) #define DECLARE_LONG_CPU_FEATURE_CONSTANT(id, name, bit) GENERATE_VM_LONG_CONSTANT_ENTRY(VM_Version::CPU_##id) #define VM_LONG_CPU_FEATURE_CONSTANTS CPU_FEATURE_FLAGS(DECLARE_LONG_CPU_FEATURE_CONSTANT) diff --git a/src/hotspot/cpu/zero/vmStructs_zero.hpp b/src/hotspot/cpu/zero/vmStructs_zero.hpp index 64a9300e25c..9100c765e7e 100644 --- a/src/hotspot/cpu/zero/vmStructs_zero.hpp +++ b/src/hotspot/cpu/zero/vmStructs_zero.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright 2007 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -30,12 +30,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) -#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) #endif // CPU_ZERO_VMSTRUCTS_ZERO_HPP diff --git a/src/hotspot/os/aix/vmStructs_aix.hpp b/src/hotspot/os/aix/vmStructs_aix.hpp index fb4b6409aaa..c79c9477fff 100644 --- a/src/hotspot/os/aix/vmStructs_aix.hpp +++ b/src/hotspot/os/aix/vmStructs_aix.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, 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 @@ -29,14 +29,14 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \ +#define VM_STRUCTS_OS(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) \ \ /******************************/ \ /* Threads (NOTE: incomplete) */ \ /******************************/ \ nonstatic_field(OSThread, _thread_id, pthread_t) \ -#define VM_TYPES_OS(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) \ +#define VM_TYPES_OS(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) \ \ /**********************/ \ /* Posix Thread IDs */ \ @@ -44,9 +44,9 @@ \ declare_unsigned_integer_type(pthread_t) -#define VM_INT_CONSTANTS_OS(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS(declare_constant, declare_preprocessor_constant) #define VM_ADDRESSES_OS(declare_address, declare_preprocessor_address, declare_function) diff --git a/src/hotspot/os/bsd/vmStructs_bsd.hpp b/src/hotspot/os/bsd/vmStructs_bsd.hpp index b29067a9024..e07f1cd7dd0 100644 --- a/src/hotspot/os/bsd/vmStructs_bsd.hpp +++ b/src/hotspot/os/bsd/vmStructs_bsd.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, 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 @@ -31,7 +31,7 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \ +#define VM_STRUCTS_OS(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) \ \ /******************************/ \ /* Threads (NOTE: incomplete) */ \ @@ -39,7 +39,7 @@ nonstatic_field(OSThread, _thread_id, OSThread::thread_id_t) \ nonstatic_field(OSThread, _unique_thread_id, uint64_t) -#define VM_TYPES_OS(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) \ +#define VM_TYPES_OS(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) \ \ /**********************/ \ /* Thread IDs */ \ @@ -47,9 +47,9 @@ \ declare_unsigned_integer_type(OSThread::thread_id_t) -#define VM_INT_CONSTANTS_OS(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS(declare_constant, declare_preprocessor_constant) #define VM_ADDRESSES_OS(declare_address, declare_preprocessor_address, declare_function) \ declare_preprocessor_address("RTLD_DEFAULT", RTLD_DEFAULT) diff --git a/src/hotspot/os/linux/vmStructs_linux.hpp b/src/hotspot/os/linux/vmStructs_linux.hpp index 2696a891f56..90bc6517a3f 100644 --- a/src/hotspot/os/linux/vmStructs_linux.hpp +++ b/src/hotspot/os/linux/vmStructs_linux.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, 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 @@ -31,7 +31,7 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \ +#define VM_STRUCTS_OS(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) \ \ /******************************/ \ /* Threads (NOTE: incomplete) */ \ @@ -39,7 +39,7 @@ nonstatic_field(OSThread, _thread_id, pid_t) \ nonstatic_field(OSThread, _pthread_id, pthread_t) -#define VM_TYPES_OS(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) \ +#define VM_TYPES_OS(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) \ \ /**********************/ \ /* Posix Thread IDs */ \ @@ -48,9 +48,9 @@ declare_integer_type(pid_t) \ declare_unsigned_integer_type(pthread_t) -#define VM_INT_CONSTANTS_OS(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS(declare_constant, declare_preprocessor_constant) #define VM_ADDRESSES_OS(declare_address, declare_preprocessor_address, declare_function) \ declare_preprocessor_address("RTLD_DEFAULT", RTLD_DEFAULT) diff --git a/src/hotspot/os/windows/vmStructs_windows.hpp b/src/hotspot/os/windows/vmStructs_windows.hpp index 26ad17bb166..7d457c82fe8 100644 --- a/src/hotspot/os/windows/vmStructs_windows.hpp +++ b/src/hotspot/os/windows/vmStructs_windows.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, 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 @@ -29,7 +29,7 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \ +#define VM_STRUCTS_OS(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) \ \ /******************************/ \ /* Threads (NOTE: incomplete) */ \ @@ -38,13 +38,13 @@ nonstatic_field(OSThread, _thread_id, OSThread::thread_id_t) \ unchecked_nonstatic_field(OSThread, _thread_handle, sizeof(HANDLE)) /* NOTE: no type */ -#define VM_TYPES_OS(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) \ +#define VM_TYPES_OS(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) \ \ declare_unsigned_integer_type(OSThread::thread_id_t) -#define VM_INT_CONSTANTS_OS(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS(declare_constant, declare_preprocessor_constant) #define VM_ADDRESSES_OS(declare_address, declare_preprocessor_address, declare_function) diff --git a/src/hotspot/os_cpu/aix_ppc/vmStructs_aix_ppc.hpp b/src/hotspot/os_cpu/aix_ppc/vmStructs_aix_ppc.hpp index d09b0125f25..df8857a5b84 100644 --- a/src/hotspot/os_cpu/aix_ppc/vmStructs_aix_ppc.hpp +++ b/src/hotspot/os_cpu/aix_ppc/vmStructs_aix_ppc.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -30,12 +30,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) -#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) #endif // OS_CPU_AIX_PPC_VMSTRUCTS_AIX_PPC_HPP diff --git a/src/hotspot/os_cpu/bsd_aarch64/vmStructs_bsd_aarch64.hpp b/src/hotspot/os_cpu/bsd_aarch64/vmStructs_bsd_aarch64.hpp index 24d5c0f4dc6..fc98519eb82 100644 --- a/src/hotspot/os_cpu/bsd_aarch64/vmStructs_bsd_aarch64.hpp +++ b/src/hotspot/os_cpu/bsd_aarch64/vmStructs_bsd_aarch64.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,12 +31,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) -#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) #endif // OS_CPU_BSD_AARCH64_VMSTRUCTS_BSD_AARCH64_HPP diff --git a/src/hotspot/os_cpu/bsd_x86/vmStructs_bsd_x86.hpp b/src/hotspot/os_cpu/bsd_x86/vmStructs_bsd_x86.hpp index 4f6c4414f5f..d26921e25ba 100644 --- a/src/hotspot/os_cpu/bsd_x86/vmStructs_bsd_x86.hpp +++ b/src/hotspot/os_cpu/bsd_x86/vmStructs_bsd_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, 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 @@ -29,12 +29,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) -#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) #endif // OS_CPU_BSD_X86_VMSTRUCTS_BSD_X86_HPP diff --git a/src/hotspot/os_cpu/bsd_zero/vmStructs_bsd_zero.hpp b/src/hotspot/os_cpu/bsd_zero/vmStructs_bsd_zero.hpp index ea3771b7ce6..b5b523cd0ac 100644 --- a/src/hotspot/os_cpu/bsd_zero/vmStructs_bsd_zero.hpp +++ b/src/hotspot/os_cpu/bsd_zero/vmStructs_bsd_zero.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright 2007 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -30,13 +30,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) - -#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) #endif // OS_CPU_BSD_ZERO_VMSTRUCTS_BSD_ZERO_HPP diff --git a/src/hotspot/os_cpu/linux_aarch64/vmStructs_linux_aarch64.hpp b/src/hotspot/os_cpu/linux_aarch64/vmStructs_linux_aarch64.hpp index 6cc6d73be77..cf44ce0ca74 100644 --- a/src/hotspot/os_cpu/linux_aarch64/vmStructs_linux_aarch64.hpp +++ b/src/hotspot/os_cpu/linux_aarch64/vmStructs_linux_aarch64.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -30,12 +30,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) -#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) #endif // OS_CPU_LINUX_AARCH64_VMSTRUCTS_LINUX_AARCH64_HPP diff --git a/src/hotspot/os_cpu/linux_arm/vmStructs_linux_arm.hpp b/src/hotspot/os_cpu/linux_arm/vmStructs_linux_arm.hpp index a1b73bdee8f..9d4c610b45a 100644 --- a/src/hotspot/os_cpu/linux_arm/vmStructs_linux_arm.hpp +++ b/src/hotspot/os_cpu/linux_arm/vmStructs_linux_arm.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2025, 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 @@ -29,12 +29,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) -#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) #endif // OS_CPU_LINUX_ARM_VMSTRUCTS_LINUX_ARM_HPP diff --git a/src/hotspot/os_cpu/linux_ppc/vmStructs_linux_ppc.hpp b/src/hotspot/os_cpu/linux_ppc/vmStructs_linux_ppc.hpp index 46288cdeaab..e52dc525e64 100644 --- a/src/hotspot/os_cpu/linux_ppc/vmStructs_linux_ppc.hpp +++ b/src/hotspot/os_cpu/linux_ppc/vmStructs_linux_ppc.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -30,12 +30,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) -#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) #endif // OS_CPU_LINUX_PPC_VMSTRUCTS_LINUX_PPC_HPP diff --git a/src/hotspot/os_cpu/linux_riscv/vmStructs_linux_riscv.hpp b/src/hotspot/os_cpu/linux_riscv/vmStructs_linux_riscv.hpp index b39a329335a..02bcf429d42 100644 --- a/src/hotspot/os_cpu/linux_riscv/vmStructs_linux_riscv.hpp +++ b/src/hotspot/os_cpu/linux_riscv/vmStructs_linux_riscv.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2021, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -30,12 +30,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) -#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) #endif // OS_CPU_LINUX_RISCV_VM_VMSTRUCTS_LINUX_RISCV_HPP diff --git a/src/hotspot/os_cpu/linux_s390/vmStructs_linux_s390.hpp b/src/hotspot/os_cpu/linux_s390/vmStructs_linux_s390.hpp index a52bc722579..0a75e6d4b92 100644 --- a/src/hotspot/os_cpu/linux_s390/vmStructs_linux_s390.hpp +++ b/src/hotspot/os_cpu/linux_s390/vmStructs_linux_s390.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -30,12 +30,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) -#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) #endif // OS_CPU_LINUX_S390_VMSTRUCTS_LINUX_S390_HPP diff --git a/src/hotspot/os_cpu/linux_x86/vmStructs_linux_x86.hpp b/src/hotspot/os_cpu/linux_x86/vmStructs_linux_x86.hpp index ddba9daf131..290e30dff68 100644 --- a/src/hotspot/os_cpu/linux_x86/vmStructs_linux_x86.hpp +++ b/src/hotspot/os_cpu/linux_x86/vmStructs_linux_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, 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 @@ -29,12 +29,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) -#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) #endif // OS_CPU_LINUX_X86_VMSTRUCTS_LINUX_X86_HPP diff --git a/src/hotspot/os_cpu/linux_zero/vmStructs_linux_zero.hpp b/src/hotspot/os_cpu/linux_zero/vmStructs_linux_zero.hpp index 271193cd705..651846c4b36 100644 --- a/src/hotspot/os_cpu/linux_zero/vmStructs_linux_zero.hpp +++ b/src/hotspot/os_cpu/linux_zero/vmStructs_linux_zero.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright 2007 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -30,12 +30,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) -#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) #endif // OS_CPU_LINUX_ZERO_VMSTRUCTS_LINUX_ZERO_HPP diff --git a/src/hotspot/os_cpu/windows_aarch64/vmStructs_windows_aarch64.hpp b/src/hotspot/os_cpu/windows_aarch64/vmStructs_windows_aarch64.hpp index 18a5588b743..2462a20568d 100644 --- a/src/hotspot/os_cpu/windows_aarch64/vmStructs_windows_aarch64.hpp +++ b/src/hotspot/os_cpu/windows_aarch64/vmStructs_windows_aarch64.hpp @@ -29,12 +29,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) -#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) #endif // OS_CPU_WINDOWS_AARCH64_VMSTRUCTS_WINDOWS_AARCH64_HPP diff --git a/src/hotspot/os_cpu/windows_x86/vmStructs_windows_x86.hpp b/src/hotspot/os_cpu/windows_x86/vmStructs_windows_x86.hpp index 4ed62839d51..0ac47bdbd80 100644 --- a/src/hotspot/os_cpu/windows_x86/vmStructs_windows_x86.hpp +++ b/src/hotspot/os_cpu/windows_x86/vmStructs_windows_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, 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 @@ -29,12 +29,12 @@ // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. -#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) -#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type) -#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) -#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant) #endif // OS_CPU_WINDOWS_X86_VMSTRUCTS_WINDOWS_X86_HPP diff --git a/src/hotspot/share/c1/c1_Runtime1.hpp b/src/hotspot/share/c1/c1_Runtime1.hpp index 5f1ae4333bc..5fce0ff4228 100644 --- a/src/hotspot/share/c1/c1_Runtime1.hpp +++ b/src/hotspot/share/c1/c1_Runtime1.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2025, 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 @@ -53,7 +53,6 @@ enum class C1StubId :int { #undef C1_STUB_ID_ENUM_DECLARE class Runtime1: public AllStatic { - friend class VMStructs; friend class ArrayCopyStub; public: diff --git a/src/hotspot/share/ci/ciClassList.hpp b/src/hotspot/share/ci/ciClassList.hpp index ccc99cfa211..618a052765e 100644 --- a/src/hotspot/share/ci/ciClassList.hpp +++ b/src/hotspot/share/ci/ciClassList.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2025, 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 @@ -75,13 +75,11 @@ class ciTypeArrayKlass; // Everyone gives access to ciObjectFactory #define CI_PACKAGE_ACCESS \ friend class ciObjectFactory; \ -friend class VMStructs; // These are the packages that have access to ciEnv // Any more access must be given explicitly. #define CI_PACKAGE_ACCESS_TO \ friend class ciObjectFactory; \ -friend class VMStructs; \ friend class ciCallSite; \ friend class ciConstantPoolCache; \ friend class ciField; \ diff --git a/src/hotspot/share/ci/ciConstant.hpp b/src/hotspot/share/ci/ciConstant.hpp index 1d0f60407ed..f07d0a170df 100644 --- a/src/hotspot/share/ci/ciConstant.hpp +++ b/src/hotspot/share/ci/ciConstant.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2025, 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 @@ -32,7 +32,6 @@ // // This class represents a constant value. class ciConstant { - friend class VMStructs; private: friend class ciEnv; friend class ciField; diff --git a/src/hotspot/share/ci/ciObjectFactory.hpp b/src/hotspot/share/ci/ciObjectFactory.hpp index f1f6ae24545..d95a7d1ff22 100644 --- a/src/hotspot/share/ci/ciObjectFactory.hpp +++ b/src/hotspot/share/ci/ciObjectFactory.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2025, 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 @@ -37,7 +37,6 @@ // which ensures that for each oop, at most one ciObject is created. // This invariant allows efficient implementation of ciObject. class ciObjectFactory : public ArenaObj { - friend class VMStructs; friend class ciEnv; private: diff --git a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp index 93c3449d0ff..48c9f8a64dc 100644 --- a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp +++ b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp @@ -943,7 +943,7 @@ #ifdef AARCH64 -#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \ +#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) \ static_field(VM_Version, _zva_length, int) \ static_field(StubRoutines::aarch64, _count_positives, address) \ static_field(StubRoutines::aarch64, _count_positives_long, address) \ @@ -957,11 +957,11 @@ #ifdef X86 -#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \ +#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) \ volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*) \ static_field(VM_Version, _has_intel_jcc_erratum, bool) -#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \ +#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) \ LP64_ONLY(declare_constant(frame::arg_reg_save_area_bytes)) \ declare_constant(frame::interpreter_frame_sender_sp_offset) \ declare_constant(frame::interpreter_frame_last_sp_offset) @@ -975,15 +975,15 @@ * Dummy defines for architectures that don't use these. */ #ifndef VM_STRUCTS_CPU -#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) +#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field) #endif #ifndef VM_INT_CONSTANTS_CPU -#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) #endif #ifndef VM_LONG_CONSTANTS_CPU -#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) +#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) #endif #ifndef VM_ADDRESSES_OS @@ -1010,10 +1010,7 @@ VMStructEntry JVMCIVMStructs::localHotSpotVMStructs[] = { GENERATE_STATIC_VM_STRUCT_ENTRY, GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY, GENERATE_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY, - GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY) + GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY) #if INCLUDE_G1GC VM_STRUCTS_JVMCI_G1GC(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, @@ -1038,10 +1035,7 @@ VMIntConstantEntry JVMCIVMStructs::localHotSpotVMIntConstants[] = { GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY) VM_INT_CONSTANTS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY, - GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY, - GENERATE_C1_VM_INT_CONSTANT_ENTRY, - GENERATE_C2_VM_INT_CONSTANT_ENTRY, - GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY) + GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY) #if INCLUDE_G1GC VM_INT_CONSTANTS_JVMCI_G1GC(GENERATE_VM_INT_CONSTANT_ENTRY, @@ -1064,10 +1058,7 @@ VMLongConstantEntry JVMCIVMStructs::localHotSpotVMLongConstants[] = { GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY) VM_LONG_CONSTANTS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY, - GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY, - GENERATE_C1_VM_LONG_CONSTANT_ENTRY, - GENERATE_C2_VM_LONG_CONSTANT_ENTRY, - GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY) + GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY) #ifdef VM_LONG_CPU_FEATURE_CONSTANTS VM_LONG_CPU_FEATURE_CONSTANTS #endif @@ -1123,10 +1114,7 @@ void JVMCIVMStructs::init() { CHECK_STATIC_VM_STRUCT_ENTRY, CHECK_NO_OP, CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY, - CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, - CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY, - CHECK_NO_OP, - CHECK_NO_OP); + CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY) #if INCLUDE_G1GC VM_STRUCTS_JVMCI_G1GC(CHECK_NONSTATIC_VM_STRUCT_ENTRY, diff --git a/src/hotspot/share/opto/block.hpp b/src/hotspot/share/opto/block.hpp index 231c0994903..4ac6399d3a0 100644 --- a/src/hotspot/share/opto/block.hpp +++ b/src/hotspot/share/opto/block.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, 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 @@ -47,7 +47,6 @@ struct Tarjan; // Note that the constructor just zeros things, and since I use Arena // allocation I do not need a destructor to reclaim storage. class Block_Array : public ArenaObj { - friend class VMStructs; uint _size; // allocated size, as opposed to formal limit debug_only(uint _limit;) // limit to formal domain Arena *_arena; // Arena to allocate in @@ -75,7 +74,6 @@ public: class Block_List : public Block_Array { - friend class VMStructs; public: uint _cnt; Block_List() : Block_List(Thread::current()->resource_area()) { } @@ -93,7 +91,6 @@ public: class CFGElement : public AnyObj { - friend class VMStructs; public: double _freq; // Execution frequency (estimate) @@ -109,7 +106,6 @@ class CFGElement : public AnyObj { // Basic blocks are used during the output routines, and are not used during // any optimization pass. They are created late in the game. class Block : public CFGElement { - friend class VMStructs; private: // Nodes in this block, in order @@ -372,7 +368,6 @@ public: //------------------------------PhaseCFG--------------------------------------- // Build an array of Basic Block pointers, one per Node. class PhaseCFG : public Phase { - friend class VMStructs; private: // Root of whole program RootNode* _root; @@ -703,7 +698,6 @@ public: //------------------------------CFGLoop------------------------------------------- class CFGLoop : public CFGElement { - friend class VMStructs; int _id; int _depth; CFGLoop *_parent; // root of loop tree is the method level "pseudo" loop, it's parent is null @@ -756,7 +750,6 @@ class CFGLoop : public CFGElement { // A edge between two basic blocks that will be embodied by a branch or a // fall-through. class CFGEdge : public ResourceObj { - friend class VMStructs; private: Block * _from; // Source basic block Block * _to; // Destination basic block @@ -892,7 +885,6 @@ class Trace : public ResourceObj { //------------------------------PhaseBlockLayout------------------------------- // Rearrange blocks into some canonical order, based on edges and their frequencies class PhaseBlockLayout : public Phase { - friend class VMStructs; PhaseCFG &_cfg; // Control flow graph GrowableArray *edges; diff --git a/src/hotspot/share/opto/callnode.hpp b/src/hotspot/share/opto/callnode.hpp index ad5e9daa8f6..2f1aad60e6f 100644 --- a/src/hotspot/share/opto/callnode.hpp +++ b/src/hotspot/share/opto/callnode.hpp @@ -198,7 +198,6 @@ public: // This provides a way to map the optimized program back into the interpreter, // or to let the GC mark the stack. class JVMState : public ResourceObj { - friend class VMStructs; public: typedef enum { Reexecute_Undefined = -1, // not defined -- will be translated into false later @@ -331,7 +330,6 @@ public: class SafePointNode : public MultiNode { friend JVMState; friend class GraphKit; - friend class VMStructs; virtual bool cmp( const Node &n ) const; virtual uint size_of() const; // Size is bigger @@ -672,7 +670,6 @@ class CallGenerator; // Call nodes now subsume the function of debug nodes at callsites, so they // contain the functionality of a full scope chain of debug nodes. class CallNode : public SafePointNode { - friend class VMStructs; protected: bool may_modify_arraycopy_helper(const TypeOopPtr* dest_t, const TypeOopPtr* t_oop, PhaseValues* phase); @@ -760,7 +757,6 @@ public: // convention. (The "Java" calling convention is the compiler's calling // convention, as opposed to the interpreter's or that of native C.) class CallJavaNode : public CallNode { - friend class VMStructs; protected: virtual bool cmp( const Node &n ) const; virtual uint size_of() const; // Size is bigger diff --git a/src/hotspot/share/opto/chaitin.hpp b/src/hotspot/share/opto/chaitin.hpp index cf02deb6019..4b74420f996 100644 --- a/src/hotspot/share/opto/chaitin.hpp +++ b/src/hotspot/share/opto/chaitin.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, 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 @@ -47,7 +47,6 @@ class PhaseChaitin; //------------------------------LRG-------------------------------------------- // Live-RanGe structure. class LRG : public ResourceObj { - friend class VMStructs; public: static const uint AllStack_size = 0xFFFFF; // This mask size is used to tell that the mask of this LRG supports stack positions enum { SPILL_REG=29999 }; // Register number of a spilled LRG @@ -236,7 +235,6 @@ public: // abstract! It needs abstraction so I can fiddle with the implementation to // get even more speed. class PhaseIFG : public Phase { - friend class VMStructs; // Current implementation: a triangular adjacency list. // Array of adjacency-lists, indexed by live-range number @@ -417,7 +415,6 @@ public: //------------------------------Chaitin---------------------------------------- // Briggs-Chaitin style allocation, mostly. class PhaseChaitin : public PhaseRegAlloc { - friend class VMStructs; int _trip_cnt; int _alternate; diff --git a/src/hotspot/share/opto/compile.hpp b/src/hotspot/share/opto/compile.hpp index 93252891207..2ae3cca218d 100644 --- a/src/hotspot/share/opto/compile.hpp +++ b/src/hotspot/share/opto/compile.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, 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 @@ -175,7 +175,6 @@ class CloneMap { class Options { friend class Compile; - friend class VMStructs; private: const bool _subsume_loads; // Load can be matched as part of a larger op. const bool _do_escape_analysis; // Do escape analysis. @@ -222,7 +221,6 @@ class Options { // This class defines a top-level Compiler invocation. class Compile : public Phase { - friend class VMStructs; public: // Fixed alias indexes. (See also MergeMemNode.) diff --git a/src/hotspot/share/opto/node.hpp b/src/hotspot/share/opto/node.hpp index e89ec9455a6..f6cb9f692bb 100644 --- a/src/hotspot/share/opto/node.hpp +++ b/src/hotspot/share/opto/node.hpp @@ -241,7 +241,6 @@ typedef ResizeableResourceHashtableresource_area(), max), _cnt(0) {} @@ -1731,7 +1728,6 @@ void Node::visit_uses(Callback callback, Check is_boundary) const { //------------------------------Unique_Node_List------------------------------- class Unique_Node_List : public Node_List { - friend class VMStructs; VectorSet _in_worklist; uint _clock_index; // Index in list where to pop from next public: @@ -1871,7 +1867,6 @@ inline void Compile::remove_for_igvn(Node* n) { //------------------------------Node_Stack------------------------------------- class Node_Stack { - friend class VMStructs; protected: struct INode { Node *node; // Processed node @@ -1947,7 +1942,6 @@ public: // Debugging or profiling annotations loosely and sparsely associated // with some nodes. See Compile::node_notes_at for the accessor. class Node_Notes { - friend class VMStructs; JVMState* _jvms; public: diff --git a/src/hotspot/share/opto/optoreg.hpp b/src/hotspot/share/opto/optoreg.hpp index b079f3473ad..6298eeea39c 100644 --- a/src/hotspot/share/opto/optoreg.hpp +++ b/src/hotspot/share/opto/optoreg.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, 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 @@ -182,7 +182,6 @@ class OptoReg { // and converting that will return OptoReg::Bad losing the identity of the OptoReg. class OptoRegPair { - friend class VMStructs; private: short _second; short _first; diff --git a/src/hotspot/share/opto/regalloc.hpp b/src/hotspot/share/opto/regalloc.hpp index ecdf2e2bee8..86877e18325 100644 --- a/src/hotspot/share/opto/regalloc.hpp +++ b/src/hotspot/share/opto/regalloc.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, 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 @@ -39,7 +39,6 @@ class PhaseCFG; //------------------------------PhaseRegAlloc------------------------------------ // Abstract register allocator class PhaseRegAlloc : public Phase { - friend class VMStructs; static void (*_alloc_statistics[MAX_REG_ALLOCATORS])(); static int _num_allocators; diff --git a/src/hotspot/share/opto/type.hpp b/src/hotspot/share/opto/type.hpp index 67e339d3d2e..6e17ef0db05 100644 --- a/src/hotspot/share/opto/type.hpp +++ b/src/hotspot/share/opto/type.hpp @@ -79,7 +79,6 @@ class VerifyMeet; // different kind of Type exists. Types are never modified after creation, so // all their interesting fields are constant. class Type { - friend class VMStructs; public: enum TYPES { diff --git a/src/hotspot/share/runtime/vmStructs.cpp b/src/hotspot/share/runtime/vmStructs.cpp index c9d93930d63..5184440499a 100644 --- a/src/hotspot/share/runtime/vmStructs.cpp +++ b/src/hotspot/share/runtime/vmStructs.cpp @@ -115,31 +115,7 @@ #include "utilities/macros.hpp" #include "utilities/vmError.hpp" #ifdef COMPILER2 -#include "opto/addnode.hpp" -#include "opto/block.hpp" -#include "opto/callnode.hpp" -#include "opto/castnode.hpp" -#include "opto/cfgnode.hpp" -#include "opto/chaitin.hpp" -#include "opto/convertnode.hpp" -#include "opto/divnode.hpp" -#include "opto/intrinsicnode.hpp" -#include "opto/locknode.hpp" -#include "opto/loopnode.hpp" -#include "opto/machnode.hpp" -#include "opto/matcher.hpp" -#include "opto/mathexactnode.hpp" -#include "opto/movenode.hpp" -#include "opto/mulnode.hpp" -#include "opto/narrowptrnode.hpp" -#include "opto/opaquenode.hpp" #include "opto/optoreg.hpp" -#include "opto/parse.hpp" -#include "opto/phaseX.hpp" -#include "opto/regalloc.hpp" -#include "opto/rootnode.hpp" -#include "opto/subnode.hpp" -#include "opto/vectornode.hpp" #endif // COMPILER2 #include CPU_HEADER(vmStructs) @@ -183,11 +159,7 @@ volatile_static_field, \ unchecked_nonstatic_field, \ volatile_nonstatic_field, \ - nonproduct_nonstatic_field, \ - c1_nonstatic_field, \ - c2_nonstatic_field, \ - unchecked_c1_static_field, \ - unchecked_c2_static_field) \ + nonproduct_nonstatic_field) \ \ /*************/ \ /* GC fields */ \ @@ -595,8 +567,6 @@ nonstatic_field(nmethod, _comp_level, CompLevel) \ volatile_nonstatic_field(nmethod, _exception_cache, ExceptionCache*) \ \ - unchecked_c2_static_field(Deoptimization, _trap_reason_name, void*) \ - \ nonstatic_field(Deoptimization::UnrollBlock, _size_of_deoptimized_frame, int) \ nonstatic_field(Deoptimization::UnrollBlock, _caller_adjustment, int) \ nonstatic_field(Deoptimization::UnrollBlock, _number_of_frames, int) \ @@ -667,7 +637,6 @@ volatile_nonstatic_field(JavaThread, _terminated, JavaThread::TerminatedTypes) \ nonstatic_field(Thread, _osthread, OSThread*) \ nonstatic_field(Thread, _resource_area, ResourceArea*) \ - nonstatic_field(CompilerThread, _env, ciEnv*) \ \ /************/ \ /* OSThread */ \ @@ -710,75 +679,6 @@ static_field(VMRegImpl, regName[0], const char*) \ static_field(VMRegImpl, stack0, VMReg) \ \ - /*******************************/ \ - /* Runtime1 (NOTE: incomplete) */ \ - /*******************************/ \ - \ - unchecked_c1_static_field(Runtime1, _blobs, sizeof(Runtime1::_blobs)) /* NOTE: no type */ \ - \ - /**************/ \ - /* CI */ \ - /************/ \ - \ - nonstatic_field(ciEnv, _compiler_data, void*) \ - nonstatic_field(ciEnv, _factory, ciObjectFactory*) \ - nonstatic_field(ciEnv, _dependencies, Dependencies*) \ - nonstatic_field(ciEnv, _task, CompileTask*) \ - nonstatic_field(ciEnv, _arena, Arena*) \ - \ - nonstatic_field(ciBaseObject, _ident, uint) \ - \ - nonstatic_field(ciObject, _handle, jobject) \ - nonstatic_field(ciObject, _klass, ciKlass*) \ - \ - nonstatic_field(ciMetadata, _metadata, Metadata*) \ - \ - nonstatic_field(ciSymbol, _symbol, Symbol*) \ - \ - nonstatic_field(ciType, _basic_type, BasicType) \ - \ - nonstatic_field(ciKlass, _name, ciSymbol*) \ - \ - nonstatic_field(ciArrayKlass, _dimension, jint) \ - \ - nonstatic_field(ciObjArrayKlass, _element_klass, ciKlass*) \ - nonstatic_field(ciObjArrayKlass, _base_element_klass, ciKlass*) \ - \ - nonstatic_field(ciInstanceKlass, _init_state, InstanceKlass::ClassState) \ - nonstatic_field(ciInstanceKlass, _is_shared, bool) \ - \ - nonstatic_field(ciMethod, _interpreter_invocation_count, int) \ - nonstatic_field(ciMethod, _interpreter_throwout_count, int) \ - nonstatic_field(ciMethod, _inline_instructions_size, int) \ - \ - nonstatic_field(ciMethodData, _data_size, int) \ - nonstatic_field(ciMethodData, _state, u_char) \ - nonstatic_field(ciMethodData, _extra_data_size, int) \ - nonstatic_field(ciMethodData, _data, intptr_t*) \ - nonstatic_field(ciMethodData, _hint_di, int) \ - nonstatic_field(ciMethodData, _eflags, intx) \ - nonstatic_field(ciMethodData, _arg_local, intx) \ - nonstatic_field(ciMethodData, _arg_stack, intx) \ - nonstatic_field(ciMethodData, _arg_returned, intx) \ - nonstatic_field(ciMethodData, _orig, MethodData::CompilerCounters) \ - \ - nonstatic_field(ciField, _holder, ciInstanceKlass*) \ - nonstatic_field(ciField, _name, ciSymbol*) \ - nonstatic_field(ciField, _signature, ciSymbol*) \ - nonstatic_field(ciField, _offset, int) \ - nonstatic_field(ciField, _is_constant, bool) \ - nonstatic_field(ciField, _constant_value, ciConstant) \ - \ - nonstatic_field(ciObjectFactory, _ci_metadata, GrowableArray) \ - nonstatic_field(ciObjectFactory, _symbols, GrowableArray) \ - \ - nonstatic_field(ciConstant, _type, BasicType) \ - nonstatic_field(ciConstant, _value._int, jint) \ - nonstatic_field(ciConstant, _value._long, jlong) \ - nonstatic_field(ciConstant, _value._float, jfloat) \ - nonstatic_field(ciConstant, _value._double, jdouble) \ - nonstatic_field(ciConstant, _value._object, ciObject*) \ - \ /************/ \ /* Monitors */ \ /************/ \ @@ -798,123 +698,6 @@ volatile_nonstatic_field(MonitorList, _head, ObjectMonitor*) \ \ /*********************/ \ - /* Matcher (C2 only) */ \ - /*********************/ \ - \ - unchecked_c2_static_field(Matcher, _regEncode, sizeof(Matcher::_regEncode)) /* NOTE: no type */ \ - \ - c2_nonstatic_field(Node, _in, Node**) \ - c2_nonstatic_field(Node, _out, Node**) \ - c2_nonstatic_field(Node, _cnt, node_idx_t) \ - c2_nonstatic_field(Node, _max, node_idx_t) \ - c2_nonstatic_field(Node, _outcnt, node_idx_t) \ - c2_nonstatic_field(Node, _outmax, node_idx_t) \ - c2_nonstatic_field(Node, _idx, const node_idx_t) \ - c2_nonstatic_field(Node, _class_id, juint) \ - c2_nonstatic_field(Node, _flags, juint) \ - \ - c2_nonstatic_field(Compile, _root, RootNode*) \ - c2_nonstatic_field(Compile, _unique, uint) \ - c2_nonstatic_field(Compile, _entry_bci, int) \ - c2_nonstatic_field(Compile, _top, Node*) \ - c2_nonstatic_field(Compile, _cfg, PhaseCFG*) \ - c2_nonstatic_field(Compile, _regalloc, PhaseRegAlloc*) \ - c2_nonstatic_field(Compile, _method, ciMethod*) \ - c2_nonstatic_field(Compile, _compile_id, const int) \ - c2_nonstatic_field(Compile, _options, const Options) \ - c2_nonstatic_field(Compile, _ilt, InlineTree*) \ - \ - c2_nonstatic_field(Options, _subsume_loads, const bool) \ - c2_nonstatic_field(Options, _do_escape_analysis, const bool) \ - c2_nonstatic_field(Options, _eliminate_boxing, const bool) \ - c2_nonstatic_field(Options, _do_locks_coarsening, const bool) \ - c2_nonstatic_field(Options, _install_code, const bool) \ - \ - c2_nonstatic_field(InlineTree, _caller_jvms, JVMState*) \ - c2_nonstatic_field(InlineTree, _method, ciMethod*) \ - c2_nonstatic_field(InlineTree, _caller_tree, InlineTree*) \ - c2_nonstatic_field(InlineTree, _subtrees, GrowableArray) \ - \ - c2_nonstatic_field(OptoRegPair, _first, short) \ - c2_nonstatic_field(OptoRegPair, _second, short) \ - \ - c2_nonstatic_field(JVMState, _caller, JVMState*) \ - c2_nonstatic_field(JVMState, _depth, uint) \ - c2_nonstatic_field(JVMState, _locoff, uint) \ - c2_nonstatic_field(JVMState, _stkoff, uint) \ - c2_nonstatic_field(JVMState, _monoff, uint) \ - c2_nonstatic_field(JVMState, _scloff, uint) \ - c2_nonstatic_field(JVMState, _endoff, uint) \ - c2_nonstatic_field(JVMState, _sp, uint) \ - c2_nonstatic_field(JVMState, _bci, int) \ - c2_nonstatic_field(JVMState, _method, ciMethod*) \ - c2_nonstatic_field(JVMState, _map, SafePointNode*) \ - \ - c2_nonstatic_field(SafePointNode, _jvms, JVMState* const) \ - \ - c2_nonstatic_field(MachSafePointNode, _jvms, JVMState*) \ - c2_nonstatic_field(MachSafePointNode, _jvmadj, uint) \ - \ - c2_nonstatic_field(MachIfNode, _prob, jfloat) \ - c2_nonstatic_field(MachIfNode, _fcnt, jfloat) \ - \ - c2_nonstatic_field(MachJumpNode, _probs, jfloat*) \ - \ - c2_nonstatic_field(CallNode, _entry_point, address) \ - \ - c2_nonstatic_field(CallJavaNode, _method, ciMethod*) \ - \ - c2_nonstatic_field(CallRuntimeNode, _name, const char*) \ - \ - c2_nonstatic_field(CallStaticJavaNode, _name, const char*) \ - \ - c2_nonstatic_field(MachCallJavaNode, _method, ciMethod*) \ - \ - c2_nonstatic_field(MachCallStaticJavaNode, _name, const char*) \ - \ - c2_nonstatic_field(MachCallRuntimeNode, _name, const char*) \ - \ - c2_nonstatic_field(PhaseCFG, _number_of_blocks, uint) \ - c2_nonstatic_field(PhaseCFG, _blocks, Block_List) \ - c2_nonstatic_field(PhaseCFG, _node_to_block_mapping, Block_Array) \ - c2_nonstatic_field(PhaseCFG, _root_block, Block*) \ - \ - c2_nonstatic_field(PhaseRegAlloc, _node_regs, OptoRegPair*) \ - c2_nonstatic_field(PhaseRegAlloc, _node_regs_max_index, uint) \ - c2_nonstatic_field(PhaseRegAlloc, _framesize, uint) \ - c2_nonstatic_field(PhaseRegAlloc, _max_reg, OptoReg::Name) \ - \ - c2_nonstatic_field(PhaseChaitin, _trip_cnt, int) \ - c2_nonstatic_field(PhaseChaitin, _alternate, int) \ - c2_nonstatic_field(PhaseChaitin, _lo_degree, uint) \ - c2_nonstatic_field(PhaseChaitin, _lo_stk_degree, uint) \ - c2_nonstatic_field(PhaseChaitin, _hi_degree, uint) \ - c2_nonstatic_field(PhaseChaitin, _simplified, uint) \ - \ - c2_nonstatic_field(Block, _nodes, Node_List) \ - c2_nonstatic_field(Block, _succs, Block_Array) \ - c2_nonstatic_field(Block, _num_succs, uint) \ - c2_nonstatic_field(Block, _pre_order, uint) \ - c2_nonstatic_field(Block, _dom_depth, uint) \ - c2_nonstatic_field(Block, _idom, Block*) \ - c2_nonstatic_field(Block, _freq, jdouble) \ - \ - c2_nonstatic_field(CFGElement, _freq, jdouble) \ - \ - c2_nonstatic_field(Block_List, _cnt, uint) \ - \ - c2_nonstatic_field(Block_Array, _size, uint) \ - c2_nonstatic_field(Block_Array, _blocks, Block**) \ - c2_nonstatic_field(Block_Array, _arena, Arena*) \ - \ - c2_nonstatic_field(Node_List, _cnt, uint) \ - \ - c2_nonstatic_field(Node_Array, _max, uint) \ - c2_nonstatic_field(Node_Array, _nodes, Node**) \ - c2_nonstatic_field(Node_Array, _a, Arena*) \ - \ - \ - /*********************/ \ /* -XX flags */ \ /*********************/ \ \ @@ -1063,10 +846,7 @@ declare_toplevel_type, \ declare_oop_type, \ declare_integer_type, \ - declare_unsigned_integer_type, \ - declare_c1_toplevel_type, \ - declare_c2_type, \ - declare_c2_toplevel_type) \ + declare_unsigned_integer_type) \ \ /*************************************************************/ \ /* Java primitive types -- required by the SA implementation */ \ @@ -1325,8 +1105,8 @@ declare_type(UpcallStub, RuntimeBlob) \ declare_type(SafepointBlob, SingletonBlob) \ declare_type(DeoptimizationBlob, SingletonBlob) \ - declare_c2_type(ExceptionBlob, SingletonBlob) \ - declare_c2_type(UncommonTrapBlob, RuntimeBlob) \ + COMPILER2_PRESENT(declare_type(ExceptionBlob, SingletonBlob)) \ + COMPILER2_PRESENT(declare_type(UncommonTrapBlob, RuntimeBlob)) \ \ /***************************************/ \ /* PcDesc and other compiled code info */ \ @@ -1374,12 +1154,6 @@ \ declare_toplevel_type(OopStorage) \ \ - /**********************/ \ - /* Runtime1 (C1 only) */ \ - /**********************/ \ - \ - declare_c1_toplevel_type(Runtime1) \ - \ /************/ \ /* Monitors */ \ /************/ \ @@ -1391,465 +1165,11 @@ declare_toplevel_type(BasicObjectLock) \ \ /*********************/ \ - /* Matcher (C2 only) */ \ - /*********************/ \ - \ - declare_c2_toplevel_type(Matcher) \ - declare_c2_toplevel_type(Compile) \ - declare_c2_toplevel_type(Options) \ - declare_c2_toplevel_type(InlineTree) \ - declare_c2_toplevel_type(OptoRegPair) \ - declare_c2_toplevel_type(JVMState) \ - declare_c2_toplevel_type(Phase) \ - declare_c2_type(PhaseCFG, Phase) \ - declare_c2_type(PhaseRegAlloc, Phase) \ - declare_c2_type(PhaseChaitin, PhaseRegAlloc) \ - declare_c2_toplevel_type(CFGElement) \ - declare_c2_type(Block, CFGElement) \ - declare_c2_toplevel_type(Block_Array) \ - declare_c2_type(Block_List, Block_Array) \ - declare_c2_toplevel_type(Node_Array) \ - declare_c2_type(Node_List, Node_Array) \ - declare_c2_type(Unique_Node_List, Node_List) \ - declare_c2_toplevel_type(Node) \ - declare_c2_type(AddNode, Node) \ - declare_c2_type(AddINode, AddNode) \ - declare_c2_type(AddLNode, AddNode) \ - declare_c2_type(AddFNode, AddNode) \ - declare_c2_type(AddDNode, AddNode) \ - declare_c2_type(AddPNode, Node) \ - declare_c2_type(OrINode, AddNode) \ - declare_c2_type(OrLNode, AddNode) \ - declare_c2_type(XorINode, AddNode) \ - declare_c2_type(XorLNode, AddNode) \ - declare_c2_type(MaxNode, AddNode) \ - declare_c2_type(MaxINode, MaxNode) \ - declare_c2_type(MinINode, MaxNode) \ - declare_c2_type(MaxLNode, MaxNode) \ - declare_c2_type(MinLNode, MaxNode) \ - declare_c2_type(MaxFNode, MaxNode) \ - declare_c2_type(MinFNode, MaxNode) \ - declare_c2_type(MaxDNode, MaxNode) \ - declare_c2_type(MinDNode, MaxNode) \ - declare_c2_type(StartNode, MultiNode) \ - declare_c2_type(StartOSRNode, StartNode) \ - declare_c2_type(ParmNode, ProjNode) \ - declare_c2_type(ReturnNode, Node) \ - declare_c2_type(RethrowNode, Node) \ - declare_c2_type(TailCallNode, ReturnNode) \ - declare_c2_type(TailJumpNode, ReturnNode) \ - declare_c2_type(ForwardExceptionNode, ReturnNode) \ - declare_c2_type(SafePointNode, MultiNode) \ - declare_c2_type(CallNode, SafePointNode) \ - declare_c2_type(CallJavaNode, CallNode) \ - declare_c2_type(CallStaticJavaNode, CallJavaNode) \ - declare_c2_type(CallDynamicJavaNode, CallJavaNode) \ - declare_c2_type(CallRuntimeNode, CallNode) \ - declare_c2_type(CallLeafNode, CallRuntimeNode) \ - declare_c2_type(CallLeafNoFPNode, CallLeafNode) \ - declare_c2_type(CallLeafVectorNode, CallLeafNode) \ - declare_c2_type(AllocateNode, CallNode) \ - declare_c2_type(AllocateArrayNode, AllocateNode) \ - declare_c2_type(LockNode, AbstractLockNode) \ - declare_c2_type(UnlockNode, AbstractLockNode) \ - declare_c2_type(FastLockNode, CmpNode) \ - declare_c2_type(FastUnlockNode, CmpNode) \ - declare_c2_type(RegionNode, Node) \ - declare_c2_type(JProjNode, ProjNode) \ - declare_c2_type(PhiNode, TypeNode) \ - declare_c2_type(GotoNode, Node) \ - declare_c2_type(CProjNode, ProjNode) \ - declare_c2_type(MultiBranchNode, MultiNode) \ - declare_c2_type(IfNode, MultiBranchNode) \ - declare_c2_type(IfTrueNode, CProjNode) \ - declare_c2_type(IfFalseNode, CProjNode) \ - declare_c2_type(PCTableNode, MultiBranchNode) \ - declare_c2_type(JumpNode, PCTableNode) \ - declare_c2_type(JumpProjNode, JProjNode) \ - declare_c2_type(CatchNode, PCTableNode) \ - declare_c2_type(CatchProjNode, CProjNode) \ - declare_c2_type(CreateExNode, TypeNode) \ - declare_c2_type(ClearArrayNode, Node) \ - declare_c2_type(NeverBranchNode, MultiBranchNode) \ - declare_c2_type(ConNode, TypeNode) \ - declare_c2_type(ConINode, ConNode) \ - declare_c2_type(ConPNode, ConNode) \ - declare_c2_type(ConNNode, ConNode) \ - declare_c2_type(ConLNode, ConNode) \ - declare_c2_type(ConFNode, ConNode) \ - declare_c2_type(ConDNode, ConNode) \ - declare_c2_type(BinaryNode, Node) \ - declare_c2_type(CMoveNode, TypeNode) \ - declare_c2_type(CMoveDNode, CMoveNode) \ - declare_c2_type(CMoveFNode, CMoveNode) \ - declare_c2_type(CMoveINode, CMoveNode) \ - declare_c2_type(CMoveLNode, CMoveNode) \ - declare_c2_type(CMovePNode, CMoveNode) \ - declare_c2_type(CMoveNNode, CMoveNode) \ - declare_c2_type(EncodePNode, TypeNode) \ - declare_c2_type(DecodeNNode, TypeNode) \ - declare_c2_type(EncodePKlassNode, TypeNode) \ - declare_c2_type(DecodeNKlassNode, TypeNode) \ - declare_c2_type(ConstraintCastNode, TypeNode) \ - declare_c2_type(CastIINode, ConstraintCastNode) \ - declare_c2_type(CastPPNode, ConstraintCastNode) \ - declare_c2_type(CheckCastPPNode, TypeNode) \ - declare_c2_type(Conv2BNode, Node) \ - declare_c2_type(ConvertNode, TypeNode) \ - declare_c2_type(ConvD2FNode, Node) \ - declare_c2_type(ConvD2INode, Node) \ - declare_c2_type(ConvD2LNode, Node) \ - declare_c2_type(ConvF2DNode, Node) \ - declare_c2_type(ConvF2INode, Node) \ - declare_c2_type(ConvF2LNode, Node) \ - declare_c2_type(ConvI2DNode, Node) \ - declare_c2_type(ConvI2FNode, Node) \ - declare_c2_type(ConvI2LNode, TypeNode) \ - declare_c2_type(ConvL2DNode, Node) \ - declare_c2_type(ConvL2FNode, Node) \ - declare_c2_type(ConvL2INode, Node) \ - declare_c2_type(CastX2PNode, Node) \ - declare_c2_type(CastP2XNode, Node) \ - declare_c2_type(MemBarNode, MultiNode) \ - declare_c2_type(MemBarAcquireNode, MemBarNode) \ - declare_c2_type(MemBarReleaseNode, MemBarNode) \ - declare_c2_type(LoadFenceNode, MemBarNode) \ - declare_c2_type(StoreFenceNode, MemBarNode) \ - declare_c2_type(MemBarVolatileNode, MemBarNode) \ - declare_c2_type(MemBarCPUOrderNode, MemBarNode) \ - declare_c2_type(OnSpinWaitNode, MemBarNode) \ - declare_c2_type(BlackholeNode, MultiNode) \ - declare_c2_type(InitializeNode, MemBarNode) \ - declare_c2_type(ThreadLocalNode, Node) \ - declare_c2_type(Opaque1Node, Node) \ - declare_c2_type(PartialSubtypeCheckNode, Node) \ - declare_c2_type(MoveI2FNode, Node) \ - declare_c2_type(MoveL2DNode, Node) \ - declare_c2_type(MoveF2INode, Node) \ - declare_c2_type(MoveD2LNode, Node) \ - declare_c2_type(DivINode, Node) \ - declare_c2_type(DivLNode, Node) \ - declare_c2_type(DivFNode, Node) \ - declare_c2_type(DivDNode, Node) \ - declare_c2_type(UDivINode, Node) \ - declare_c2_type(UDivLNode, Node) \ - declare_c2_type(ModINode, Node) \ - declare_c2_type(ModLNode, Node) \ - declare_c2_type(ModFNode, Node) \ - declare_c2_type(ModDNode, Node) \ - declare_c2_type(UModINode, Node) \ - declare_c2_type(UModLNode, Node) \ - declare_c2_type(DivModNode, MultiNode) \ - declare_c2_type(DivModINode, DivModNode) \ - declare_c2_type(DivModLNode, DivModNode) \ - declare_c2_type(UDivModINode, DivModNode) \ - declare_c2_type(UDivModLNode, DivModNode) \ - declare_c2_type(BoxLockNode, Node) \ - declare_c2_type(LoopNode, RegionNode) \ - declare_c2_type(CountedLoopNode, LoopNode) \ - declare_c2_type(CountedLoopEndNode, IfNode) \ - declare_c2_type(MachNode, Node) \ - declare_c2_type(MachIdealNode, MachNode) \ - declare_c2_type(MachTypeNode, MachNode) \ - declare_c2_type(MachBreakpointNode, MachIdealNode) \ - declare_c2_type(MachUEPNode, MachIdealNode) \ - declare_c2_type(MachPrologNode, MachIdealNode) \ - declare_c2_type(MachEpilogNode, MachIdealNode) \ - declare_c2_type(MachNopNode, MachIdealNode) \ - declare_c2_type(MachSpillCopyNode, MachIdealNode) \ - declare_c2_type(MachNullCheckNode, MachIdealNode) \ - declare_c2_type(MachProjNode, ProjNode) \ - declare_c2_type(MachIfNode, MachNode) \ - declare_c2_type(MachJumpNode, MachNode) \ - declare_c2_type(MachFastLockNode, MachNode) \ - declare_c2_type(MachReturnNode, MachNode) \ - declare_c2_type(MachSafePointNode, MachReturnNode) \ - declare_c2_type(MachCallNode, MachSafePointNode) \ - declare_c2_type(MachCallJavaNode, MachCallNode) \ - declare_c2_type(MachCallStaticJavaNode, MachCallJavaNode) \ - declare_c2_type(MachCallDynamicJavaNode, MachCallJavaNode) \ - declare_c2_type(MachCallRuntimeNode, MachCallNode) \ - declare_c2_type(MachHaltNode, MachReturnNode) \ - declare_c2_type(MachTempNode, MachNode) \ - declare_c2_type(MemNode, Node) \ - declare_c2_type(MergeMemNode, Node) \ - declare_c2_type(LoadNode, MemNode) \ - declare_c2_type(LoadBNode, LoadNode) \ - declare_c2_type(LoadUSNode, LoadNode) \ - declare_c2_type(LoadINode, LoadNode) \ - declare_c2_type(LoadRangeNode, LoadINode) \ - declare_c2_type(LoadLNode, LoadNode) \ - declare_c2_type(LoadL_unalignedNode, LoadLNode) \ - declare_c2_type(LoadFNode, LoadNode) \ - declare_c2_type(LoadDNode, LoadNode) \ - declare_c2_type(LoadD_unalignedNode, LoadDNode) \ - declare_c2_type(LoadPNode, LoadNode) \ - declare_c2_type(LoadNNode, LoadNode) \ - declare_c2_type(LoadKlassNode, LoadPNode) \ - declare_c2_type(LoadNKlassNode, LoadNNode) \ - declare_c2_type(LoadSNode, LoadNode) \ - declare_c2_type(StoreNode, MemNode) \ - declare_c2_type(StoreBNode, StoreNode) \ - declare_c2_type(StoreCNode, StoreNode) \ - declare_c2_type(StoreINode, StoreNode) \ - declare_c2_type(StoreLNode, StoreNode) \ - declare_c2_type(StoreFNode, StoreNode) \ - declare_c2_type(StoreDNode, StoreNode) \ - declare_c2_type(StorePNode, StoreNode) \ - declare_c2_type(StoreNNode, StoreNode) \ - declare_c2_type(StoreNKlassNode, StoreNode) \ - declare_c2_type(SCMemProjNode, ProjNode) \ - declare_c2_type(LoadStoreNode, Node) \ - declare_c2_type(CompareAndSwapNode, LoadStoreConditionalNode) \ - declare_c2_type(CompareAndSwapBNode, CompareAndSwapNode) \ - declare_c2_type(CompareAndSwapSNode, CompareAndSwapNode) \ - declare_c2_type(CompareAndSwapLNode, CompareAndSwapNode) \ - declare_c2_type(CompareAndSwapINode, CompareAndSwapNode) \ - declare_c2_type(CompareAndSwapPNode, CompareAndSwapNode) \ - declare_c2_type(CompareAndSwapNNode, CompareAndSwapNode) \ - declare_c2_type(WeakCompareAndSwapBNode, CompareAndSwapNode) \ - declare_c2_type(WeakCompareAndSwapSNode, CompareAndSwapNode) \ - declare_c2_type(WeakCompareAndSwapLNode, CompareAndSwapNode) \ - declare_c2_type(WeakCompareAndSwapINode, CompareAndSwapNode) \ - declare_c2_type(WeakCompareAndSwapPNode, CompareAndSwapNode) \ - declare_c2_type(WeakCompareAndSwapNNode, CompareAndSwapNode) \ - declare_c2_type(CompareAndExchangeNode, LoadStoreNode) \ - declare_c2_type(CompareAndExchangeBNode, CompareAndExchangeNode) \ - declare_c2_type(CompareAndExchangeSNode, CompareAndExchangeNode) \ - declare_c2_type(CompareAndExchangeLNode, CompareAndExchangeNode) \ - declare_c2_type(CompareAndExchangeINode, CompareAndExchangeNode) \ - declare_c2_type(CompareAndExchangePNode, CompareAndExchangeNode) \ - declare_c2_type(CompareAndExchangeNNode, CompareAndExchangeNode) \ - declare_c2_type(MulNode, Node) \ - declare_c2_type(MulINode, MulNode) \ - declare_c2_type(MulLNode, MulNode) \ - declare_c2_type(MulFNode, MulNode) \ - declare_c2_type(MulDNode, MulNode) \ - declare_c2_type(MulHiLNode, Node) \ - declare_c2_type(UMulHiLNode, Node) \ - declare_c2_type(AndINode, MulINode) \ - declare_c2_type(AndLNode, MulLNode) \ - declare_c2_type(LShiftINode, Node) \ - declare_c2_type(LShiftLNode, Node) \ - declare_c2_type(RShiftINode, Node) \ - declare_c2_type(RShiftLNode, Node) \ - declare_c2_type(URShiftINode, Node) \ - declare_c2_type(URShiftLNode, Node) \ - declare_c2_type(MultiNode, Node) \ - declare_c2_type(ProjNode, Node) \ - declare_c2_type(TypeNode, Node) \ - declare_c2_type(RootNode, LoopNode) \ - declare_c2_type(HaltNode, Node) \ - declare_c2_type(SubNode, Node) \ - declare_c2_type(SubINode, SubNode) \ - declare_c2_type(SubLNode, SubNode) \ - declare_c2_type(SubFPNode, SubNode) \ - declare_c2_type(SubFNode, SubFPNode) \ - declare_c2_type(SubDNode, SubFPNode) \ - declare_c2_type(CmpNode, SubNode) \ - declare_c2_type(CmpINode, CmpNode) \ - declare_c2_type(CmpUNode, CmpNode) \ - declare_c2_type(CmpU3Node, CmpUNode) \ - declare_c2_type(CmpPNode, CmpNode) \ - declare_c2_type(CmpNNode, CmpNode) \ - declare_c2_type(CmpLNode, CmpNode) \ - declare_c2_type(CmpULNode, CmpNode) \ - declare_c2_type(CmpL3Node, CmpLNode) \ - declare_c2_type(CmpUL3Node, CmpULNode) \ - declare_c2_type(CmpFNode, CmpNode) \ - declare_c2_type(CmpF3Node, CmpFNode) \ - declare_c2_type(CmpDNode, CmpNode) \ - declare_c2_type(CmpD3Node, CmpDNode) \ - declare_c2_type(BoolNode, Node) \ - declare_c2_type(AbsNode, Node) \ - declare_c2_type(AbsINode, AbsNode) \ - declare_c2_type(AbsFNode, AbsNode) \ - declare_c2_type(AbsDNode, AbsNode) \ - declare_c2_type(CmpLTMaskNode, Node) \ - declare_c2_type(NegNode, Node) \ - declare_c2_type(NegINode, NegNode) \ - declare_c2_type(NegLNode, NegNode) \ - declare_c2_type(NegFNode, NegNode) \ - declare_c2_type(NegDNode, NegNode) \ - declare_c2_type(AtanDNode, Node) \ - declare_c2_type(SqrtFNode, Node) \ - declare_c2_type(SqrtDNode, Node) \ - declare_c2_type(ReverseBytesINode, Node) \ - declare_c2_type(ReverseBytesLNode, Node) \ - declare_c2_type(ReductionNode, Node) \ - declare_c2_type(VectorNode, Node) \ - declare_c2_type(AbsVFNode, VectorNode) \ - declare_c2_type(AbsVDNode, VectorNode) \ - declare_c2_type(AbsVBNode, VectorNode) \ - declare_c2_type(AbsVSNode, VectorNode) \ - declare_c2_type(AbsVINode, VectorNode) \ - declare_c2_type(AbsVLNode, VectorNode) \ - declare_c2_type(AddVBNode, VectorNode) \ - declare_c2_type(AddVSNode, VectorNode) \ - declare_c2_type(AddVINode, VectorNode) \ - declare_c2_type(AddReductionVINode, ReductionNode) \ - declare_c2_type(AddVLNode, VectorNode) \ - declare_c2_type(AddReductionVLNode, ReductionNode) \ - declare_c2_type(AddVFNode, VectorNode) \ - declare_c2_type(AddReductionVFNode, ReductionNode) \ - declare_c2_type(AddVDNode, VectorNode) \ - declare_c2_type(AddReductionVDNode, ReductionNode) \ - declare_c2_type(SubVBNode, VectorNode) \ - declare_c2_type(SubVSNode, VectorNode) \ - declare_c2_type(SubVINode, VectorNode) \ - declare_c2_type(SubVLNode, VectorNode) \ - declare_c2_type(SubVFNode, VectorNode) \ - declare_c2_type(SubVDNode, VectorNode) \ - declare_c2_type(MulVBNode, VectorNode) \ - declare_c2_type(MulVSNode, VectorNode) \ - declare_c2_type(MulVLNode, VectorNode) \ - declare_c2_type(MulReductionVLNode, ReductionNode) \ - declare_c2_type(MulVINode, VectorNode) \ - declare_c2_type(MulReductionVINode, ReductionNode) \ - declare_c2_type(MulVFNode, VectorNode) \ - declare_c2_type(MulReductionVFNode, ReductionNode) \ - declare_c2_type(MulVDNode, VectorNode) \ - declare_c2_type(NegVNode, VectorNode) \ - declare_c2_type(NegVINode, NegVNode) \ - declare_c2_type(NegVLNode, NegVNode) \ - declare_c2_type(NegVFNode, NegVNode) \ - declare_c2_type(NegVDNode, NegVNode) \ - declare_c2_type(FmaVDNode, VectorNode) \ - declare_c2_type(FmaVFNode, VectorNode) \ - declare_c2_type(CompressVNode, VectorNode) \ - declare_c2_type(CompressMNode, VectorNode) \ - declare_c2_type(ExpandVNode, VectorNode) \ - declare_c2_type(CompressBitsVNode, VectorNode) \ - declare_c2_type(ExpandBitsVNode, VectorNode) \ - declare_c2_type(MulReductionVDNode, ReductionNode) \ - declare_c2_type(DivVFNode, VectorNode) \ - declare_c2_type(DivVDNode, VectorNode) \ - declare_c2_type(PopCountVINode, VectorNode) \ - declare_c2_type(PopCountVLNode, VectorNode) \ - declare_c2_type(LShiftVBNode, VectorNode) \ - declare_c2_type(LShiftVSNode, VectorNode) \ - declare_c2_type(LShiftVINode, VectorNode) \ - declare_c2_type(LShiftVLNode, VectorNode) \ - declare_c2_type(RShiftVBNode, VectorNode) \ - declare_c2_type(RShiftVSNode, VectorNode) \ - declare_c2_type(RShiftVINode, VectorNode) \ - declare_c2_type(RShiftVLNode, VectorNode) \ - declare_c2_type(URShiftVBNode, VectorNode) \ - declare_c2_type(URShiftVSNode, VectorNode) \ - declare_c2_type(URShiftVINode, VectorNode) \ - declare_c2_type(URShiftVLNode, VectorNode) \ - declare_c2_type(MinReductionVNode, ReductionNode) \ - declare_c2_type(MaxReductionVNode, ReductionNode) \ - declare_c2_type(AndVNode, VectorNode) \ - declare_c2_type(AndReductionVNode, ReductionNode) \ - declare_c2_type(OrVNode, VectorNode) \ - declare_c2_type(OrReductionVNode, ReductionNode) \ - declare_c2_type(XorVNode, VectorNode) \ - declare_c2_type(XorReductionVNode, ReductionNode) \ - declare_c2_type(MaxVNode, VectorNode) \ - declare_c2_type(MinVNode, VectorNode) \ - declare_c2_type(LoadVectorNode, LoadNode) \ - declare_c2_type(StoreVectorNode, StoreNode) \ - declare_c2_type(ReplicateNode, VectorNode) \ - declare_c2_type(PopulateIndexNode, VectorNode) \ - declare_c2_type(PackNode, VectorNode) \ - declare_c2_type(PackBNode, PackNode) \ - declare_c2_type(PackSNode, PackNode) \ - declare_c2_type(PackINode, PackNode) \ - declare_c2_type(PackLNode, PackNode) \ - declare_c2_type(PackFNode, PackNode) \ - declare_c2_type(PackDNode, PackNode) \ - declare_c2_type(Pack2LNode, PackNode) \ - declare_c2_type(Pack2DNode, PackNode) \ - declare_c2_type(ExtractNode, Node) \ - declare_c2_type(ExtractBNode, ExtractNode) \ - declare_c2_type(ExtractUBNode, ExtractNode) \ - declare_c2_type(ExtractCNode, ExtractNode) \ - declare_c2_type(ExtractSNode, ExtractNode) \ - declare_c2_type(ExtractINode, ExtractNode) \ - declare_c2_type(ExtractLNode, ExtractNode) \ - declare_c2_type(ExtractFNode, ExtractNode) \ - declare_c2_type(ExtractDNode, ExtractNode) \ - declare_c2_type(OverflowNode, CmpNode) \ - declare_c2_type(OverflowINode, OverflowNode) \ - declare_c2_type(OverflowAddINode, OverflowINode) \ - declare_c2_type(OverflowSubINode, OverflowINode) \ - declare_c2_type(OverflowMulINode, OverflowINode) \ - declare_c2_type(OverflowLNode, OverflowNode) \ - declare_c2_type(OverflowAddLNode, OverflowLNode) \ - declare_c2_type(OverflowSubLNode, OverflowLNode) \ - declare_c2_type(OverflowMulLNode, OverflowLNode) \ - declare_c2_type(FmaDNode, Node) \ - declare_c2_type(FmaFNode, Node) \ - declare_c2_type(CopySignDNode, Node) \ - declare_c2_type(CopySignFNode, Node) \ - declare_c2_type(SignumDNode, Node) \ - declare_c2_type(SignumFNode, Node) \ - declare_c2_type(IsInfiniteFNode, Node) \ - declare_c2_type(IsInfiniteDNode, Node) \ - declare_c2_type(IsFiniteFNode, Node) \ - declare_c2_type(IsFiniteDNode, Node) \ - declare_c2_type(LoadVectorGatherNode, LoadVectorNode) \ - declare_c2_type(StoreVectorScatterNode, StoreVectorNode) \ - declare_c2_type(VectorLoadMaskNode, VectorNode) \ - declare_c2_type(VectorLoadShuffleNode, VectorNode) \ - declare_c2_type(VectorStoreMaskNode, VectorNode) \ - declare_c2_type(VectorBlendNode, VectorNode) \ - declare_c2_type(VectorRearrangeNode, VectorNode) \ - declare_c2_type(VectorMaskWrapperNode, VectorNode) \ - declare_c2_type(VectorMaskCmpNode, VectorNode) \ - declare_c2_type(VectorCastB2XNode, VectorNode) \ - declare_c2_type(VectorCastS2XNode, VectorNode) \ - declare_c2_type(VectorCastI2XNode, VectorNode) \ - declare_c2_type(VectorCastL2XNode, VectorNode) \ - declare_c2_type(VectorCastF2XNode, VectorNode) \ - declare_c2_type(VectorCastD2XNode, VectorNode) \ - declare_c2_type(VectorUCastB2XNode, VectorNode) \ - declare_c2_type(VectorUCastS2XNode, VectorNode) \ - declare_c2_type(VectorUCastI2XNode, VectorNode) \ - declare_c2_type(VectorInsertNode, VectorNode) \ - declare_c2_type(VectorUnboxNode, VectorNode) \ - declare_c2_type(VectorReinterpretNode, VectorNode) \ - declare_c2_type(VectorMaskCastNode, VectorNode) \ - declare_c2_type(CountLeadingZerosVNode, VectorNode) \ - declare_c2_type(CountTrailingZerosVNode, VectorNode) \ - declare_c2_type(ReverseBytesVNode, VectorNode) \ - declare_c2_type(ReverseVNode, VectorNode) \ - declare_c2_type(MaskAllNode, VectorNode) \ - declare_c2_type(AndVMaskNode, VectorNode) \ - declare_c2_type(OrVMaskNode, VectorNode) \ - declare_c2_type(XorVMaskNode, VectorNode) \ - declare_c2_type(VectorBoxNode, Node) \ - declare_c2_type(VectorBoxAllocateNode, CallStaticJavaNode) \ - declare_c2_type(VectorTestNode, CmpNode) \ - \ - /*********************/ \ /* Adapter Blob Entries */ \ /*********************/ \ declare_toplevel_type(AdapterHandlerEntry) \ declare_toplevel_type(AdapterHandlerEntry*) \ \ - /*********************/ \ - /* CI */ \ - /*********************/ \ - declare_toplevel_type(ciEnv) \ - declare_toplevel_type(ciObjectFactory) \ - declare_toplevel_type(ciConstant) \ - declare_toplevel_type(ciField) \ - declare_toplevel_type(ciSymbol) \ - declare_toplevel_type(ciBaseObject) \ - declare_type(ciObject, ciBaseObject) \ - declare_type(ciInstance, ciObject) \ - declare_type(ciMetadata, ciBaseObject) \ - declare_type(ciMethod, ciMetadata) \ - declare_type(ciMethodData, ciMetadata) \ - declare_type(ciType, ciMetadata) \ - declare_type(ciKlass, ciType) \ - declare_type(ciInstanceKlass, ciKlass) \ - declare_type(ciArrayKlass, ciKlass) \ - declare_type(ciTypeArrayKlass, ciArrayKlass) \ - declare_type(ciObjArrayKlass, ciArrayKlass) \ - \ /********************/ \ /* -XX flags */ \ /********************/ \ @@ -1894,7 +1214,6 @@ declare_integer_type(Location::Type) \ declare_integer_type(Location::Where) \ declare_integer_type(JVMFlag::Flags) \ - COMPILER2_PRESENT(declare_integer_type(OptoReg::Name)) \ \ declare_toplevel_type(CHeapObj) \ declare_type(Array, MetaspaceObj) \ @@ -1946,7 +1265,6 @@ declare_toplevel_type(Mutex) \ declare_toplevel_type(Mutex*) \ declare_toplevel_type(nmethod*) \ - COMPILER2_PRESENT(declare_unsigned_integer_type(node_idx_t)) \ declare_toplevel_type(ObjectMonitor*) \ declare_toplevel_type(oop*) \ declare_toplevel_type(OopMapCache*) \ @@ -1986,10 +1304,7 @@ #define VM_INT_CONSTANTS(declare_constant, \ declare_constant_with_value, \ - declare_preprocessor_constant, \ - declare_c1_constant, \ - declare_c2_constant, \ - declare_c2_preprocessor_constant) \ + declare_preprocessor_constant) \ \ /****************/ \ /* GC constants */ \ @@ -2003,6 +1318,7 @@ /******************/ \ \ declare_preprocessor_constant("ASSERT", DEBUG_ONLY(1) NOT_DEBUG(0)) \ + declare_preprocessor_constant("COMPILER2", COMPILER2_PRESENT(1) NOT_COMPILER2(0)) \ \ /****************/ \ /* Object sizes */ \ @@ -2352,12 +1668,6 @@ declare_constant(LM_LEGACY) \ declare_constant(LM_LIGHTWEIGHT) \ \ - /*********************/ \ - /* Matcher (C2 only) */ \ - /*********************/ \ - \ - declare_c2_preprocessor_constant("Matcher::interpreter_frame_pointer_reg", Matcher::interpreter_frame_pointer_reg()) \ - \ /*********************************************/ \ /* MethodCompilation (globalDefinitions.hpp) */ \ /*********************************************/ \ @@ -2457,8 +1767,8 @@ \ declare_constant(ConcreteRegisterImpl::number_of_registers) \ declare_preprocessor_constant("REG_COUNT", REG_COUNT) \ - declare_c2_preprocessor_constant("SAVED_ON_ENTRY_REG_COUNT", SAVED_ON_ENTRY_REG_COUNT) \ - declare_c2_preprocessor_constant("C_SAVED_ON_ENTRY_REG_COUNT", C_SAVED_ON_ENTRY_REG_COUNT) \ + COMPILER2_PRESENT(declare_preprocessor_constant("SAVED_ON_ENTRY_REG_COUNT", SAVED_ON_ENTRY_REG_COUNT)) \ + COMPILER2_PRESENT(declare_preprocessor_constant("C_SAVED_ON_ENTRY_REG_COUNT", C_SAVED_ON_ENTRY_REG_COUNT)) \ \ /************/ \ /* PerfData */ \ @@ -2509,7 +1819,7 @@ // enums, etc., while "declare_preprocessor_constant" must be used for // all #defined constants. -#define VM_LONG_CONSTANTS(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \ +#define VM_LONG_CONSTANTS(declare_constant, declare_preprocessor_constant) \ \ /****************/ \ /* GC constants */ \ @@ -2575,108 +1885,6 @@ # define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c) #endif /* PRODUCT */ -// Generate and check a nonstatic field in C1 builds -#ifdef COMPILER1 -# define GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) -# define CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) -# define ENSURE_C1_FIELD_TYPE_PRESENT(a, b, c) ENSURE_FIELD_TYPE_PRESENT(a, b, c) -#else -# define GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) -# define CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) -# define ENSURE_C1_FIELD_TYPE_PRESENT(a, b, c) -#endif /* COMPILER1 */ -// Generate and check a nonstatic field in C2 builds -#ifdef COMPILER2 -# define GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) -# define CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) -# define ENSURE_C2_FIELD_TYPE_PRESENT(a, b, c) ENSURE_FIELD_TYPE_PRESENT(a, b, c) -#else -# define GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) -# define CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) -# define ENSURE_C2_FIELD_TYPE_PRESENT(a, b, c) -#endif /* COMPILER2 */ - -// Generate but do not check a static field in C1 builds -#ifdef COMPILER1 -# define GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) -#else -# define GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) -#endif /* COMPILER1 */ - -// Generate but do not check a static field in C2 builds -#ifdef COMPILER2 -# define GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) -#else -# define GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) -#endif /* COMPILER2 */ - -//-------------------------------------------------------------------------------- -// VMTypeEntry build-specific macros -// - -#ifdef COMPILER1 -# define GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY(a) GENERATE_TOPLEVEL_VM_TYPE_ENTRY(a) -# define CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY(a) -#else -# define GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY(a) -# define CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY(a) -#endif /* COMPILER1 */ - -#ifdef COMPILER2 -# define GENERATE_C2_VM_TYPE_ENTRY(a, b) GENERATE_VM_TYPE_ENTRY(a, b) -# define CHECK_C2_VM_TYPE_ENTRY(a, b) CHECK_VM_TYPE_ENTRY(a, b) -# define GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY(a) GENERATE_TOPLEVEL_VM_TYPE_ENTRY(a) -# define CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY(a) -#else -# define GENERATE_C2_VM_TYPE_ENTRY(a, b) -# define CHECK_C2_VM_TYPE_ENTRY(a, b) -# define GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY(a) -# define CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY(a) -#endif /* COMPILER2 */ - - -//-------------------------------------------------------------------------------- -// VMIntConstantEntry build-specific macros -// - -// Generate an int constant for a C1 build -#ifdef COMPILER1 -# define GENERATE_C1_VM_INT_CONSTANT_ENTRY(name) GENERATE_VM_INT_CONSTANT_ENTRY(name) -#else -# define GENERATE_C1_VM_INT_CONSTANT_ENTRY(name) -#endif /* COMPILER1 */ - -// Generate an int constant for a C2 build -#ifdef COMPILER2 -# define GENERATE_C2_VM_INT_CONSTANT_ENTRY(name) GENERATE_VM_INT_CONSTANT_ENTRY(name) -# define GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) -#else -# define GENERATE_C2_VM_INT_CONSTANT_ENTRY(name) -# define GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) -#endif /* COMPILER1 */ - - -//-------------------------------------------------------------------------------- -// VMLongConstantEntry build-specific macros -// - -// Generate a long constant for a C1 build -#ifdef COMPILER1 -# define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name) GENERATE_VM_LONG_CONSTANT_ENTRY(name) -#else -# define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name) -#endif /* COMPILER1 */ - -// Generate a long constant for a C2 build -#ifdef COMPILER2 -# define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name) GENERATE_VM_LONG_CONSTANT_ENTRY(name) -# define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) -#else -# define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name) -# define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) -#endif /* COMPILER1 */ - - // // Instantiation of VMStructEntries, VMTypeEntries and VMIntConstantEntries // @@ -2690,39 +1898,26 @@ VMStructEntry VMStructs::localHotSpotVMStructs[] = { GENERATE_VOLATILE_STATIC_VM_STRUCT_ENTRY, GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY, GENERATE_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY, - GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY) + GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY) VM_STRUCTS_OS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, GENERATE_STATIC_VM_STRUCT_ENTRY, GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY, GENERATE_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY, - GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY) + GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY) VM_STRUCTS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, GENERATE_STATIC_VM_STRUCT_ENTRY, GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY, GENERATE_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY, - GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY) + GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY) VM_STRUCTS_OS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, GENERATE_STATIC_VM_STRUCT_ENTRY, GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY, GENERATE_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY, - GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY, - GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY) + GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY) GENERATE_VM_STRUCT_LAST_ENTRY() }; @@ -2737,38 +1932,25 @@ VMTypeEntry VMStructs::localHotSpotVMTypes[] = { GENERATE_TOPLEVEL_VM_TYPE_ENTRY, GENERATE_OOP_VM_TYPE_ENTRY, GENERATE_INTEGER_VM_TYPE_ENTRY, - GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY, - GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY, - GENERATE_C2_VM_TYPE_ENTRY, - GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY) - + GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY) VM_TYPES_OS(GENERATE_VM_TYPE_ENTRY, GENERATE_TOPLEVEL_VM_TYPE_ENTRY, GENERATE_OOP_VM_TYPE_ENTRY, GENERATE_INTEGER_VM_TYPE_ENTRY, - GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY, - GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY, - GENERATE_C2_VM_TYPE_ENTRY, - GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY) + GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY) VM_TYPES_CPU(GENERATE_VM_TYPE_ENTRY, GENERATE_TOPLEVEL_VM_TYPE_ENTRY, GENERATE_OOP_VM_TYPE_ENTRY, GENERATE_INTEGER_VM_TYPE_ENTRY, - GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY, - GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY, - GENERATE_C2_VM_TYPE_ENTRY, - GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY) + GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY) VM_TYPES_OS_CPU(GENERATE_VM_TYPE_ENTRY, GENERATE_TOPLEVEL_VM_TYPE_ENTRY, GENERATE_OOP_VM_TYPE_ENTRY, GENERATE_INTEGER_VM_TYPE_ENTRY, - GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY, - GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY, - GENERATE_C2_VM_TYPE_ENTRY, - GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY) + GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY) GENERATE_VM_TYPE_LAST_ENTRY() }; @@ -2781,28 +1963,16 @@ VMIntConstantEntry VMStructs::localHotSpotVMIntConstants[] = { VM_INT_CONSTANTS(GENERATE_VM_INT_CONSTANT_ENTRY, GENERATE_VM_INT_CONSTANT_WITH_VALUE_ENTRY, - GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY, - GENERATE_C1_VM_INT_CONSTANT_ENTRY, - GENERATE_C2_VM_INT_CONSTANT_ENTRY, - GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY) + GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY) VM_INT_CONSTANTS_OS(GENERATE_VM_INT_CONSTANT_ENTRY, - GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY, - GENERATE_C1_VM_INT_CONSTANT_ENTRY, - GENERATE_C2_VM_INT_CONSTANT_ENTRY, - GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY) + GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY) VM_INT_CONSTANTS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY, - GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY, - GENERATE_C1_VM_INT_CONSTANT_ENTRY, - GENERATE_C2_VM_INT_CONSTANT_ENTRY, - GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY) + GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY) VM_INT_CONSTANTS_OS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY, - GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY, - GENERATE_C1_VM_INT_CONSTANT_ENTRY, - GENERATE_C2_VM_INT_CONSTANT_ENTRY, - GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY) + GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY) #ifdef VM_INT_CPU_FEATURE_CONSTANTS VM_INT_CPU_FEATURE_CONSTANTS #endif @@ -2817,28 +1987,16 @@ size_t VMStructs::localHotSpotVMIntConstantsLength() { VMLongConstantEntry VMStructs::localHotSpotVMLongConstants[] = { VM_LONG_CONSTANTS(GENERATE_VM_LONG_CONSTANT_ENTRY, - GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY, - GENERATE_C1_VM_LONG_CONSTANT_ENTRY, - GENERATE_C2_VM_LONG_CONSTANT_ENTRY, - GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY) + GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY) VM_LONG_CONSTANTS_OS(GENERATE_VM_LONG_CONSTANT_ENTRY, - GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY, - GENERATE_C1_VM_LONG_CONSTANT_ENTRY, - GENERATE_C2_VM_LONG_CONSTANT_ENTRY, - GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY) + GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY) VM_LONG_CONSTANTS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY, - GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY, - GENERATE_C1_VM_LONG_CONSTANT_ENTRY, - GENERATE_C2_VM_LONG_CONSTANT_ENTRY, - GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY) + GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY) VM_LONG_CONSTANTS_OS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY, - GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY, - GENERATE_C1_VM_LONG_CONSTANT_ENTRY, - GENERATE_C2_VM_LONG_CONSTANT_ENTRY, - GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY) + GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY) #ifdef VM_LONG_CPU_FEATURE_CONSTANTS VM_LONG_CPU_FEATURE_CONSTANTS #endif @@ -2892,58 +2050,38 @@ void VMStructs::init() { CHECK_VOLATILE_STATIC_VM_STRUCT_ENTRY, CHECK_NO_OP, CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY, - CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, - CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY, - CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY, - CHECK_NO_OP, - CHECK_NO_OP); - + CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY) VM_STRUCTS_CPU(CHECK_NONSTATIC_VM_STRUCT_ENTRY, CHECK_STATIC_VM_STRUCT_ENTRY, CHECK_NO_OP, CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY, - CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, - CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY, - CHECK_NO_OP, - CHECK_NO_OP); + CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY) VM_STRUCTS_OS_CPU(CHECK_NONSTATIC_VM_STRUCT_ENTRY, CHECK_STATIC_VM_STRUCT_ENTRY, CHECK_NO_OP, CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY, - CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, - CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY, - CHECK_NO_OP, - CHECK_NO_OP); + CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY) VM_TYPES(CHECK_VM_TYPE_ENTRY, CHECK_SINGLE_ARG_VM_TYPE_NO_OP, CHECK_SINGLE_ARG_VM_TYPE_NO_OP, CHECK_SINGLE_ARG_VM_TYPE_NO_OP, - CHECK_SINGLE_ARG_VM_TYPE_NO_OP, - CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY, - CHECK_C2_VM_TYPE_ENTRY, - CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY); + CHECK_SINGLE_ARG_VM_TYPE_NO_OP) VM_TYPES_CPU(CHECK_VM_TYPE_ENTRY, CHECK_SINGLE_ARG_VM_TYPE_NO_OP, CHECK_SINGLE_ARG_VM_TYPE_NO_OP, CHECK_SINGLE_ARG_VM_TYPE_NO_OP, - CHECK_SINGLE_ARG_VM_TYPE_NO_OP, - CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY, - CHECK_C2_VM_TYPE_ENTRY, - CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY); + CHECK_SINGLE_ARG_VM_TYPE_NO_OP) VM_TYPES_OS_CPU(CHECK_VM_TYPE_ENTRY, CHECK_SINGLE_ARG_VM_TYPE_NO_OP, CHECK_SINGLE_ARG_VM_TYPE_NO_OP, CHECK_SINGLE_ARG_VM_TYPE_NO_OP, - CHECK_SINGLE_ARG_VM_TYPE_NO_OP, - CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY, - CHECK_C2_VM_TYPE_ENTRY, - CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY); + CHECK_SINGLE_ARG_VM_TYPE_NO_OP) // // Split VM_STRUCTS() invocation into two parts to allow MS VC++ 6.0 @@ -2967,39 +2105,26 @@ void VMStructs::init() { CHECK_NO_OP, CHECK_NO_OP, CHECK_NO_OP, - CHECK_NO_OP, - CHECK_NO_OP, - CHECK_NO_OP, - CHECK_NO_OP, - CHECK_NO_OP); + CHECK_NO_OP) VM_STRUCTS(CHECK_NO_OP, ENSURE_FIELD_TYPE_PRESENT, ENSURE_FIELD_TYPE_PRESENT, CHECK_NO_OP, ENSURE_FIELD_TYPE_PRESENT, - ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT, - ENSURE_C1_FIELD_TYPE_PRESENT, - ENSURE_C2_FIELD_TYPE_PRESENT, - CHECK_NO_OP, - CHECK_NO_OP); + ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT) VM_STRUCTS_CPU(ENSURE_FIELD_TYPE_PRESENT, ENSURE_FIELD_TYPE_PRESENT, CHECK_NO_OP, ENSURE_FIELD_TYPE_PRESENT, - ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT, - ENSURE_C2_FIELD_TYPE_PRESENT, - CHECK_NO_OP, - CHECK_NO_OP); + ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT) + VM_STRUCTS_OS_CPU(ENSURE_FIELD_TYPE_PRESENT, ENSURE_FIELD_TYPE_PRESENT, CHECK_NO_OP, ENSURE_FIELD_TYPE_PRESENT, - ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT, - ENSURE_C2_FIELD_TYPE_PRESENT, - CHECK_NO_OP, - CHECK_NO_OP); + ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT) #endif // !_WINDOWS } diff --git a/src/jdk.hotspot.agent/doc/cireplay.html b/src/jdk.hotspot.agent/doc/cireplay.html deleted file mode 100644 index 71da428e58e..00000000000 --- a/src/jdk.hotspot.agent/doc/cireplay.html +++ /dev/null @@ -1,41 +0,0 @@ - - - -Replay - - - - -

Compiler replay

-

-The compiler replay is a function to repeat the compiling process from a crashed java process in compiled method
-This function only exists in debug version of VM -

-

Usage

-
-First, use SA to attach to the core file, if succeeded, do
-       hsdb> dumpreplaydata <address> | -a | <thread_id> [> replay.txt]
-       create file replay.txt, address is address of Method, or nmethod(CodeBlob)
-       hsdb> buildreplayjars [all | boot | app]
-       create files:
-         all:
-           app.jar, boot.jar
-         boot:
-           boot.jar
-         app:
-           app.jar
-       exit SA now.
-Second, use the obtained replay text file, replay.txt and jar files, app.jar and boot.jar, using debug version of java
-       java -Xbootclasspath/p:boot.jar -cp app.jar -XX:ReplayDataFile=<datafile> -XX:+ReplayCompiles ....
-       This will replay the compiling process.
-
-       With ReplayCompiles, the replay will recompile all the methods in app.jar, and in boot.jar to emulate the process in java app.
-
-notes:
-       1) Most time, we don't need the boot.jar which is the classes loaded from JDK. It will be only modified when an agent(JVMDI) is running and modifies the classes.
-       2) If encounter error as "<flag>" not found, that means the SA is using a VMStructs which is different from the one with corefile. In this case, SA has a utility tool vmstructsdump which is located at agent/src/os/<os>/proc/<os_platform>
-
-       Use this tool to dump VM type library:
-       vmstructsdump libjvm.so > <type_name>.db
-
-       set env SA_TYPEDB=<type_name>.db (refer different shell for set envs)
diff --git a/src/jdk.hotspot.agent/doc/clhsdb.html b/src/jdk.hotspot.agent/doc/clhsdb.html
index 69fd228a52e..a225530774f 100644
--- a/src/jdk.hotspot.agent/doc/clhsdb.html
+++ b/src/jdk.hotspot.agent/doc/clhsdb.html
@@ -38,9 +38,6 @@ Available commands:
   dumpclass { address | name } [ directory ] dump .class file for given Klass* or class name
   dumpcodecache dump codecache contents
   dumpheap [ file ] dump heap in hprof binary format
-  dumpideal -a | id dump ideal graph like debug flag -XX:+PrintIdeal
-  dumpilt -a | id dump inline tree for C2 compilation
-  dumpreplaydata <address> | -a | <thread_id> [>replay.txt] dump replay data into a file
   echo [ true | false ] turn on/off command echo mode
   examine { address[/count] | address,address } show contents of memory range
   field [ type [ name fieldtype isStatic offset address ] ] print info about a field of HotSpot type
@@ -84,11 +81,5 @@ Available commands:
 
 
-

Compilation Replay

-

-When a java process crashes in compiled method, usually a core file is saved. -The replay function can reproduce the compiling process in the core. -cireplay.html - diff --git a/src/jdk.hotspot.agent/doc/index.html b/src/jdk.hotspot.agent/doc/index.html index 2e3ba38e4b8..0ce8cd45970 100644 --- a/src/jdk.hotspot.agent/doc/index.html +++ b/src/jdk.hotspot.agent/doc/index.html @@ -40,12 +40,6 @@ More details on the command line interface can be found in the "jhsdb" man page

-

Compilation Replay

-

-When a java process crashes in a compiled method, usually a core file is saved. -The compiler replay function can reproduce the compiling process in the core. -See cireplay.html -

Debugging transported core dumps

When a core dump is moved from the machine where it was produced to a diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/CommandProcessor.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/CommandProcessor.java index 79709cce132..01b9a4a447e 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/CommandProcessor.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/CommandProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, 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 @@ -44,7 +44,6 @@ import java.util.Objects; import java.util.regex.Matcher; import java.util.regex.Pattern; -import sun.jvm.hotspot.ci.ciEnv; import sun.jvm.hotspot.code.CodeBlob; import sun.jvm.hotspot.code.CodeCacheVisitor; import sun.jvm.hotspot.code.NMethod; @@ -66,8 +65,6 @@ import sun.jvm.hotspot.oops.Oop; import sun.jvm.hotspot.oops.RawHeapVisitor; import sun.jvm.hotspot.oops.Symbol; import sun.jvm.hotspot.oops.UnknownOopException; -import sun.jvm.hotspot.opto.Compile; -import sun.jvm.hotspot.opto.InlineTree; import sun.jvm.hotspot.runtime.CompiledVFrame; import sun.jvm.hotspot.runtime.CompilerThread; import sun.jvm.hotspot.runtime.JavaThread; @@ -562,57 +559,6 @@ public class CommandProcessor { } } }, - new Command("dumpreplaydata", "dumpreplaydata {

| -a | }", false) { - // This is used to dump replay data from ciInstanceKlass, ciMethodData etc - // default file name is replay.txt, also if java crashes in compiler - // thread, this file will be dumped in error processing. - public void doit(Tokens t) { - if (t.countTokens() != 1) { - usage(); - return; - } - String name = t.nextToken(); - Address a = null; - try { - a = VM.getVM().getDebugger().parseAddress(name); - } catch (NumberFormatException e) { } - if (a != null) { - // only nmethod, Method, MethodData and InstanceKlass needed to - // dump replay data - - CodeBlob cb = VM.getVM().getCodeCache().findBlob(a); - if (cb instanceof NMethod nMethod) { - nMethod.dumpReplayData(out); - return; - } - // assume it is Metadata - Metadata meta = Metadata.instantiateWrapperFor(a); - if (meta != null) { - meta.dumpReplayData(out); - } else { - usage(); - return; - } - } - // Not an address - boolean all = name.equals("-a"); - Threads threads = VM.getVM().getThreads(); - for (int i = 0; i < threads.getNumberOfThreads(); i++) { - JavaThread thread = threads.getJavaThreadAt(i); - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - thread.printThreadIDOn(new PrintStream(bos)); - if (all || bos.toString().equals(name)) { - if (thread instanceof CompilerThread) { - CompilerThread ct = (CompilerThread)thread; - ciEnv env = ct.env(); - if (env != null) { - env.dumpReplayData(out); - } - } - } - } - } - }, new Command("buildreplayjars", "buildreplayjars [ all | app | boot ] | [ prefix ]", false) { // This is used to dump jar files of all the classes // loaded in the core. Everything with null classloader @@ -973,94 +919,6 @@ public class CommandProcessor { } } }, - new Command("dumpideal", "dumpideal { -a | id }", false) { - // Do a full dump of the nodes reachable from root in each compiler thread. - public void doit(Tokens t) { - if (t.countTokens() != 1) { - usage(); - } else { - String name = t.nextToken(); - boolean all = name.equals("-a"); - Threads threads = VM.getVM().getThreads(); - for (int i = 0; i < threads.getNumberOfThreads(); i++) { - JavaThread thread = threads.getJavaThreadAt(i); - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - thread.printThreadIDOn(new PrintStream(bos)); - if (all || bos.toString().equals(name)) { - if (thread instanceof CompilerThread) { - CompilerThread ct = (CompilerThread)thread; - out.println(ct); - ciEnv env = ct.env(); - if (env != null) { - Compile c = env.compilerData(); - c.root().dump(9999, out); - } else { - out.println(" not compiling"); - } - } - } - } - } - } - }, - new Command("dumpcfg", "dumpcfg { -a | id }", false) { - // Dump the PhaseCFG for every compiler thread that has one live. - public void doit(Tokens t) { - if (t.countTokens() != 1) { - usage(); - } else { - String name = t.nextToken(); - boolean all = name.equals("-a"); - Threads threads = VM.getVM().getThreads(); - for (int i = 0; i < threads.getNumberOfThreads(); i++) { - JavaThread thread = threads.getJavaThreadAt(i); - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - thread.printThreadIDOn(new PrintStream(bos)); - if (all || bos.toString().equals(name)) { - if (thread instanceof CompilerThread) { - CompilerThread ct = (CompilerThread)thread; - out.println(ct); - ciEnv env = ct.env(); - if (env != null) { - Compile c = env.compilerData(); - c.cfg().dump(out); - } - } - } - } - } - } - }, - new Command("dumpilt", "dumpilt { -a | id }", false) { - // dumps the InlineTree of a C2 compile - public void doit(Tokens t) { - if (t.countTokens() != 1) { - usage(); - } else { - String name = t.nextToken(); - boolean all = name.equals("-a"); - Threads threads = VM.getVM().getThreads(); - for (int i = 0; i < threads.getNumberOfThreads(); i++) { - JavaThread thread = threads.getJavaThreadAt(i); - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - thread.printThreadIDOn(new PrintStream(bos)); - if (all || bos.toString().equals(name)) { - if (thread instanceof CompilerThread) { - CompilerThread ct = (CompilerThread)thread; - ciEnv env = ct.env(); - if (env != null) { - Compile c = env.compilerData(); - InlineTree ilt = c.ilt(); - if (ilt != null) { - ilt.print(out); - } - } - } - } - } - } - } - }, new Command("vmstructsdump", "vmstructsdump", false) { public void doit(Tokens t) { if (t.countTokens() != 0) { diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/c1/Runtime1.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/c1/Runtime1.java deleted file mode 100644 index b26e42ebfdf..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/c1/Runtime1.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2000, 2025, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.c1; - -import java.util.*; -import sun.jvm.hotspot.code.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -/** Currently a minimal port to get C1 frame traversal working */ - -public class Runtime1 { - private static Field blobsField; - - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) { - Type type = db.lookupType("Runtime1"); - - blobsField = type.getField("_blobs"); - } - - public Runtime1() { - } - - /** FIXME: consider making argument "type-safe" in Java port */ - public Address entryFor(int id) { - return blobFor(id).codeBegin(); - } - - /** FIXME: consider making argument "type-safe" in Java port */ - public CodeBlob blobFor(int id) { - Address blobAddr = blobsField.getStaticFieldAddress().getAddressAt(id * VM.getVM().getAddressSize()); - return VM.getVM().getCodeCache().createCodeBlobWrapper(blobAddr, blobAddr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciArrayKlass.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciArrayKlass.java deleted file mode 100644 index c0421c39b25..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciArrayKlass.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.io.PrintStream; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciArrayKlass extends ciKlass { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciArrayKlass"); - dimensionField = new IntField(type.getJIntField("_dimension"), 0); - } - - private static IntField dimensionField; - - public ciArrayKlass(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciBaseObject.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciBaseObject.java deleted file mode 100644 index c3de39a705a..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciBaseObject.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2012, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.io.*; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciBaseObject extends VMObject { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciBaseObject"); - identField = new CIntField(type.getCIntegerField("_ident"), 0); - } - - private static CIntField identField; - - public ciBaseObject(Address addr) { - super(addr); - } - - public void dumpReplayData(PrintStream out) { - out.println("# Unknown ci type " + getAddress().getAddressAt(0)); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciConstant.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciConstant.java deleted file mode 100644 index 24029bdd031..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciConstant.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.io.PrintStream; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciConstant extends VMObject { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciConstant"); - valueObjectField = type.getAddressField("_value._object"); - valueDoubleField = type.getJDoubleField("_value._double"); - valueFloatField = type.getJFloatField("_value._float"); - valueLongField = type.getJLongField("_value._long"); - valueIntField = type.getJIntField("_value._int"); - typeField = new CIntField(type.getCIntegerField("_type"), 0); - } - - private static AddressField valueObjectField; - private static JDoubleField valueDoubleField; - private static JFloatField valueFloatField; - private static JLongField valueLongField; - private static JIntField valueIntField; - private static CIntField typeField; - - public ciConstant(Address addr) { - super(addr); - } - - public void dumpReplayData(PrintStream out) { - // Nothing to be done - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciEnv.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciEnv.java deleted file mode 100644 index 9e5aa030046..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciEnv.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.io.PrintStream; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.opto.*; -import sun.jvm.hotspot.compiler.CompileTask; -import sun.jvm.hotspot.prims.JvmtiExport; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.GrowableArray; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciEnv extends VMObject { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciEnv"); - dependenciesField = type.getAddressField("_dependencies"); - factoryField = type.getAddressField("_factory"); - compilerDataField = type.getAddressField("_compiler_data"); - taskField = type.getAddressField("_task"); - } - - private static AddressField dependenciesField; - private static AddressField factoryField; - private static AddressField compilerDataField; - private static AddressField taskField; - - public ciEnv(Address addr) { - super(addr); - } - - public Compile compilerData() { - Address addr = compilerDataField.getValue(this.getAddress()); - if (addr == null) { - return null; - } - return new Compile(addr); - } - - public ciObjectFactory factory() { - return new ciObjectFactory(factoryField.getValue(this.getAddress())); - } - - public CompileTask task() { - return new CompileTask(taskField.getValue(this.getAddress())); - } - - public void dumpReplayData(PrintStream out) { - out.println("JvmtiExport can_access_local_variables " + - (JvmtiExport.canAccessLocalVariables() ? '1' : '0')); - out.println("JvmtiExport can_hotswap_or_post_breakpoint " + - (JvmtiExport.canHotswapOrPostBreakpoint() ? '1' : '0')); - out.println("JvmtiExport can_post_on_exceptions " + - (JvmtiExport.canPostOnExceptions() ? '1' : '0')); - - GrowableArray objects = factory().objects(); - out.println("# " + objects.length() + " ciObject found"); - for (int i = 0; i < objects.length(); i++) { - ciMetadata o = objects.at(i); - out.println("# ciMetadata" + i + " @ " + o); - o.dumpReplayData(out); - } - CompileTask task = task(); - Method method = task.method(); - int entryBci = task.osrBci(); - int compLevel = task.compLevel(); - out.print("compile " + method.nameAsAscii() + " " + - entryBci + " " + compLevel); - Compile compiler = compilerData(); - if (compiler != null) { - // Dump inlining data. - compiler.dumpInlineData(out); - } - out.println(); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciField.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciField.java deleted file mode 100644 index 9c96e20c0ad..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciField.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciField extends VMObject { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciField"); - constantValueField = type.getAddressField("_constant_value"); - isConstantField = type.getAddressField("_is_constant"); - offsetField = new CIntField(type.getCIntegerField("_offset"), 0); - signatureField = type.getAddressField("_signature"); - nameField = type.getAddressField("_name"); - holderField = type.getAddressField("_holder"); - } - - private static AddressField constantValueField; - private static AddressField isConstantField; - private static CIntField offsetField; - private static AddressField signatureField; - private static AddressField nameField; - private static AddressField holderField; - - public ciField(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciInstance.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciInstance.java deleted file mode 100644 index dcf69cacdbb..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciInstance.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.io.PrintStream; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciInstance extends ciObject { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciInstance"); - } - - - public ciInstance(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciInstanceKlass.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciInstanceKlass.java deleted file mode 100644 index febf476e6a6..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciInstanceKlass.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (c) 2011, 2022, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.io.*; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.memory.SystemDictionary; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.Type; -import sun.jvm.hotspot.types.TypeDataBase; -import sun.jvm.hotspot.types.WrongTypeException; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciInstanceKlass extends ciKlass { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciInstanceKlass"); - initStateField = new CIntField(type.getCIntegerField("_init_state"), 0); - isSharedField = new CIntField(type.getCIntegerField("_is_shared"), 0); - CLASS_STATE_LINKED = db.lookupIntConstant("InstanceKlass::linked").intValue(); - CLASS_STATE_FULLY_INITIALIZED = db.lookupIntConstant("InstanceKlass::fully_initialized").intValue(); - } - - private static CIntField initStateField; - private static CIntField isSharedField; - private static int CLASS_STATE_LINKED; - private static int CLASS_STATE_FULLY_INITIALIZED; - - public ciInstanceKlass(Address addr) { - super(addr); - } - - public int initState() { - int initState = (int)initStateField.getValue(getAddress()); - if (isShared() && initState < CLASS_STATE_LINKED) { - InstanceKlass ik = (InstanceKlass)getMetadata(); - initState = ik.getInitStateAsInt(); - } - return initState; - } - - public boolean isShared() { - return isSharedField.getValue(getAddress()) != 0; - } - - public boolean isLinked() { - return initState() >= CLASS_STATE_LINKED; - } - - public boolean isInitialized() { - return initState() == CLASS_STATE_FULLY_INITIALIZED; - } - - public void dumpReplayData(PrintStream out) { - InstanceKlass ik = (InstanceKlass)getMetadata(); - ConstantPool cp = ik.getConstants(); - - // Try to record related loaded classes - Klass sub = ik.getSubklassKlass(); - while (sub != null) { - if (sub instanceof InstanceKlass) { - out.println("instanceKlass " + sub.getName().asString()); - } - sub = sub.getNextSiblingKlass(); - } - - final int length = cp.getLength(); - out.print("ciInstanceKlass " + name() + " " + (isLinked() ? 1 : 0) + " " + (isInitialized() ? 1 : 0) + " " + length); - for (int index = 1; index < length; index++) { - out.print(" " + cp.getTags().at(index)); - } - out.println(); - if (isInitialized()) { - Field[] staticFields = ik.getStaticFields(); - for (int i = 0; i < staticFields.length; i++) { - Field f = staticFields[i]; - Oop mirror = ik.getJavaMirror(); - if (f.isFinal() && !f.hasInitialValue()) { - out.print("staticfield " + name() + " " + - OopUtilities.escapeString(f.getID().getName()) + " " + - f.getFieldType().getSignature().asString() + " "); - if (f instanceof ByteField) { - ByteField bf = (ByteField)f; - out.println(bf.getValue(mirror)); - } else if (f instanceof BooleanField) { - BooleanField bf = (BooleanField)f; - out.println(bf.getValue(mirror) ? 1 : 0); - } else if (f instanceof ShortField) { - ShortField bf = (ShortField)f; - out.println(bf.getValue(mirror)); - } else if (f instanceof CharField) { - CharField bf = (CharField)f; - out.println(bf.getValue(mirror) & 0xffff); - } else if (f instanceof IntField) { - IntField bf = (IntField)f; - out.println(bf.getValue(mirror)); - } else if (f instanceof LongField) { - LongField bf = (LongField)f; - out.println(bf.getValue(mirror)); - } else if (f instanceof FloatField) { - FloatField bf = (FloatField)f; - out.println(Float.floatToRawIntBits(bf.getValue(mirror))); - } else if (f instanceof DoubleField) { - DoubleField bf = (DoubleField)f; - out.println(Double.doubleToRawLongBits(bf.getValue(mirror))); - } else if (f instanceof OopField) { - OopField bf = (OopField)f; - Oop value = bf.getValue(mirror); - if (value == null) { - out.println("null"); - } else if (value.isInstance()) { - Instance inst = (Instance)value; - if (inst.isA(SystemDictionary.getStringKlass())) { - out.println("\"" + OopUtilities.stringOopToEscapedString(inst) + "\""); - } else { - out.println(inst.getKlass().getName().asString()); - } - } else if (value.isObjArray()) { - ObjArray oa = (ObjArray)value; - Klass ek = (ObjArrayKlass)oa.getKlass(); - out.println(oa.getLength() + " " + ek.getName().asString()); - } else if (value.isTypeArray()) { - TypeArray ta = (TypeArray)value; - out.println(ta.getLength()); - } else { - out.println(value); - } - } - } - } - } - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciKlass.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciKlass.java deleted file mode 100644 index 168486cecd9..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciKlass.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.io.PrintStream; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciKlass extends ciType { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciKlass"); - nameField = type.getAddressField("_name"); - } - - private static AddressField nameField; - - public String name() { - ciSymbol sym = new ciSymbol(nameField.getValue(getAddress())); - return sym.asUtf88(); - } - - public ciKlass(Address addr) { - super(addr); - } - - public void printValueOn(PrintStream tty) { - Klass k = (Klass)getMetadata(); - k.printValueOn(tty); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciMetadata.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciMetadata.java deleted file mode 100644 index e64ad9ef8f0..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciMetadata.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2012, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.io.*; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciMetadata extends ciBaseObject { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciMetadata"); - metadataField = new MetadataField(type.getAddressField("_metadata"), 0); - } - - private static MetadataField metadataField; - - public Metadata getMetadata() { - return metadataField.getValue(getAddress()); - } - - public ciMetadata(Address addr) { - super(addr); - } - - public void printOn(PrintStream out) { - getMetadata().printValueOn(out); - } - - public String toString() { - return getMetadata().toString(); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciMethod.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciMethod.java deleted file mode 100644 index 132c54d9ba0..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciMethod.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.io.*; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.code.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciMethod extends ciMetadata { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciMethod"); - interpreterThrowoutCountField = new CIntField(type.getCIntegerField("_interpreter_throwout_count"), 0); - interpreterInvocationCountField = new CIntField(type.getCIntegerField("_interpreter_invocation_count"), 0); - try { - // XXX - instructionsSizeField = new CIntField(type.getCIntegerField("_instructions_size"), 0); - } catch (Exception e) { - } - } - - private static CIntField interpreterThrowoutCountField; - private static CIntField interpreterInvocationCountField; - private static CIntField instructionsSizeField; - - public ciMethod(Address addr) { - super(addr); - } - - public Method method() { - return (Method)getMetadata(); - } - - public int interpreterThrowoutCount() { - return (int) interpreterThrowoutCountField.getValue(getAddress()); - } - - public int interpreterInvocationCount() { - return (int) interpreterInvocationCountField.getValue(getAddress()); - } - - public int instructionsSize() { - if (instructionsSizeField == null) { - // XXX - Method method = method(); - NMethod nm = method.getNativeMethod(); - if (nm != null) return (int)nm.codeEnd().minus(nm.getVerifiedEntryPoint()); - return 0; - } - return (int) instructionsSizeField.getValue(getAddress()); - } - - public void printShortName(PrintStream st) { - Method method = method(); - st.printf(" %s::%s", method.getMethodHolder().getName().asString().replace('/', '.'), - method.getName().asString()); - } - - public void dumpReplayData(PrintStream out) { - Method method = (Method)getMetadata(); - NMethod nm = method.getNativeMethod(); - out.println("ciMethod " + - nameAsAscii() + " " + - method.getInvocationCount() + " " + - method.getBackedgeCount() + " " + - interpreterInvocationCount() + " " + - interpreterThrowoutCount() + " " + - instructionsSize()); - } - - public void printValueOn(PrintStream tty) { - tty.print("ciMethod " + method().getName().asString() + method().getSignature().asString() + "@" + getAddress()); - } - - public String nameAsAscii() { - Method method = (Method)getMetadata(); - return method.nameAsAscii(); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciMethodData.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciMethodData.java deleted file mode 100644 index 237eb6227d9..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciMethodData.java +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright (c) 2011, 2021, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.io.*; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.types.Field; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciMethodData extends ciMetadata implements MethodDataInterface { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciMethodData"); - origField = type.getField("_orig"); - argReturnedField = new CIntField(type.getCIntegerField("_arg_returned"), 0); - argStackField = new CIntField(type.getCIntegerField("_arg_stack"), 0); - argLocalField = new CIntField(type.getCIntegerField("_arg_local"), 0); - eflagsField = new CIntField(type.getCIntegerField("_eflags"), 0); - hintDiField = new CIntField(type.getCIntegerField("_hint_di"), 0); - dataField = type.getAddressField("_data"); - extraDataSizeField = new CIntField(type.getCIntegerField("_extra_data_size"), 0); - dataSizeField = new CIntField(type.getCIntegerField("_data_size"), 0); - stateField = new CIntField(type.getCIntegerField("_state"), 0); - Type typeMethodData = db.lookupType("MethodData"); - sizeofMethodDataOopDesc = (int)typeMethodData.getSize(); - parametersTypeDataDi = new CIntField(typeMethodData.getCIntegerField("_parameters_type_data_di"), 0); - } - - private static Field origField; - private static CIntField argReturnedField; - private static CIntField argStackField; - private static CIntField argLocalField; - private static CIntField eflagsField; - private static CIntField hintDiField; - private static AddressField dataField; - private static CIntField extraDataSizeField; - private static CIntField dataSizeField; - private static CIntField stateField; - private static int sizeofMethodDataOopDesc; - private static CIntField parametersTypeDataDi; - - public ciMethodData(Address addr) { - super(addr); - } - - public ciKlass getKlassAtAddress(Address addr) { - return (ciKlass)ciObjectFactory.getMetadata(addr); - } - - public ciMethod getMethodAtAddress(Address addr) { - return (ciMethod)ciObjectFactory.getMetadata(addr); - } - - public void printKlassValueOn(ciKlass klass, PrintStream st) { - klass.printValueOn(st); - } - - public void printMethodValueOn(ciMethod method, PrintStream st) { - method.printValueOn(st); - } - - private byte[] fetchDataAt(Address base, long size) { - byte[] result = new byte[(int)size]; - for (int i = 0; i < size; i++) { - result[i] = base.getJByteAt(i); - } - return result; - } - - public byte[] orig() { - // fetch the orig MethodData data between header and dataSize - Address base = getAddress().addOffsetTo(origField.getOffset()); - byte[] result = new byte[(int)origField.getType().getSize()]; - for (int i = 0; i < result.length; i++) { - result[i] = base.getJByteAt(i); - } - return result; - } - - public long[] data() { - // Read the data as an array of intptr_t elements - Address base = dataField.getValue(getAddress()); - int elements = (dataSize() + extraDataSize()) / MethodData.cellSize; - long[] result = new long[elements]; - for (int i = 0; i < elements; i++) { - Address value = base.getAddressAt(i * MethodData.cellSize); - if (value != null) { - result[i] = value.minus(null); - } - } - return result; - } - - int dataSize() { - return (int)dataSizeField.getValue(getAddress()); - } - - int extraDataSize() { - return (int)extraDataSizeField.getValue(getAddress()); - } - - int state() { - return (int)stateField.getValue(getAddress()); - } - - int currentMileage() { - return 0; - } - - boolean outOfBounds(int dataIndex) { - return dataIndex >= dataSize(); - } - - ParametersTypeData parametersTypeData() { - int di = (int)parametersTypeDataDi.getValue(getMetadata().getAddress()); - if (di == -1 || di == -2) { - return null; - } - DataLayout dataLayout = new DataLayout(dataField.getValue(getAddress()), di); - return new ParametersTypeData(this, dataLayout); - } - - ProfileData dataAt(int dataIndex) { - if (outOfBounds(dataIndex)) { - return null; - } - DataLayout dataLayout = new DataLayout(dataField.getValue(getAddress()), dataIndex); - - switch (dataLayout.tag()) { - case DataLayout.noTag: - default: - throw new InternalError(); - case DataLayout.bitDataTag: - return new BitData(dataLayout); - case DataLayout.counterDataTag: - return new CounterData(dataLayout); - case DataLayout.jumpDataTag: - return new JumpData(dataLayout); - case DataLayout.receiverTypeDataTag: - return new ReceiverTypeData(this, dataLayout); - case DataLayout.virtualCallDataTag: - return new VirtualCallData(this, dataLayout); - case DataLayout.retDataTag: - return new RetData(dataLayout); - case DataLayout.branchDataTag: - return new BranchData(dataLayout); - case DataLayout.multiBranchDataTag: - return new MultiBranchData(dataLayout); - case DataLayout.callTypeDataTag: - return new CallTypeData(this, dataLayout); - case DataLayout.virtualCallTypeDataTag: - return new VirtualCallTypeData(this, dataLayout); - case DataLayout.parametersTypeDataTag: - return new ParametersTypeData(this, dataLayout); - } - } - - int dpToDi(int dp) { - return dp; - } - - int firstDi() { return 0; } - ProfileData firstData() { return dataAt(firstDi()); } - ProfileData nextData(ProfileData current) { - int currentIndex = dpToDi(current.dp()); - int nextIndex = currentIndex + current.sizeInBytes(); - return dataAt(nextIndex); - } - boolean isValid(ProfileData current) { return current != null; } - - DataLayout limitDataPosition() { - return new DataLayout(dataField.getValue(getAddress()), dataSize()); - } - DataLayout extraDataBase() { - return limitDataPosition(); - } - DataLayout extraDataLimit() { - return new DataLayout(dataField.getValue(getAddress()), dataSize() + extraDataSize()); - } - DataLayout nextExtra(DataLayout dataLayout) { - return new DataLayout(dataField.getValue(getAddress()), dataLayout.dp() + DataLayout.computeSizeInBytes(MethodData.extraNbCells(dataLayout))); - } - - public void printDataOn(PrintStream st) { - if (parametersTypeData() != null) { - parametersTypeData().printDataOn(st); - } - ProfileData data = firstData(); - for ( ; isValid(data); data = nextData(data)) { - st.print(dpToDi(data.dp())); - st.print(" "); - // st->fillTo(6); - data.printDataOn(st); - } - st.println("--- Extra data:"); - DataLayout dp = extraDataBase(); - DataLayout end = extraDataLimit(); - for (;; dp = nextExtra(dp)) { - switch(dp.tag()) { - case DataLayout.noTag: - continue; - case DataLayout.bitDataTag: - data = new BitData(dp); - break; - case DataLayout.speculativeTrapDataTag: - data = new SpeculativeTrapData(this, dp); - break; - case DataLayout.argInfoDataTag: - data = new ArgInfoData(dp); - dp = end; // ArgInfoData is at the end of extra data section. - break; - default: - throw new InternalError("unexpected tag " + dp.tag()); - } - st.print(dpToDi(data.dp())); - st.print(" "); - data.printDataOn(st); - if (dp == end) return; - } - } - - int dumpReplayDataTypeHelper(PrintStream out, int round, int count, int index, ProfileData pdata, ciKlass k) { - if (k != null) { - if (round == 0) count++; - else out.print(" " + ((pdata.dp() + pdata.cellOffset(index)) / MethodData.cellSize) + " " + k.name()); - } - return count; - } - - int dumpReplayDataReceiverTypeHelper(PrintStream out, int round, int count, ReceiverTypeData vdata) { - for (int i = 0; i < vdata.rowLimit(); i++) { - ciKlass k = vdata.receiver(i); - count = dumpReplayDataTypeHelper(out, round, count, vdata.receiverCellIndex(i), vdata, k); - } - return count; - } - - int dumpReplayDataCallTypeHelper(PrintStream out, int round, int count, CallTypeDataInterface callTypeData) { - if (callTypeData.hasArguments()) { - for (int i = 0; i < callTypeData.numberOfArguments(); i++) { - count = dumpReplayDataTypeHelper(out, round, count, callTypeData.argumentTypeIndex(i), (ProfileData)callTypeData, callTypeData.argumentType(i)); - } - } - if (callTypeData.hasReturn()) { - count = dumpReplayDataTypeHelper(out, round, count, callTypeData.returnTypeIndex(), (ProfileData)callTypeData, callTypeData.returnType()); - } - return count; - } - - int dumpReplayDataExtraDataHelper(PrintStream out, int round, int count) { - DataLayout dp = extraDataBase(); - DataLayout end = extraDataLimit(); - - for (;dp != end; dp = nextExtra(dp)) { - switch(dp.tag()) { - case DataLayout.noTag: - case DataLayout.argInfoDataTag: - return count; - case DataLayout.bitDataTag: - break; - case DataLayout.speculativeTrapDataTag: { - SpeculativeTrapData data = new SpeculativeTrapData(this, dp); - ciMethod m = data.method(); - if (m != null) { - if (round == 0) { - count++; - } else { - out.print(" " + (dpToDi(data.dp() + data.cellOffset(SpeculativeTrapData.methodIndex())) / MethodData.cellSize) + " " + m.nameAsAscii()); - } - } - break; - } - default: - throw new InternalError("bad tag " + dp.tag()); - } - } - return count; - } - - public void dumpReplayData(PrintStream out) { - MethodData mdo = (MethodData)getMetadata(); - Method method = mdo.getMethod(); - out.print("ciMethodData " + - method.nameAsAscii() + " " + - state() + " " + currentMileage()); - byte[] orig = orig(); - out.print(" orig " + orig.length); - for (int i = 0; i < orig.length; i++) { - out.print(" " + (orig[i] & 0xff)); - } - - long[] data = data(); - out.print(" data " + data.length); - for (int i = 0; i < data.length; i++) { - out.print(" 0x" + Long.toHexString(data[i])); - } - int count = 0; - ParametersTypeData parameters = parametersTypeData(); - for (int round = 0; round < 2; round++) { - if (round == 1) out.print(" oops " + count); - ProfileData pdata = firstData(); - for ( ; isValid(pdata); pdata = nextData(pdata)) { - if (pdata instanceof ReceiverTypeData) { - @SuppressWarnings("unchecked") - ReceiverTypeData receiverTypeData = (ReceiverTypeData)pdata; - count = dumpReplayDataReceiverTypeHelper(out, round, count, receiverTypeData); - } - if (pdata instanceof CallTypeDataInterface) { - @SuppressWarnings("unchecked") - CallTypeDataInterface callTypeData = (CallTypeDataInterface)pdata; - count = dumpReplayDataCallTypeHelper(out, round, count, callTypeData); - } - } - if (parameters != null) { - for (int i = 0; i < parameters.numberOfParameters(); i++) { - count = dumpReplayDataTypeHelper(out, round, count, ParametersTypeData.typeIndex(i), parameters, parameters.type(i)); - } - } - } - count = 0; - for (int round = 0; round < 2; round++) { - if (round == 1) out.print(" methods " + count); - count = dumpReplayDataExtraDataHelper(out, round, count); - } - out.println(); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciObjArrayKlass.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciObjArrayKlass.java deleted file mode 100644 index ce87a98dd20..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciObjArrayKlass.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.io.PrintStream; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciObjArrayKlass extends ciArrayKlass { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciObjArrayKlass"); - elementKlassField = type.getAddressField("_element_klass"); - baseElementKlassField = type.getAddressField("_base_element_klass"); - } - - private static AddressField elementKlassField; - private static AddressField baseElementKlassField; - - public ciObjArrayKlass(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciObject.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciObject.java deleted file mode 100644 index 0d462ce85dc..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciObject.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.io.*; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciObject extends ciBaseObject { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciObject"); - klassField = type.getAddressField("_klass"); - handleField = type.getAddressField("_handle"); - } - - private static AddressField klassField; - private static AddressField handleField; - - public Oop getOop() { - OopHandle oh = handleField.getValue(getAddress()).getOopHandleAt(0); - return VM.getVM().getObjectHeap().newOop(oh); - } - - public ciObject(Address addr) { - super(addr); - } - - public void printOn(PrintStream out) { - getOop().printValueOn(out); - out.println(); - } - - public String toString() { - return getOop().toString(); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciObjectFactory.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciObjectFactory.java deleted file mode 100644 index 3de3ba908b2..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciObjectFactory.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.lang.reflect.Constructor; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.utilities.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciObjectFactory extends VMObject { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciObjectFactory"); - ciMetadataField = type.getAddressField("_ci_metadata"); - symbolsField = type.getAddressField("_symbols"); - - ciObjectConstructor = new VirtualBaseConstructor(db, db.lookupType("ciObject"), "sun.jvm.hotspot.ci", ciObject.class); - ciMetadataConstructor = new VirtualBaseConstructor(db, db.lookupType("ciMetadata"), "sun.jvm.hotspot.ci", ciMetadata.class); - ciSymbolConstructor = new VirtualBaseConstructor(db, db.lookupType("ciSymbol"), "sun.jvm.hotspot.ci", ciSymbol.class); - } - - private static AddressField ciMetadataField; - private static AddressField symbolsField; - - private static VirtualBaseConstructor ciObjectConstructor; - private static VirtualBaseConstructor ciMetadataConstructor; - private static VirtualBaseConstructor ciSymbolConstructor; - - public static ciObject get(Address addr) { - if (addr == null) return null; - - return ciObjectConstructor.instantiateWrapperFor(addr); - } - - public static ciMetadata getMetadata(Address addr) { - if (addr == null) return null; - - return ciMetadataConstructor.instantiateWrapperFor(addr); - } - - public GrowableArray objects() { - Address addr = getAddress().addOffsetTo(ciMetadataField.getOffset()); - return GrowableArray.create(addr, ciMetadataConstructor); - } - - public GrowableArray symbols() { - Address addr = getAddress().addOffsetTo(symbolsField.getOffset()); - return GrowableArray.create(addr, ciSymbolConstructor); - } - - public ciObjectFactory(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciSymbol.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciSymbol.java deleted file mode 100644 index b9f5bcce6fb..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciSymbol.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.io.PrintStream; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciSymbol extends ciMetadata { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciSymbol"); - symbolField = type.getAddressField("_symbol"); - } - - private static AddressField symbolField; - - public String asUtf88() { - Symbol sym = Symbol.create(symbolField.getValue(getAddress())); - return sym.asString(); - } - - public ciSymbol(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciType.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciType.java deleted file mode 100644 index 656b2e56479..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciType.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciType extends ciMetadata { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciType"); - basicTypeField = new CIntField(type.getCIntegerField("_basic_type"), 0); - } - - private static CIntField basicTypeField; - - public ciType(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciTypeArrayKlass.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciTypeArrayKlass.java deleted file mode 100644 index 43f546a5da0..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ci/ciTypeArrayKlass.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.ci; - -import java.io.PrintStream; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ciTypeArrayKlass extends ciArrayKlass { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ciTypeArrayKlass"); - } - - public ciTypeArrayKlass(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java index b401f3656f9..a085edf9936 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java @@ -65,8 +65,6 @@ public class CodeBlob extends VMObject { super(addr); } - protected static int matcherInterpreterFramePointerReg; - private static void initialize(TypeDataBase db) { Type type = db.lookupType("CodeBlob"); @@ -83,11 +81,6 @@ public class CodeBlob extends VMObject { oopMapsField = type.getAddressField("_oop_maps"); callerMustGCArgumentsField = type.getCIntegerField("_caller_must_gc_arguments"); - if (VM.getVM().isServerCompiler()) { - matcherInterpreterFramePointerReg = - db.lookupIntConstant("Matcher::interpreter_frame_pointer_reg").intValue(); - } - NMethodKind = db.lookupIntConstant("CodeBlobKind::Nmethod").intValue(); RuntimeStubKind = db.lookupIntConstant("CodeBlobKind::RuntimeStub").intValue(); UpcallKind = db.lookupIntConstant("CodeBlobKind::Upcall").intValue(); diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/NMethod.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/NMethod.java index 8cd2342750d..44d51b005ae 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/NMethod.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/NMethod.java @@ -489,42 +489,6 @@ public class NMethod extends CodeBlob { method.getSignature().asString(); } - public void dumpReplayData(PrintStream out) { - HashMap h = new HashMap<>(); - for (int i = 1; i < getMetadataLength(); i++) { - Metadata meta = Metadata.instantiateWrapperFor(getMetadataAt(i)); - System.err.println(meta); - if (h.get(meta) != null) continue; - h.put(meta, meta); - if (meta instanceof InstanceKlass) { - meta.dumpReplayData(out); - } else if (meta instanceof Method) { - meta.dumpReplayData(out); - MethodData mdo = ((Method)meta).getMethodData(); - if (mdo != null) { - mdo.dumpReplayData(out); - } - } - } - Method method = getMethod(); - if (h.get(method) == null) { - method.dumpReplayData(out); - MethodData mdo = method.getMethodData(); - if (mdo != null) { - mdo.dumpReplayData(out); - } - } - if (h.get(method.getMethodHolder()) == null) { - method.getMethodHolder().dumpReplayData(out); - } - Klass holder = method.getMethodHolder(); - out.println("compile " + holder.getName().asString() + " " + - OopUtilities.escapeString(method.getName().asString()) + " " + - method.getSignature().asString() + " " + - getEntryBCI() + " " + getCompLevel()); - - } - //-------------------------------------------------------------------------------- // Internals only below this point // diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/compiler/CompileTask.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/compiler/CompileTask.java index 7b5fba44bc2..e54facaeb72 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/compiler/CompileTask.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/compiler/CompileTask.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2025, 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 @@ -29,7 +29,6 @@ import java.util.*; import sun.jvm.hotspot.debugger.*; import sun.jvm.hotspot.runtime.*; import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.opto.*; import sun.jvm.hotspot.prims.JvmtiExport; import sun.jvm.hotspot.types.*; import sun.jvm.hotspot.utilities.Observable; diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java index 05d511d422f..0cd743372d5 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, 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 @@ -965,84 +965,4 @@ public class InstanceKlass extends Klass { } return -1; } - - public void dumpReplayData(PrintStream out) { - ConstantPool cp = getConstants(); - - // Try to record related loaded classes - Klass sub = getSubklassKlass(); - while (sub != null) { - if (sub instanceof InstanceKlass) { - out.println("instanceKlass " + sub.getName().asString()); - } - sub = sub.getNextSiblingKlass(); - } - - final int length = cp.getLength(); - out.print("ciInstanceKlass " + getName().asString() + " " + (isLinked() ? 1 : 0) + " " + (isInitialized() ? 1 : 0) + " " + length); - for (int index = 1; index < length; index++) { - out.print(" " + cp.getTags().at(index)); - } - out.println(); - if (isInitialized()) { - Field[] staticFields = getStaticFields(); - for (int i = 0; i < staticFields.length; i++) { - Field f = staticFields[i]; - Oop mirror = getJavaMirror(); - if (f.isFinal() && !f.hasInitialValue()) { - out.print("staticfield " + getName().asString() + " " + - OopUtilities.escapeString(f.getID().getName()) + " " + - f.getFieldType().getSignature().asString() + " "); - if (f instanceof ByteField) { - ByteField bf = (ByteField)f; - out.println(bf.getValue(mirror)); - } else if (f instanceof BooleanField) { - BooleanField bf = (BooleanField)f; - out.println(bf.getValue(mirror) ? 1 : 0); - } else if (f instanceof ShortField) { - ShortField bf = (ShortField)f; - out.println(bf.getValue(mirror)); - } else if (f instanceof CharField) { - CharField bf = (CharField)f; - out.println(bf.getValue(mirror) & 0xffff); - } else if (f instanceof IntField) { - IntField bf = (IntField)f; - out.println(bf.getValue(mirror)); - } else if (f instanceof LongField) { - LongField bf = (LongField)f; - out.println(bf.getValue(mirror)); - } else if (f instanceof FloatField) { - FloatField bf = (FloatField)f; - out.println(Float.floatToRawIntBits(bf.getValue(mirror))); - } else if (f instanceof DoubleField) { - DoubleField bf = (DoubleField)f; - out.println(Double.doubleToRawLongBits(bf.getValue(mirror))); - } else if (f instanceof OopField) { - OopField bf = (OopField)f; - - Oop value = bf.getValue(mirror); - if (value == null) { - out.println("null"); - } else if (value.isInstance()) { - Instance inst = (Instance)value; - if (inst.isA(SystemDictionary.getStringKlass())) { - out.println("\"" + OopUtilities.stringOopToEscapedString(inst) + "\""); - } else { - out.println(inst.getKlass().getName().asString()); - } - } else if (value.isObjArray()) { - ObjArray oa = (ObjArray)value; - Klass ek = (ObjArrayKlass)oa.getKlass(); - out.println(oa.getLength() + " " + ek.getName().asString()); - } else if (value.isTypeArray()) { - TypeArray ta = (TypeArray)value; - out.println(ta.getLength()); - } else { - out.println(value); - } - } - } - } - } - } } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Metadata.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Metadata.java index ece6bf157b7..dfbd67ae805 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Metadata.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Metadata.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -89,9 +89,6 @@ public abstract class Metadata extends VMObject { } public abstract void printValueOn(PrintStream tty); - public void dumpReplayData(PrintStream out) { - out.println("# Unknown Metadata"); - } public boolean isShared() { VM vm = VM.getVM(); diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Method.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Method.java index ca7329ad6c9..75dec8edbd1 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Method.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Method.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, 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 @@ -348,22 +348,6 @@ public class Method extends Metadata { return buf.toString().replace('/', '.'); } - public void dumpReplayData(PrintStream out) { - NMethod nm = getNativeMethod(); - int code_size = 0; - if (nm != null) { - code_size = (int)nm.codeEnd().minus(nm.getVerifiedEntryPoint()); - } - Klass holder = getMethodHolder(); - out.println("ciMethod " + - nameAsAscii() + " " + - getInvocationCount() + " " + - getBackedgeCount() + " " + - interpreterInvocationCount() + " " + - interpreterThrowoutCount() + " " + - code_size); - } - public int interpreterThrowoutCount() { return getMethodCounters().interpreterThrowoutCount(); } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/MethodData.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/MethodData.java index 0c05cabe32d..a7c2e2bccb7 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/MethodData.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/MethodData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, 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 @@ -439,111 +439,4 @@ public class MethodData extends Metadata implements MethodDataInterface vdata) { - for (int i = 0; i < vdata.rowLimit(); i++) { - Klass k = vdata.receiver(i); - count = dumpReplayDataTypeHelper(out, round, count, vdata.receiverCellIndex(i), vdata, k); - } - return count; - } - - int dumpReplayDataCallTypeHelper(PrintStream out, int round, int count, CallTypeDataInterface callTypeData) { - if (callTypeData.hasArguments()) { - for (int i = 0; i < callTypeData.numberOfArguments(); i++) { - count = dumpReplayDataTypeHelper(out, round, count, callTypeData.argumentTypeIndex(i), (ProfileData)callTypeData, callTypeData.argumentType(i)); - } - } - if (callTypeData.hasReturn()) { - count = dumpReplayDataTypeHelper(out, round, count, callTypeData.returnTypeIndex(), (ProfileData)callTypeData, callTypeData.returnType()); - } - return count; - } - - int dumpReplayDataExtraDataHelper(PrintStream out, int round, int count) { - DataLayout dp = extraDataBase(); - DataLayout end = extraDataLimit(); - - for (;dp != end; dp = nextExtra(dp)) { - switch(dp.tag()) { - case DataLayout.noTag: - case DataLayout.argInfoDataTag: - return count; - case DataLayout.bitDataTag: - break; - case DataLayout.speculativeTrapDataTag: { - SpeculativeTrapData data = new SpeculativeTrapData(this, dp); - Method m = data.method(); - if (m != null) { - if (round == 0) { - count++; - } else { - out.print(" " + (dpToDi(data.dp() + data.cellOffset(SpeculativeTrapData.methodIndex())) / cellSize) + " " + m.nameAsAscii()); - } - } - break; - } - default: - throw new InternalError("bad tag " + dp.tag()); - } - } - return count; - } - - public void dumpReplayData(PrintStream out) { - Method method = getMethod(); - out.print("ciMethodData " + method.nameAsAscii() - + " " + "2" + " " + - currentMileage()); - byte[] orig = orig(); - out.print(" orig " + orig.length); - for (int i = 0; i < orig.length; i++) { - out.print(" " + (orig[i] & 0xff)); - } - - long[] data = data(); - out.print(" data " + data.length); - for (int i = 0; i < data.length; i++) { - out.print(" 0x" + Long.toHexString(data[i])); - } - int count = 0; - ParametersTypeData parameters = parametersTypeData(); - for (int round = 0; round < 2; round++) { - if (round == 1) out.print(" oops " + count); - ProfileData pdata = firstData(); - for ( ; isValid(pdata); pdata = nextData(pdata)) { - if (pdata instanceof ReceiverTypeData) { - @SuppressWarnings("unchecked") - ReceiverTypeData receiverTypeData = (ReceiverTypeData)pdata; - count = dumpReplayDataReceiverTypeHelper(out, round, count, receiverTypeData); - } - if (pdata instanceof CallTypeDataInterface) { - @SuppressWarnings("unchecked") - CallTypeDataInterface callTypeData = (CallTypeDataInterface)pdata; - count = dumpReplayDataCallTypeHelper(out, round, count, callTypeData); - } - } - if (parameters != null) { - for (int i = 0; i < parameters.numberOfParameters(); i++) { - count = dumpReplayDataTypeHelper(out, round, count, ParametersTypeData.typeIndex(i), parameters, parameters.type(i)); - } - } - } - count = 0; - for (int round = 0; round < 2; round++) { - if (round == 1) out.print(" methods " + count); - count = dumpReplayDataExtraDataHelper(out, round, count); - } - out.println(); - } } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Block.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Block.java deleted file mode 100644 index 857e6da9bf8..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Block.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2011, 2022, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import java.io.PrintStream; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class Block extends VMObject { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("Block"); - nodesField = type.getAddressField("_nodes"); - succsField = type.getAddressField("_succs"); - numSuccsField = new CIntField(type.getCIntegerField("_num_succs"), 0); - preOrderField = new CIntField(type.getCIntegerField("_pre_order"), 0); - domDepthField = new CIntField(type.getCIntegerField("_dom_depth"), 0); - idomField = type.getAddressField("_idom"); - freqField = type.getJDoubleField("_freq"); - } - - private static AddressField nodesField; - private static AddressField succsField; - private static CIntField numSuccsField; - private static CIntField preOrderField; - private static CIntField domDepthField; - private static AddressField idomField; - private static JDoubleField freqField; - - public Block(Address addr) { - super(addr); - } - - public int preOrder() { - return (int)preOrderField.getValue(getAddress()); - } - - public double freq() { - return freqField.getValue(getAddress()); - } - - public Node_List nodes() { - return new Node_List(getAddress().addOffsetTo(nodesField.getOffset())); - } - - public void dump(PrintStream out) { - out.print("B" + preOrder()); - out.print(" Freq: " + freq()); - out.println(); - Node_List nl = nodes(); - int cnt = nl.size(); - for( int i=0; idumpOn(st); - // if (_cnt != countUnknown) st->print(" C=%f",_cnt); - JVMState jvms = jvms(); - if (jvms != null) jvms.dumpSpec(out); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/CallRuntimeNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/CallRuntimeNode.java deleted file mode 100644 index 3bfd221395e..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/CallRuntimeNode.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2011, 2021, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.io.PrintStream; -import java.util.*; -import sun.jvm.hotspot.utilities.CStringUtilities; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class CallRuntimeNode extends CallNode { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("CallRuntimeNode"); - nameField = type.getAddressField("_name"); - } - - private static AddressField nameField; - - public String name() { - return CStringUtilities.getString(nameField.getValue(getAddress())); - } - - public CallRuntimeNode(Address addr) { - super(addr); - } - - public void dumpSpec(PrintStream out) { - out.print(" #"); - out.print(name()); - super.dumpSpec(out); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/CallStaticJavaNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/CallStaticJavaNode.java deleted file mode 100644 index ab678d0e6c6..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/CallStaticJavaNode.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2011, 2021, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.io.PrintStream; -import java.util.*; -import sun.jvm.hotspot.utilities.CStringUtilities; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class CallStaticJavaNode extends CallJavaNode { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("CallStaticJavaNode"); - nameField = type.getAddressField("_name"); - } - - private static AddressField nameField; - - public String name() { - return CStringUtilities.getString(nameField.getValue(getAddress())); - } - - public CallStaticJavaNode(Address addr) { - super(addr); - } - - public void dumpSpec(PrintStream out) { - out.print(" Static "); - String name = name(); - if (name != null) { - out.print(name); - // int trapReq = uncommonTrapRequest(); - // if (trapReq != 0) { - // char buf[100]; - // st->print("(%s)", - // Deoptimization::formatTrapRequest(buf, sizeof(buf), - // trapReq)); - // } - out.print(" "); - } - super.dumpSpec(out); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Compile.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Compile.java deleted file mode 100644 index 725c95619fc..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Compile.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import java.io.PrintStream; -import sun.jvm.hotspot.ci.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class Compile extends VMObject { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("Compile"); - rootField = type.getAddressField("_root"); - uniqueField = new CIntField(type.getCIntegerField("_unique"), 0); - entryBciField = new CIntField(type.getCIntegerField("_entry_bci"), 0); - topField = type.getAddressField("_top"); - cfgField = type.getAddressField("_cfg"); - regallocField = type.getAddressField("_regalloc"); - methodField = type.getAddressField("_method"); - iltField = type.getAddressField("_ilt"); - } - - private static AddressField rootField; - private static CIntField uniqueField; - private static CIntField entryBciField; - private static AddressField topField; - private static AddressField cfgField; - private static AddressField regallocField; - private static AddressField methodField; - private static AddressField iltField; - - public Compile(Address addr) { - super(addr); - } - - public Node root() { - return new RootNode(rootField.getValue(this.getAddress())); - } - - public int entryBci() { - return (int)entryBciField.getValue(getAddress()); - } - - public ciMethod method() { - return (ciMethod) ciObjectFactory.getMetadata(methodField.getValue(getAddress())); - } - - public PhaseCFG cfg() { - Address a = cfgField.getValue(this.getAddress()); - if (a != null) { - return new PhaseCFG(a); - } - return null; - } - - public InlineTree ilt() { - Address a = iltField.getValue(this.getAddress()); - if (a != null) { - return new InlineTree(a); - } - return null; - } - - public void dumpInlineData(PrintStream out) { - InlineTree inlTree = ilt(); - if (inlTree != null) { - out.print(" inline " + inlTree.count()); - inlTree.dumpReplayData(out); - } - } - -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/CompilerPhaseType.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/CompilerPhaseType.java deleted file mode 100644 index a745d682069..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/CompilerPhaseType.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2014, 2021, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -//These definitions should be kept in sync with the definitions in the HotSpot code. - -public enum CompilerPhaseType { - PHASE_BEFORE_STRINGOPTS ("Before StringOpts"), - PHASE_AFTER_STRINGOPTS ("After StringOpts"), - PHASE_BEFORE_REMOVEUSELESS ("Before RemoveUseless"), - PHASE_AFTER_PARSING ("After Parsing"), - PHASE_ITER_GVN1 ("Iter GVN 1"), - PHASE_PHASEIDEAL_BEFORE_EA ("PhaseIdealLoop before EA"), - PHASE_ITER_GVN_AFTER_EA ("Iter GVN after EA"), - PHASE_ITER_GVN_AFTER_ELIMINATION ("Iter GVN after eliminating allocations and locks"), - PHASE_PHASEIDEALLOOP1 ("PhaseIdealLoop 1"), - PHASE_PHASEIDEALLOOP2 ("PhaseIdealLoop 2"), - PHASE_PHASEIDEALLOOP3 ("PhaseIdealLoop 3"), - PHASE_CCP1 ("PhaseCCP 1"), - PHASE_ITER_GVN2 ("Iter GVN 2"), - PHASE_PHASEIDEALLOOP_ITERATIONS ("PhaseIdealLoop iterations"), - PHASE_OPTIMIZE_FINISHED ("Optimize finished"), - PHASE_GLOBAL_CODE_MOTION ("Global code motion"), - PHASE_FINAL_CODE ("Final Code"), - PHASE_AFTER_EA ("After Escape Analysis"), - PHASE_BEFORE_CLOOPS ("Before CountedLoop"), - PHASE_AFTER_CLOOPS ("After CountedLoop"), - PHASE_BEFORE_BEAUTIFY_LOOPS ("Before beautify loops"), - PHASE_AFTER_BEAUTIFY_LOOPS ("After beautify loops"), - PHASE_BEFORE_MATCHING ("Before Matching"), - PHASE_INCREMENTAL_INLINE ("Incremental Inline"), - PHASE_INCREMENTAL_BOXING_INLINE ("Incremental Boxing Inline"), - PHASE_END ("End"), - PHASE_FAILURE ("Failure"), - PHASE_NUM_TYPES ("Number of Phase Types"); - - private final String value; - - CompilerPhaseType(String val) { - this.value = val; - } - public String value() { - return value; - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/HaltNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/HaltNode.java deleted file mode 100644 index 5c84b2e9a6e..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/HaltNode.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class HaltNode extends Node { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("HaltNode"); - } - - - public HaltNode(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/InlineTree.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/InlineTree.java deleted file mode 100644 index 9a11b1c962c..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/InlineTree.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import java.io.PrintStream; -import sun.jvm.hotspot.ci.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.utilities.GrowableArray; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class InlineTree extends VMObject { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("InlineTree"); - callerJvmsField = type.getAddressField("_caller_jvms"); - methodField = type.getAddressField("_method"); - callerTreeField = type.getAddressField("_caller_tree"); - subtreesField = type.getAddressField("_subtrees"); - } - - private static AddressField callerJvmsField; - private static AddressField methodField; - private static AddressField callerTreeField; - private static AddressField subtreesField; - - private static StaticBaseConstructor inlineTreeConstructor = new StaticBaseConstructor<>(InlineTree.class); - - public InlineTree(Address addr) { - super(addr); - } - - public InlineTree callerTree() { - Address addr = callerTreeField.getValue(getAddress()); - if (addr == null) return null; - - return new InlineTree(addr); - } - - public ciMethod method() { - return (ciMethod) ciObjectFactory.getMetadata(methodField.getValue(getAddress())); - } - - public JVMState callerJvms() { - return JVMState.create(callerJvmsField.getValue(getAddress())); - } - - public int callerBci() { - JVMState jvms = callerJvms(); - return (jvms != null) ? jvms.bci() : -1; - } - - public GrowableArray subtrees() { - Address addr = getAddress().addOffsetTo(subtreesField.getOffset()); - - return GrowableArray.create(addr, inlineTreeConstructor); - } - - public int inlineLevel() { - JVMState jvms = callerJvms(); - return (jvms != null) ? jvms.depth() : 0; - } - - public void printImpl(PrintStream st, int indent) { - for (int i = 0; i < indent; i++) st.print(" "); - st.printf(" @ %d ", callerBci()); - method().printShortName(st); - st.println(); - - GrowableArray subt = subtrees(); - for (int i = 0 ; i < subt.length(); i++) { - subt.at(i).printImpl(st, indent + 2); - } - } - public void print(PrintStream st) { - printImpl(st, 2); - } - - // Count number of nodes in this subtree - public int count() { - int result = 1; - GrowableArray subt = subtrees(); - for (int i = 0 ; i < subt.length(); i++) { - result += subt.at(i).count(); - } - return result; - } - - public void dumpReplayData(PrintStream out) { - out.printf(" %d %d ", inlineLevel(), callerBci()); - Method method = (Method)method().getMetadata(); - Klass holder = method.getMethodHolder(); - out.print(holder.getName().asString() + " " + - OopUtilities.escapeString(method.getName().asString()) + " " + - method.getSignature().asString()); - - GrowableArray subt = subtrees(); - for (int i = 0 ; i < subt.length(); i++) { - subt.at(i).dumpReplayData(out); - } - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/JVMState.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/JVMState.java deleted file mode 100644 index d83c1df8b0d..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/JVMState.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.io.PrintStream; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.ci.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class JVMState extends VMObject { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("JVMState"); - mapField = type.getAddressField("_map"); - methodField = type.getAddressField("_method"); - bciField = new CIntField(type.getCIntegerField("_bci"), 0); - spField = new CIntField(type.getCIntegerField("_sp"), 0); - endoffField = new CIntField(type.getCIntegerField("_endoff"), 0); - try { - scloffField = new CIntField(type.getCIntegerField("_scloff"), 0); - } catch (Exception e) { - } - monoffField = new CIntField(type.getCIntegerField("_monoff"), 0); - stkoffField = new CIntField(type.getCIntegerField("_stkoff"), 0); - locoffField = new CIntField(type.getCIntegerField("_locoff"), 0); - depthField = new CIntField(type.getCIntegerField("_depth"), 0); - callerField = type.getAddressField("_caller"); - } - - private static AddressField mapField; - private static AddressField methodField; - private static CIntField bciField; - private static CIntField spField; - private static CIntField endoffField; - private static CIntField scloffField; - private static CIntField monoffField; - private static CIntField stkoffField; - private static CIntField locoffField; - private static CIntField depthField; - private static AddressField callerField; - - public static JVMState create(Address addr) { - if (addr == null) return null; - return new JVMState(addr); - } - - public JVMState(Address addr) { - super(addr); - } - - public ciMethod method() { - return (ciMethod) ciObjectFactory.getMetadata(methodField.getValue(getAddress())); - } - - public int bci() { - return (int)bciField.getValue(getAddress()); - } - - public int depth() { - return (int)depthField.getValue(getAddress()); - } - - public JVMState caller() { - return create(callerField.getValue(getAddress())); - } - - public void dumpSpec(PrintStream out) { - ciMethod m = method(); - if (m != null) { - Method meth = m.method(); - out.print(" " + meth.getMethodHolder().getName().asString().replace('/', '.') + "::" + - meth.getName().asString() + " @ bci:" + bci()); - } else { - out.print(" runtime stub"); - } - if (caller() != null) caller().dumpSpec(out); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/LoopNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/LoopNode.java deleted file mode 100644 index 96d96d3348c..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/LoopNode.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class LoopNode extends RegionNode { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("LoopNode"); - } - - - public LoopNode(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachCallJavaNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachCallJavaNode.java deleted file mode 100644 index 29c411da4d7..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachCallJavaNode.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import java.io.PrintStream; -import sun.jvm.hotspot.ci.ciMethod; -import sun.jvm.hotspot.ci.ciObjectFactory; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class MachCallJavaNode extends MachCallNode { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("MachCallJavaNode"); - methodField = type.getAddressField("_method"); - bciField = new CIntField(type.getCIntegerField("_bci"), 0); - } - - private static AddressField methodField; - private static CIntField bciField; - - public ciMethod method() { - return (ciMethod) ciObjectFactory.getMetadata(methodField.getValue(getAddress())); - } - - public MachCallJavaNode(Address addr) { - super(addr); - } - - public void dumpSpec(PrintStream st) { - ciMethod m = method(); - if (m != null) { - m.printShortName(st); - st.print(" "); - } - super.dumpSpec(st); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachCallNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachCallNode.java deleted file mode 100644 index 040616b4b5c..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachCallNode.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import java.io.PrintStream; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class MachCallNode extends MachSafePointNode { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("MachCallNode"); - } - - public MachCallNode(Address addr) { - super(addr); - } - - public void dumpSpec(PrintStream st) { - st.print("# "); - // tf()->dump_on(st); - // if (_cnt != COUNT_UNKNOWN) st->print(" C=%f",_cnt); - if (jvms() != null) jvms().dumpSpec(st); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachCallRuntimeNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachCallRuntimeNode.java deleted file mode 100644 index 7fff61bb147..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachCallRuntimeNode.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import java.io.PrintStream; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.CStringUtilities; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class MachCallRuntimeNode extends MachCallJavaNode { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("MachCallRuntimeNode"); - nameField = type.getAddressField("_name"); - } - - private static AddressField nameField; - - public String name() { - return CStringUtilities.getString(nameField.getValue(getAddress())); - } - - public MachCallRuntimeNode(Address addr) { - super(addr); - } - - public void dumpSpec(PrintStream out) { - out.printf("%s ", name()); - super.dumpSpec(out); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachCallStaticJavaNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachCallStaticJavaNode.java deleted file mode 100644 index 6124a0c353d..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachCallStaticJavaNode.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import java.io.PrintStream; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.CStringUtilities; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class MachCallStaticJavaNode extends MachCallJavaNode { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("MachCallStaticJavaNode"); - nameField = type.getAddressField("_name"); - } - - private static AddressField nameField; - - public String name() { - return CStringUtilities.getString(nameField.getValue(getAddress())); - } - - public MachCallStaticJavaNode(Address addr) { - super(addr); - } - - public void dumpSpec(PrintStream st) { - st.print("Static "); - String n = name(); - if (n != null) { - st.printf("wrapper for: %s", n); - // dump_trap_args(st); - st.print(" "); - } - super.dumpSpec(st); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachIfNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachIfNode.java deleted file mode 100644 index dec4fd73f97..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachIfNode.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import java.io.PrintStream; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class MachIfNode extends MachNode { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("MachIfNode"); - probField = type.getJFloatField("_prob"); - fcntField = type.getJFloatField("_fcnt"); - } - - private static JFloatField probField; - private static JFloatField fcntField; - - float prob() { - return probField.getValue(getAddress()); - } - - float cnt() { - return fcntField.getValue(getAddress()); - } - - public MachIfNode(Address addr) { - super(addr); - } - - public void dumpSpec(PrintStream out) { - out.print("P=" + prob() + ", C=" + cnt()); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachNode.java deleted file mode 100644 index f300f52864b..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachNode.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class MachNode extends Node { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("MachNode"); - } - - public MachNode(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachReturnNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachReturnNode.java deleted file mode 100644 index db3a8398322..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachReturnNode.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class MachReturnNode extends MachNode { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("MachReturnNode"); - } - - public MachReturnNode(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachSafePointNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachSafePointNode.java deleted file mode 100644 index 8e54f0c1df0..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MachSafePointNode.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import java.io.PrintStream; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class MachSafePointNode extends MachReturnNode { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("MachSafePointNode"); - jvmsField = type.getAddressField("_jvms"); - jvmadjField = new CIntField(type.getCIntegerField("_jvmadj"), 0); - } - - private static AddressField jvmsField; - private static CIntField jvmadjField; - - public MachSafePointNode(Address addr) { - super(addr); - } - - public JVMState jvms() { - return JVMState.create(jvmsField.getValue(getAddress())); - } - - public void dumpSpec(PrintStream out) { - try { - JVMState jvms = jvms(); - if (jvms != null) out.print(" !"); - if (jvms == null) out.print("empty jvms"); - while (jvms != null) { - Method m = jvms.method().method(); - int bci = jvms.bci(); - out.print(" " + m.getMethodHolder().getName().asString().replace('/', '.') + "::" + m.getName().asString() + " @ bci:" + bci); - jvms = jvms.caller(); - } - } catch (Exception e) { - out.print(e); - } - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MultiNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MultiNode.java deleted file mode 100644 index f82e574dac6..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/MultiNode.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class MultiNode extends Node { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("MultiNode"); - } - - - public MultiNode(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Node.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Node.java deleted file mode 100644 index e79abaeb1d1..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Node.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Copyright (c) 2011, 2022, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.io.*; -import java.lang.reflect.Constructor; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class Node extends VMObject { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("Node"); - outmaxField = new CIntField(type.getCIntegerField("_outmax"), 0); - outcntField = new CIntField(type.getCIntegerField("_outcnt"), 0); - maxField = new CIntField(type.getCIntegerField("_max"), 0); - cntField = new CIntField(type.getCIntegerField("_cnt"), 0); - idxField = new CIntField(type.getCIntegerField("_idx"), 0); - outField = type.getAddressField("_out"); - inField = type.getAddressField("_in"); - - nodeType = db.lookupType("Node"); - - virtualConstructor = new VirtualBaseConstructor<>(db, nodeType, "sun.jvm.hotspot.opto", Node.class); - } - - private static CIntField outmaxField; - private static CIntField outcntField; - private static CIntField maxField; - private static CIntField cntField; - private static CIntField idxField; - private static AddressField outField; - private static AddressField inField; - - private static VirtualBaseConstructor virtualConstructor; - - private static Type nodeType; - - static HashMap nodes = new HashMap<>(); - - static HashMap constructors = new HashMap(); - - abstract static class Instantiator { - abstract Node create(Address addr); - } - - public static Node create(Address addr) { - if (addr == null) return null; - Node result = nodes.get(addr); - if (result == null) { - result = virtualConstructor.instantiateWrapperFor(addr); - nodes.put(addr, result); - } - return result; - } - - public Node(Address addr) { - super(addr); - } - - public int outcnt() { - return (int)outcntField.getValue(this.getAddress()); - } - - public int req() { - return (int)cntField.getValue(this.getAddress()); - } - - public int len() { - return (int)maxField.getValue(this.getAddress()); - } - - public int idx() { - return (int)idxField.getValue(this.getAddress()); - } - - private Node[] _out; - private Node[] _in; - - public Node rawOut(int i) { - if (_out == null) { - int addressSize = (int)VM.getVM().getAddressSize(); - _out = new Node[outcnt()]; - Address ptr = outField.getValue(this.getAddress()); - for (int j = 0; j < outcnt(); j++) { - _out[j] = Node.create(ptr.getAddressAt(j * addressSize)); - } - } - return _out[i]; - } - - public Node in(int i) { - if (_in == null) { - int addressSize = (int)VM.getVM().getAddressSize(); - _in = new Node[len()]; - Address ptr = inField.getValue(this.getAddress()); - for (int j = 0; j < len(); j++) { - _in[j] = Node.create(ptr.getAddressAt(j * addressSize)); - } - } - return _in[i]; - } - - public ArrayList collect(int d, boolean onlyCtrl) { - int depth = Math.abs(d); - ArrayList nstack = new ArrayList<>(); - BitSet set = new BitSet(); - - nstack.add(this); - set.set(idx()); - int begin = 0; - int end = 0; - for (int i = 0; i < depth; i++) { - end = nstack.size(); - for(int j = begin; j < end; j++) { - Node tp = nstack.get(j); - int limit = d > 0 ? tp.len() : tp.outcnt(); - for(int k = 0; k < limit; k++) { - Node n = d > 0 ? tp.in(k) : tp.rawOut(k); - - // if (not_a_node(n)) continue; - if (n == null) continue; - // do not recurse through top or the root (would reach unrelated stuff) - // if (n.isRoot() || n.isTop()) continue; - // if (onlyCtrl && !n.isCfg()) continue; - - if (!set.get(n.idx())) { - nstack.add(n); - set.set(n.idx()); - } - } - } - begin = end; - } - return nstack; - } - - protected void dumpNodes(Node s, int d, boolean onlyCtrl, PrintStream out) { - if (s == null) return; - - ArrayList nstack = s.collect(d, onlyCtrl); - int end = nstack.size(); - if (d > 0) { - for(int j = end-1; j >= 0; j--) { - ((Node)nstack.get(j)).dump(out); - } - } else { - for(int j = 0; j < end; j++) { - ((Node)nstack.get(j)).dump(out); - } - } - } - - public void dump(int depth, PrintStream out) { - dumpNodes(this, depth, false, out); - } - - public String Name() { - Type t = VM.getVM().getTypeDataBase().findDynamicTypeForAddress(getAddress(), nodeType); - String name = null; - if (t != null) { - name = t.toString(); - } else { - Class c = getClass(); - if (c == Node.class) { - // couldn't identify class type - return "UnknownNode<" + getAddress().getAddressAt(0) + ">"; - } - name = getClass().getName(); - if (name.startsWith("sun.jvm.hotspot.opto.")) { - name = name.substring("sun.jvm.hotspot.opto.".length()); - } - } - if (name.endsWith("Node")) { - return name.substring(0, name.length() - 4); - } - return name; - } - - public void dump(PrintStream out) { - out.print(" "); - out.print(idx()); - out.print("\t"); - out.print(Name()); - out.print("\t=== "); - int i = 0; - for (i = 0; i < req(); i++) { - Node n = in(i); - if (n != null) { - out.print(' '); - out.print(in(i).idx()); - } else { - out.print("_"); - } - out.print(" "); - } - if (len() != req()) { - int prec = 0; - for (; i < len(); i++) { - Node n = in(i); - if (n != null) { - if (prec++ == 0) { - out.print("| "); - } - out.print(in(i).idx()); - } - out.print(" "); - } - } - dumpOut(out); - dumpSpec(out); - out.println(); - } - - void dumpOut(PrintStream out) { - // Delimit the output edges - out.print(" [["); - // Dump the output edges - for (int i = 0; i < outcnt(); i++) { // For all outputs - Node u = rawOut(i); - if (u == null) { - out.print("_ "); - // } else if (not_a_node(u)) { - // out.print("not_a_node "); - } else { - // out.print("%c%d ", Compile::current()->nodeArena()->contains(u) ? ' ' : 'o', u->_idx); - out.print(' '); - out.print(u.idx()); - out.print(' '); - } - } - out.print("]] "); - } - - public void dumpSpec(PrintStream out) { - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Node_Array.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Node_Array.java deleted file mode 100644 index 35b51cb5833..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Node_Array.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class Node_Array extends VMObject { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("Node_Array"); - maxField = new CIntField(type.getCIntegerField("_max"), 0); - nodesField = type.getAddressField("_nodes"); - aField = type.getAddressField("_a"); - } - - private static CIntField maxField; - private static AddressField nodesField; - private static AddressField aField; - - public Node_Array(Address addr) { - super(addr); - } - - public int Size() { - return (int) maxField.getValue(getAddress()); - } - - public Node at(int i) { - return Node.create(nodesField.getValue(getAddress()).getAddressAt(i * (int)VM.getVM().getAddressSize())); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Node_List.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Node_List.java deleted file mode 100644 index 50abdb75ad1..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Node_List.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class Node_List extends Node_Array { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("Node_List"); - cntField = new CIntField(type.getCIntegerField("_cnt"), 0); - } - - private static CIntField cntField; - - public Node_List(Address addr) { - super(addr); - } - - public int size() { - return (int) cntField.getValue(getAddress()); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Phase.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Phase.java deleted file mode 100644 index fe23efff73d..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/Phase.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class Phase extends VMObject { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("Phase"); - } - - - public Phase(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/PhaseCFG.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/PhaseCFG.java deleted file mode 100644 index c2561edbe40..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/PhaseCFG.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import java.io.PrintStream; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class PhaseCFG extends Phase { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("PhaseCFG"); - numBlocksField = new CIntField(type.getCIntegerField("_number_of_blocks"), 0); - blocksField = type.getAddressField("_blocks"); - bbsField = type.getAddressField("_node_to_block_mapping"); - brootField = type.getAddressField("_root_block"); - } - - private static CIntField numBlocksField; - private static AddressField blocksField; - private static AddressField bbsField; - private static AddressField brootField; - - public PhaseCFG(Address addr) { - super(addr); - } - - public void dump(PrintStream out) { - int addressSize = (int)VM.getVM().getAddressSize(); - int numBlocks = (int)numBlocksField.getValue(getAddress()); - Block_List blocks = new Block_List(getAddress().addOffsetTo(blocksField.getOffset())); - int offset = 0; - for (int i = 0; i < numBlocks; i++) { - blocks.at(i).dump(out); - } - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/PhaseRegAlloc.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/PhaseRegAlloc.java deleted file mode 100644 index 1d0f20b34c3..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/PhaseRegAlloc.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class PhaseRegAlloc extends Phase { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("PhaseRegAlloc"); - nodeRegsField = type.getAddressField("_node_regs"); - nodeRegsMaxIndexField = new CIntField(type.getCIntegerField("_node_regs_max_index"), 0); - framesizeField = new CIntField(type.getCIntegerField("_framesize"), 0); - maxRegField = new CIntField(type.getCIntegerField("_max_reg"), 0); - } - - private static AddressField nodeRegsField; - private static CIntField nodeRegsMaxIndexField; - private static CIntField framesizeField; - private static CIntField maxRegField; - - public PhaseRegAlloc(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/PhiNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/PhiNode.java deleted file mode 100644 index dce9ba1cac3..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/PhiNode.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class PhiNode extends TypeNode { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("PhiNode"); - } - - - public PhiNode(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/ProjNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/ProjNode.java deleted file mode 100644 index cd615b4bbfd..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/ProjNode.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class ProjNode extends Node { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("ProjNode"); - } - - - public ProjNode(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/RegionNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/RegionNode.java deleted file mode 100644 index 6c678c2a686..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/RegionNode.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class RegionNode extends Node { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("RegionNode"); - } - - - public RegionNode(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/RootNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/RootNode.java deleted file mode 100644 index 5a39af1388c..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/RootNode.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class RootNode extends LoopNode { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("RootNode"); - } - - - public RootNode(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/SafePointNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/SafePointNode.java deleted file mode 100644 index daea02a9601..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/SafePointNode.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.io.PrintStream; -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class SafePointNode extends MultiNode { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("SafePointNode"); - jvmsField = type.getAddressField("_jvms"); - } - - private static AddressField jvmsField; - - public SafePointNode(Address addr) { - super(addr); - } - - public JVMState jvms() { - return JVMState.create(jvmsField.getValue(getAddress())); - } - - public void dumpSpec(PrintStream out) { - JVMState jvms = jvms(); - if (jvms != null) out.print(" !"); - while (jvms != null) { - Method m = jvms.method().method(); - int bci = jvms.bci(); - out.print(" " + m.getMethodHolder().getName().asString().replace('/', '.') + "::" + m.getName().asString() + " @ bci:" + bci); - jvms = jvms.caller(); - } - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/TypeNode.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/TypeNode.java deleted file mode 100644 index 5c0e42cf21f..00000000000 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/opto/TypeNode.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2011, 2020, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package sun.jvm.hotspot.opto; - -import java.util.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.oops.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.Observable; -import sun.jvm.hotspot.utilities.Observer; - -public class TypeNode extends Node { - static { - VM.registerVMInitializedObserver(new Observer() { - public void update(Observable o, Object data) { - initialize(VM.getVM().getTypeDataBase()); - } - }); - } - - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("TypeNode"); - } - - - public TypeNode(Address addr) { - super(addr); - } -} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/CompilerThread.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/CompilerThread.java index e5c3ec30887..7e129827c52 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/CompilerThread.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/CompilerThread.java @@ -28,7 +28,6 @@ import java.io.*; import java.util.*; import sun.jvm.hotspot.debugger.*; import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.ci.*; import sun.jvm.hotspot.utilities.Observable; import sun.jvm.hotspot.utilities.Observer; @@ -43,23 +42,7 @@ public class CompilerThread extends JavaThread { private static AddressField envField; - private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { - Type type = db.lookupType("CompilerThread"); - - envField = type.getAddressField("_env"); - } - - private ciEnv _env; - - public synchronized ciEnv env() { - if (_env == null) { - Address v = envField.getValue(this.getAddress()); - if (v != null) { - _env = new ciEnv(v); - } - } - return _env; - } + private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { } public CompilerThread(Address addr) { super(addr); diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VM.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VM.java index 202217b6071..c558374d23c 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VM.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VM.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, 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 @@ -29,7 +29,6 @@ import java.net.*; import java.util.*; import java.util.regex.*; import sun.jvm.hotspot.code.*; -import sun.jvm.hotspot.c1.*; import sun.jvm.hotspot.code.*; import sun.jvm.hotspot.debugger.*; import sun.jvm.hotspot.interpreter.*; @@ -120,8 +119,6 @@ public class VM { private static int Flags_WAS_SET_ON_COMMAND_LINE; /** This is only present in a non-core build */ private CodeCache codeCache; - /** This is only present in a C1 build */ - private Runtime1 runtime1; /** These constants come from globalDefinitions.hpp */ private int invocationEntryBCI; private ReversePtrs revPtrs; @@ -479,7 +476,7 @@ public class VM { usingServerCompiler = false; } else { // Determine whether C2 is present - if (db.lookupType("Matcher", false) != null) { + if (db.lookupIntConstant("COMPILER2") != null) { usingServerCompiler = true; } else { usingClientCompiler = true; @@ -866,17 +863,6 @@ public class VM { return codeCache; } - /** Should only be called for C1 builds */ - public Runtime1 getRuntime1() { - if (Assert.ASSERTS_ENABLED) { - Assert.that(isClientCompiler(), "C1 builds only"); - } - if (runtime1 == null) { - runtime1 = new Runtime1(); - } - return runtime1; - } - /** Test to see whether we're in debugging mode (NOTE: this really should not be tested by this code; currently only used in StackFrameStream) */ diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VMReg.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VMReg.java index 31b2b969530..a3632058b6f 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VMReg.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VMReg.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, 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 @@ -38,9 +38,6 @@ import sun.jvm.hotspot.utilities.Observer; public class VMReg { private int value; - // C2 only - public static Address matcherRegEncodeAddr; - static { VM.registerVMInitializedObserver(new Observer() { public void update(Observable o, Object data) { @@ -49,13 +46,7 @@ public class VMReg { }); } - private static void initialize(TypeDataBase db) { - if (VM.getVM().isServerCompiler()) { - Type type = db.lookupType("Matcher"); - Field f = type.getField("_regEncode"); - matcherRegEncodeAddr = f.getStaticFieldAddress(); - } - } + private static void initialize(TypeDataBase db) { } public VMReg(int i) { value = i; @@ -65,13 +56,6 @@ public class VMReg { return value; } - public int regEncode() { - if (matcherRegEncodeAddr != null) { - return (int) matcherRegEncodeAddr.getCIntegerAt(value, 1, true); - } - return value; - } - public boolean equals(Object arg) { if ((arg != null) || (!(arg instanceof VMReg))) { return false; diff --git a/test/hotspot/jtreg/ProblemList.txt b/test/hotspot/jtreg/ProblemList.txt index f9ad5dbd1de..856a5381f90 100644 --- a/test/hotspot/jtreg/ProblemList.txt +++ b/test/hotspot/jtreg/ProblemList.txt @@ -43,7 +43,6 @@ # :hotspot_compiler -compiler/ciReplay/TestSAServer.java 8029528 generic-all compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java 8225370 generic-all compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java 8190680 generic-all diff --git a/test/hotspot/jtreg/compiler/ciReplay/SABase.java b/test/hotspot/jtreg/compiler/ciReplay/SABase.java deleted file mode 100644 index 66f2eb1106f..00000000000 --- a/test/hotspot/jtreg/compiler/ciReplay/SABase.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (c) 2016, 2023, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package compiler.ciReplay; - -import java.nio.file.Files; -import java.nio.file.Paths; -import java.io.BufferedReader; -import java.io.FileReader; -import java.io.IOException; -import java.io.File; -import java.io.FileInputStream; -import java.io.OutputStream; -import java.util.Arrays; -import jdk.test.lib.Platform; -import jdk.test.lib.Asserts; -import jdk.test.lib.JDKToolFinder; -import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.process.ProcessTools; - -public class SABase extends CiReplayBase { - private static final String REPLAY_FILE_COPY = "replay_vm.txt"; - - public static void main(String args[]) throws Exception { - checkSetLimits(); - SABase base = new SABase(args); - boolean c2 = base.runServer.orElseThrow(() -> new Error("runServer must be set")); - String[] extra = {}; - if (Platform.isTieredSupported()) { - if (c2) { - // Replay produced on first compilation. We want that - // compilation delayed so profile data is produced. - extra = new String[] {"-XX:-TieredCompilation"}; - } else { - extra = new String[] {"-XX:TieredStopAtLevel=1"}; - } - } - base.runTest(/* needCoreDump = */ true, extra); - } - - public SABase(String[] args) { - super(args); - } - - @Override - public void testAction() { - try { - Files.move(Paths.get(REPLAY_FILE_NAME), Paths.get(REPLAY_FILE_COPY)); - } catch (IOException ioe) { - throw new Error("Can't move files: " + ioe, ioe); - } - ProcessBuilder pb; - try { - pb = ProcessTools.createTestJavaProcessBuilder("--add-modules", "jdk.hotspot.agent", - "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot=ALL-UNNAMED", - "sun.jvm.hotspot.CLHSDB", JDKToolFinder.getTestJDKTool("java"), - TEST_CORE_FILE_NAME); - } catch (Exception e) { - throw new Error("Can't create process builder: " + e, e); - } - Process p; - try { - p = pb.start(); - } catch (IOException ioe) { - throw new Error("Can't start child process: " + ioe, ioe); - } - OutputStream input = p.getOutputStream(); - String str = "dumpreplaydata -a > " + REPLAY_FILE_NAME + "\nquit\n"; - try { - input.write(str.getBytes()); - input.flush(); - } catch (IOException ioe) { - throw new Error("Problem writing process input: " + str, ioe); - } - try { - p.waitFor(); - } catch (InterruptedException ie) { - throw new Error("Problem waitinig child process: " + ie, ie); - } - int exitValue = p.exitValue(); - if (exitValue != 0) { - String output; - try { - output = new OutputAnalyzer(p).getOutput(); - } catch (IOException ioe) { - throw new Error("Can't get failed CLHSDB process output: " + ioe, ioe); - } - throw new AssertionError("CLHSDB wasn't run successfully: " + output); - } - File replay = new File(REPLAY_FILE_NAME); - Asserts.assertTrue(replay.exists() && replay.isFile() && replay.length() > 0, - "Replay data wasn't generated by SA"); - // other than comment lines, content of 2 files should be identical - try { - BufferedReader rep = new BufferedReader(new FileReader(replay)); - BufferedReader repCopy = new BufferedReader(new FileReader(REPLAY_FILE_COPY)); - boolean failure = false; - while (true) { - String l1; - while ((l1 = rep.readLine()) != null) { - if (!l1.startsWith("#")) { - break; - } - } - String l2; - while ((l2 = repCopy.readLine()) != null) { - if (!l2.startsWith("#")) { - break; - } - } - if (l1 == null || l2 == null) { - if (l1 != null || l2 != null) { - System.out.println("Warning: replay files are not equal"); - System.out.println("1: " + l1); - System.out.println("2: " + l2); - failure = true; - } - break; - } - if (!l1.equals(l2)) { - System.out.println("Warning: replay files are not equal"); - System.out.println("1: " + l1); - System.out.println("2: " + l2); - failure = true; - } - } - if (failure) { - throw new RuntimeException("Warning: replay files are not equal"); - } - } catch (IOException ioe) { - throw new Error("Can't read replay files: " + ioe, ioe); - } - commonTests(); - runVmTests(); - } - - public static void checkSetLimits() { - if (!Platform.isWindows()) { - OutputAnalyzer oa; - try { - // first check if setting limit is possible - oa = ProcessTools.executeProcess("sh", "-c", RUN_SHELL_NO_LIMIT + "ulimit -c"); - } catch (Throwable t) { - throw new Error("Can't set limits: " + t, t); - } - oa.shouldHaveExitValue(0); - - String out = oa.getOutput().trim(); // cut win/*nix newlines - if (!out.equals("unlimited") && !out.equals("-1")) { - throw new Error("Unable to set limits"); - } - } - } -} - diff --git a/test/hotspot/jtreg/compiler/ciReplay/TestSAClient.java b/test/hotspot/jtreg/compiler/ciReplay/TestSAClient.java deleted file mode 100644 index a5a89d13c50..00000000000 --- a/test/hotspot/jtreg/compiler/ciReplay/TestSAClient.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2016, 2022, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/** - * @test - * @bug 8011675 - * @library / /test/lib - * @summary testing of ciReplay with using generated by SA replay.txt - * @requires vm.hasSA & vm.flightRecorder != true & vm.compMode != "Xint" & vm.debug == true & vm.flavor == "client" - * @modules java.base/jdk.internal.misc - * @build jdk.test.whitebox.WhiteBox - * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox - * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * compiler.ciReplay.SABase client - */ diff --git a/test/hotspot/jtreg/compiler/ciReplay/TestSAServer.java b/test/hotspot/jtreg/compiler/ciReplay/TestSAServer.java deleted file mode 100644 index 998f63e9ceb..00000000000 --- a/test/hotspot/jtreg/compiler/ciReplay/TestSAServer.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2016, 2022, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/** - * @test - * @bug 8011675 - * @library / /test/lib - * @summary testing of ciReplay with using generated by SA replay.txt - * @requires vm.hasSA & vm.flightRecorder != true & vm.compMode != "Xint" & vm.debug == true & vm.flavor == "server" - * @modules java.base/jdk.internal.misc - * @build jdk.test.whitebox.WhiteBox - * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox - * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * compiler.ciReplay.SABase server - */