Skip to content

Commit

Permalink
8277946: NMT: Remove VM.native_memory shutdown jcmd command option
Browse files Browse the repository at this point in the history
Reviewed-by: mbaesken
Backport-of: abaa073bcbdb202658c8a97401ffb098d71e0f16
  • Loading branch information
tstuefe committed Jan 26, 2023
1 parent d3c93e7 commit 229288b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 124 deletions.
6 changes: 2 additions & 4 deletions src/hotspot/share/services/nmtDCmd.cpp
Expand Up @@ -50,8 +50,7 @@ NMTDCmd::NMTDCmd(outputStream* output,
"comparison against previous baseline, which shows the memory " \
"allocation activities at different callsites.",
"BOOLEAN", false, "false"),
_shutdown("shutdown", "request runtime to shutdown itself and free the " \
"memory used by runtime.",
_shutdown("shutdown", "deprecated.",
"BOOLEAN", false, "false"),
_statistics("statistics", "print tracker statistics for tuning purpose.", \
"BOOLEAN", false, "false"),
Expand Down Expand Up @@ -148,8 +147,7 @@ void NMTDCmd::execute(DCmdSource source, TRAPS) {
output()->print_cr("No detail baseline for comparison");
}
} else if (_shutdown.value()) {
MemTracker::shutdown();
output()->print_cr("Native memory tracking has been turned off");
output()->print_cr("This option is deprecated and will be ignored.");
} else if (_statistics.value()) {
if (check_detail_tracking_level(output())) {
MemTracker::tuning_statistics(output());
Expand Down
3 changes: 1 addition & 2 deletions test/hotspot/jtreg/runtime/NMT/JcmdWithNMTDisabled.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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
Expand Down Expand Up @@ -72,7 +72,6 @@ public static void main(String args[]) throws Exception {
jcmdCommand("summary.diff");
jcmdCommand("detail.diff");
jcmdCommand("scale=GB");
jcmdCommand("shutdown");
}

// Helper method for invoking different jcmd calls, all should fail with the same message saying NMT is not enabled
Expand Down
59 changes: 0 additions & 59 deletions test/hotspot/jtreg/runtime/NMT/ShutdownTwice.java

This file was deleted.

59 changes: 0 additions & 59 deletions test/hotspot/jtreg/runtime/NMT/SummaryAfterShutdown.java

This file was deleted.

1 comment on commit 229288b

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.