8340113: Remove JULONG as a Diagnostic Command argument type (jcmd JFR.view)
Reviewed-by: lmesnik, egahlin
This commit is contained in:
parent
45e438f3f4
commit
19b2cee420
@ -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
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
|
@ -221,7 +221,7 @@ final class ArgumentParser {
|
||||
|
||||
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);
|
||||
@ -361,4 +361,4 @@ final class ArgumentParser {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ final class DCmdDump extends AbstractDCmd {
|
||||
'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
|
||||
|
@ -141,7 +141,7 @@ public final class DCmdQuery extends AbstractDCmd {
|
||||
|
||||
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
|
||||
@ -154,7 +154,7 @@ public final class DCmdQuery extends AbstractDCmd {
|
||||
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
|
||||
@ -170,7 +170,7 @@ public final class DCmdQuery extends AbstractDCmd {
|
||||
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), };
|
||||
}
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ final class DCmdStart extends AbstractDCmd {
|
||||
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
|
||||
@ -368,7 +368,7 @@ final class DCmdStart extends AbstractDCmd {
|
||||
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
|
||||
@ -385,7 +385,7 @@ final class DCmdStart extends AbstractDCmd {
|
||||
|
||||
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
|
||||
|
@ -108,9 +108,9 @@ public class DCmdView extends AbstractDCmd {
|
||||
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
|
||||
@ -127,7 +127,7 @@ public class DCmdView extends AbstractDCmd {
|
||||
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() {
|
||||
@ -136,7 +136,7 @@ public class DCmdView extends AbstractDCmd {
|
||||
|
||||
$ 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
|
||||
|
||||
@ -154,7 +154,7 @@ public class DCmdView extends AbstractDCmd {
|
||||
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),
|
||||
@ -172,7 +172,7 @@ public class DCmdView extends AbstractDCmd {
|
||||
"STRING", true, false, null, false),
|
||||
new Argument("width",
|
||||
"Maximum number of horizontal characters",
|
||||
"JULONG", false, true, "100", false)
|
||||
"INT", false, true, "100", false)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user