Skip to content

Commit

Permalink
8340113: Remove JULONG as a Diagnostic Command argument type (jcmd JF…
Browse files Browse the repository at this point in the history
…R.view)

Reviewed-by: lmesnik, egahlin
  • Loading branch information
kevinjwalls committed Sep 18, 2024
1 parent 45e438f commit 19b2cee
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 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
Expand Down Expand Up @@ -208,7 +208,7 @@ static DCmdArgument<MemorySizeArgument> _dcmd_globalbuffersize(
static DCmdArgument<jlong> _dcmd_numglobalbuffers(
"numglobalbuffers",
"Number of global buffers",
"JULONG",
"INT",
false,
default_num_global_buffers);

Expand All @@ -222,7 +222,7 @@ static DCmdArgument<MemorySizeArgument> _dcmd_maxchunksize(
static DCmdArgument<jlong> _dcmd_old_object_queue_size (
"old-object-queue-size",
"Maximum number of old objects to track",
"JINT",
"INT",
false,
default_old_object_queue_size);

Expand All @@ -245,7 +245,7 @@ static DCmdArgument<bool> _dcmd_sample_protection(
static DCmdArgument<jlong> _dcmd_stackdepth(
"stackdepth",
"Stack depth for stacktraces (minimum 1, maximum 2048)",
"JULONG",
"INT",
false,
default_stack_depth);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ private String readText(String abortChars) {

private Object value(String name, String type, String text) {
return switch (type) {
case "JULONG" -> parseLong(name, text);
case "INT" -> parseLong(name, text);
case "STRING", "STRING SET" -> text == null ? "" : text;
case "BOOLEAN" -> parseBoolean(name, text);
case "NANOTIME" -> parseNanotime(name, text);
Expand Down Expand Up @@ -361,4 +361,4 @@ void checkSpelling(Set<String> excludeSet) {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public String[] getHelp() {
'yyyy_MM_dd_HH_mm_ss' format.
maxage (Optional) Length of time for dumping the flight recording data to a
file. (INTEGER followed by 's' for seconds 'm' for minutes or 'h' for
file. (INT followed by 's' for seconds 'm' for minutes or 'h' for
hours, no default value)
maxsize (Optional) Maximum size for the amount of data to dump from a flight
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private String getOptions() {
Options:
maxage (Optional) Length of time for the query to span. (INTEGER followed by
maxage (Optional) Length of time for the query to span. (INT followed by
's' for seconds 'm' for minutes or 'h' for hours, no default value)
maxsize (Optional) Maximum size for the query to span in bytes if one of
Expand All @@ -154,7 +154,7 @@ private String getOptions() {
verbose (Optional) Display additional information about the query execution.
(BOOLEAN, false)
width (Optional) Maximum number of horizontal characters. (BOOLEAN, false)""";
width (Optional) Maximum number of horizontal characters. (INT, default value is 100)""";
}

@Override
Expand All @@ -170,7 +170,7 @@ public Argument[] getArgumentInfos() {
null, false),
new Argument("verbose", "Display additional information about the query execution", "BOOLEAN", false,
true, "false", false),
new Argument("width", "Maximum number of horizontal characters", "JULONG", false, true, "100",
new Argument("width", "Maximum number of horizontal characters", "INT", false, true, "100",
false), };
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ private static String helpTemplate() {
Options:
delay (Optional) Length of time to wait before starting to record
(INTEGER followed by 's' for seconds 'm' for minutes or h' for
(INT followed by 's' for seconds 'm' for minutes or h' for
hours, 0s)
disk (Optional) Flag for also writing the data to disk while recording
Expand All @@ -368,7 +368,7 @@ Virtual Machine (JVM) shuts down. If set to 'true' and no value
id-1-2021_09_14_09_00.jfr) (BOOLEAN, false)
duration (Optional) Length of time to record. Note that 0s means forever
(INTEGER followed by 's' for seconds 'm' for minutes or 'h' for
(INT followed by 's' for seconds 'm' for minutes or 'h' for
hours, 0s)
filename (Optional) Name of the file to which the flight recording data is
Expand All @@ -385,7 +385,7 @@ Virtual Machine (JVM) shuts down. If set to 'true' and no value
maxage (Optional) Maximum time to keep the recorded data on disk. This
parameter is valid only when the disk parameter is set to true.
Note 0s means forever. (INTEGER followed by 's' for seconds 'm'
Note 0s means forever. (INT followed by 's' for seconds 'm'
for minutes or 'h' for hours, 0s)
maxsize (Optional) Maximum size of the data to keep on disk in bytes if
Expand Down
12 changes: 6 additions & 6 deletions src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdView.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ public String getOptions() {
return """
Options:
cell-height (Optional) Maximum number of rows in a table cell. (INTEGER, no default value)
cell-height (Optional) Maximum number of rows in a table cell. (INT, no default value)
maxage (Optional) Length of time for the view to span. (INTEGER followed by
maxage (Optional) Length of time for the view to span. (INT followed by
's' for seconds 'm' for minutes or 'h' for hours, default value is 10m)
maxsize (Optional) Maximum size for the view to span in bytes if one of
Expand All @@ -127,7 +127,7 @@ public String getOptions() {
See list below for available views. (STRING, no default value)
width (Optional) The width of the view in characters
(INTEGER, no default value)""";
(INT, default value is 100)""";
}

public String getExamples() {
Expand All @@ -136,7 +136,7 @@ public String getExamples() {
$ jcmd <pid> JFR.view gc
$ jcmd <pid< JFR.view width=160 hot-methods
$ jcmd <pid> JFR.view width=160 hot-methods
$ jcmd <pid> JFR.view verbose=true allocation-by-class
Expand All @@ -154,7 +154,7 @@ public Argument[] getArgumentInfos() {
return new Argument[] {
new Argument("cell-height",
"Maximum heigth of a table cell",
"JULONG", false, true, "1", false),
"INT", false, true, "1", false),
new Argument("maxage",
"Maximum duration of data to view, in (s)econds, (m)inutes, (h)ours, or (d)ays, e.g. 60m, or 0 for no limit",
"NANOTIME", false, true, "10m", false),
Expand All @@ -172,7 +172,7 @@ public Argument[] getArgumentInfos() {
"STRING", true, false, null, false),
new Argument("width",
"Maximum number of horizontal characters",
"JULONG", false, true, "100", false)
"INT", false, true, "100", false)
};
}
}

0 comments on commit 19b2cee

Please sign in to comment.