Skip to content

Commit 19b2cee

Browse files
committed
8340113: Remove JULONG as a Diagnostic Command argument type (jcmd JFR.view)
Reviewed-by: lmesnik, egahlin
1 parent 45e438f commit 19b2cee

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -208,7 +208,7 @@ static DCmdArgument<MemorySizeArgument> _dcmd_globalbuffersize(
208208
static DCmdArgument<jlong> _dcmd_numglobalbuffers(
209209
"numglobalbuffers",
210210
"Number of global buffers",
211-
"JULONG",
211+
"INT",
212212
false,
213213
default_num_global_buffers);
214214

@@ -222,7 +222,7 @@ static DCmdArgument<MemorySizeArgument> _dcmd_maxchunksize(
222222
static DCmdArgument<jlong> _dcmd_old_object_queue_size (
223223
"old-object-queue-size",
224224
"Maximum number of old objects to track",
225-
"JINT",
225+
"INT",
226226
false,
227227
default_old_object_queue_size);
228228

@@ -245,7 +245,7 @@ static DCmdArgument<bool> _dcmd_sample_protection(
245245
static DCmdArgument<jlong> _dcmd_stackdepth(
246246
"stackdepth",
247247
"Stack depth for stacktraces (minimum 1, maximum 2048)",
248-
"JULONG",
248+
"INT",
249249
false,
250250
default_stack_depth);
251251

src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/ArgumentParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ private String readText(String abortChars) {
221221

222222
private Object value(String name, String type, String text) {
223223
return switch (type) {
224-
case "JULONG" -> parseLong(name, text);
224+
case "INT" -> parseLong(name, text);
225225
case "STRING", "STRING SET" -> text == null ? "" : text;
226226
case "BOOLEAN" -> parseBoolean(name, text);
227227
case "NANOTIME" -> parseNanotime(name, text);
@@ -361,4 +361,4 @@ void checkSpelling(Set<String> excludeSet) {
361361
}
362362
}
363363
}
364-
}
364+
}

src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdDump.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public String[] getHelp() {
237237
'yyyy_MM_dd_HH_mm_ss' format.
238238
239239
maxage (Optional) Length of time for dumping the flight recording data to a
240-
file. (INTEGER followed by 's' for seconds 'm' for minutes or 'h' for
240+
file. (INT followed by 's' for seconds 'm' for minutes or 'h' for
241241
hours, no default value)
242242
243243
maxsize (Optional) Maximum size for the amount of data to dump from a flight

src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdQuery.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private String getOptions() {
141141
142142
Options:
143143
144-
maxage (Optional) Length of time for the query to span. (INTEGER followed by
144+
maxage (Optional) Length of time for the query to span. (INT followed by
145145
's' for seconds 'm' for minutes or 'h' for hours, no default value)
146146
147147
maxsize (Optional) Maximum size for the query to span in bytes if one of
@@ -154,7 +154,7 @@ private String getOptions() {
154154
verbose (Optional) Display additional information about the query execution.
155155
(BOOLEAN, false)
156156
157-
width (Optional) Maximum number of horizontal characters. (BOOLEAN, false)""";
157+
width (Optional) Maximum number of horizontal characters. (INT, default value is 100)""";
158158
}
159159

160160
@Override
@@ -170,7 +170,7 @@ public Argument[] getArgumentInfos() {
170170
null, false),
171171
new Argument("verbose", "Display additional information about the query execution", "BOOLEAN", false,
172172
true, "false", false),
173-
new Argument("width", "Maximum number of horizontal characters", "JULONG", false, true, "100",
173+
new Argument("width", "Maximum number of horizontal characters", "INT", false, true, "100",
174174
false), };
175175
}
176176
}

src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStart.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ private static String helpTemplate() {
353353
Options:
354354
355355
delay (Optional) Length of time to wait before starting to record
356-
(INTEGER followed by 's' for seconds 'm' for minutes or h' for
356+
(INT followed by 's' for seconds 'm' for minutes or h' for
357357
hours, 0s)
358358
359359
disk (Optional) Flag for also writing the data to disk while recording
@@ -368,7 +368,7 @@ Virtual Machine (JVM) shuts down. If set to 'true' and no value
368368
id-1-2021_09_14_09_00.jfr) (BOOLEAN, false)
369369
370370
duration (Optional) Length of time to record. Note that 0s means forever
371-
(INTEGER followed by 's' for seconds 'm' for minutes or 'h' for
371+
(INT followed by 's' for seconds 'm' for minutes or 'h' for
372372
hours, 0s)
373373
374374
filename (Optional) Name of the file to which the flight recording data is
@@ -385,7 +385,7 @@ Virtual Machine (JVM) shuts down. If set to 'true' and no value
385385
386386
maxage (Optional) Maximum time to keep the recorded data on disk. This
387387
parameter is valid only when the disk parameter is set to true.
388-
Note 0s means forever. (INTEGER followed by 's' for seconds 'm'
388+
Note 0s means forever. (INT followed by 's' for seconds 'm'
389389
for minutes or 'h' for hours, 0s)
390390
391391
maxsize (Optional) Maximum size of the data to keep on disk in bytes if

src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdView.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ public String getOptions() {
108108
return """
109109
Options:
110110
111-
cell-height (Optional) Maximum number of rows in a table cell. (INTEGER, no default value)
111+
cell-height (Optional) Maximum number of rows in a table cell. (INT, no default value)
112112
113-
maxage (Optional) Length of time for the view to span. (INTEGER followed by
113+
maxage (Optional) Length of time for the view to span. (INT followed by
114114
's' for seconds 'm' for minutes or 'h' for hours, default value is 10m)
115115
116116
maxsize (Optional) Maximum size for the view to span in bytes if one of
@@ -127,7 +127,7 @@ public String getOptions() {
127127
See list below for available views. (STRING, no default value)
128128
129129
width (Optional) The width of the view in characters
130-
(INTEGER, no default value)""";
130+
(INT, default value is 100)""";
131131
}
132132

133133
public String getExamples() {
@@ -136,7 +136,7 @@ public String getExamples() {
136136
137137
$ jcmd <pid> JFR.view gc
138138
139-
$ jcmd <pid< JFR.view width=160 hot-methods
139+
$ jcmd <pid> JFR.view width=160 hot-methods
140140
141141
$ jcmd <pid> JFR.view verbose=true allocation-by-class
142142
@@ -154,7 +154,7 @@ public Argument[] getArgumentInfos() {
154154
return new Argument[] {
155155
new Argument("cell-height",
156156
"Maximum heigth of a table cell",
157-
"JULONG", false, true, "1", false),
157+
"INT", false, true, "1", false),
158158
new Argument("maxage",
159159
"Maximum duration of data to view, in (s)econds, (m)inutes, (h)ours, or (d)ays, e.g. 60m, or 0 for no limit",
160160
"NANOTIME", false, true, "10m", false),
@@ -172,7 +172,7 @@ public Argument[] getArgumentInfos() {
172172
"STRING", true, false, null, false),
173173
new Argument("width",
174174
"Maximum number of horizontal characters",
175-
"JULONG", false, true, "100", false)
175+
"INT", false, true, "100", false)
176176
};
177177
}
178178
}

0 commit comments

Comments
 (0)