diff --git a/src/hotspot/share/services/mallocLimit.cpp b/src/hotspot/share/nmt/mallocLimit.cpp similarity index 99% rename from src/hotspot/share/services/mallocLimit.cpp rename to src/hotspot/share/nmt/mallocLimit.cpp index de3e8e872ee..746c3b9201b 100644 --- a/src/hotspot/share/services/mallocLimit.cpp +++ b/src/hotspot/share/nmt/mallocLimit.cpp @@ -24,11 +24,11 @@ */ #include "precompiled.hpp" +#include "nmt/mallocLimit.hpp" #include "nmt/memflags.hpp" #include "nmt/nmtCommon.hpp" #include "runtime/java.hpp" #include "runtime/globals.hpp" -#include "services/mallocLimit.hpp" #include "utilities/globalDefinitions.hpp" #include "utilities/parseInteger.hpp" #include "utilities/ostream.hpp" diff --git a/src/hotspot/share/services/mallocLimit.hpp b/src/hotspot/share/nmt/mallocLimit.hpp similarity index 97% rename from src/hotspot/share/services/mallocLimit.hpp rename to src/hotspot/share/nmt/mallocLimit.hpp index 281cfa51396..2034e3ce24b 100644 --- a/src/hotspot/share/services/mallocLimit.hpp +++ b/src/hotspot/share/nmt/mallocLimit.hpp @@ -26,6 +26,7 @@ #ifndef SHARE_SERVICES_MALLOCLIMIT_HPP #define SHARE_SERVICES_MALLOCLIMIT_HPP +#include "memory/allStatic.hpp" #include "nmt/memflags.hpp" #include "utilities/debug.hpp" #include "utilities/globalDefinitions.hpp" @@ -40,6 +41,9 @@ struct malloclimit { MallocLimitMode mode; // Behavior flags }; +// forward declaration +class outputStream; + class MallocLimitSet { malloclimit _glob; // global limit malloclimit _cat[mt_number_of_types]; // per-category limit diff --git a/src/hotspot/share/nmt/mallocTracker.cpp b/src/hotspot/share/nmt/mallocTracker.cpp index 9b55202cbd5..ab323b3bae6 100644 --- a/src/hotspot/share/nmt/mallocTracker.cpp +++ b/src/hotspot/share/nmt/mallocTracker.cpp @@ -1,7 +1,7 @@ /* - * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, 2023 SAP SE. All rights reserved. - * Copyright (c) 2023, Red Hat, Inc. and/or its affiliates. + * Copyright (c) 2023, 2024, Red Hat, Inc. and/or its affiliates. * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -30,6 +30,7 @@ #include "logging/log.hpp" #include "logging/logStream.hpp" #include "nmt/mallocHeader.inline.hpp" +#include "nmt/mallocLimit.hpp" #include "nmt/mallocSiteTable.hpp" #include "nmt/mallocTracker.hpp" #include "nmt/memTracker.hpp" @@ -38,7 +39,6 @@ #include "runtime/globals.hpp" #include "runtime/os.hpp" #include "runtime/safefetch.hpp" -#include "services/mallocLimit.hpp" #include "utilities/debug.hpp" #include "utilities/macros.hpp" #include "utilities/ostream.hpp" diff --git a/src/hotspot/share/nmt/mallocTracker.inline.hpp b/src/hotspot/share/nmt/mallocTracker.inline.hpp index f226d56bc3d..243f965a382 100644 --- a/src/hotspot/share/nmt/mallocTracker.inline.hpp +++ b/src/hotspot/share/nmt/mallocTracker.inline.hpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2023 SAP SE. All rights reserved. - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2024, 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 @@ -26,8 +26,8 @@ #ifndef SHARE_NMT_MALLOCTRACKER_INLINE_HPP #define SHARE_NMT_MALLOCTRACKER_INLINE_HPP +#include "nmt/mallocLimit.hpp" #include "nmt/mallocTracker.hpp" -#include "services/mallocLimit.hpp" #include "utilities/debug.hpp" #include "utilities/globalDefinitions.hpp" diff --git a/src/hotspot/share/nmt/memTracker.cpp b/src/hotspot/share/nmt/memTracker.cpp index 955bd816737..7c02ac8dbb2 100644 --- a/src/hotspot/share/nmt/memTracker.cpp +++ b/src/hotspot/share/nmt/memTracker.cpp @@ -27,6 +27,7 @@ #include "logging/log.hpp" #include "logging/logStream.hpp" #include "memory/metaspaceUtils.hpp" +#include "nmt/mallocLimit.hpp" #include "nmt/mallocTracker.hpp" #include "nmt/memBaseline.hpp" #include "nmt/memReporter.hpp" @@ -39,7 +40,6 @@ #include "runtime/orderAccess.hpp" #include "runtime/vmOperations.hpp" #include "runtime/vmThread.hpp" -#include "services/mallocLimit.hpp" #include "utilities/debug.hpp" #include "utilities/defaultStream.hpp" #include "utilities/vmError.hpp" diff --git a/test/hotspot/gtest/nmt/test_nmt_malloclimit.cpp b/test/hotspot/gtest/nmt/test_nmt_malloclimit.cpp index 003063144f3..7f6000b1212 100644 --- a/test/hotspot/gtest/nmt/test_nmt_malloclimit.cpp +++ b/test/hotspot/gtest/nmt/test_nmt_malloclimit.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2023 SAP SE. All rights reserved. - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2024, 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 @@ -24,10 +24,10 @@ #include "precompiled.hpp" #include "memory/allocation.hpp" +#include "nmt/mallocLimit.hpp" #include "nmt/memTracker.hpp" #include "nmt/nmtCommon.hpp" #include "runtime/os.hpp" -#include "services/mallocLimit.hpp" #include "utilities/debug.hpp" #include "utilities/globalDefinitions.hpp" #include "utilities/ostream.hpp"