8309928: JFR: View issues

Reviewed-by: mgronlun
This commit is contained in:
Erik Gahlin 2023-06-14 12:26:51 +00:00
parent 9872a14192
commit 84d010a24b
3 changed files with 4 additions and 6 deletions

View File

@ -74,7 +74,7 @@ abstract class Function {
}
if (aggregator == Aggregator.P90) {
return createPercentile(field, 0.95);
return createPercentile(field, 0.90);
}
if (aggregator == Aggregator.P95) {

View File

@ -102,7 +102,7 @@ public final class View extends Command {
public List<String> getOptionSyntax() {
List<String> list = new ArrayList<>();
list.add("[--verbose]");
list.add("[--width <integer>");
list.add("[--width <integer>]");
list.add("[--truncate <mode>]");
list.add("[--cell-height <integer>]");
list.add("<view>");
@ -138,7 +138,7 @@ public final class View extends Command {
if (acceptOption(options, "--width")) {
configuration.width = acceptInt(options, "width");
}
if (options.size() == 1) {
if (options.size() == 1 && !options.peek().startsWith("-")) {
String view = options.pop();
try (EventStream stream = EventStream.openFile(file)) {
ViewPrinter vp = new ViewPrinter(configuration, stream);
@ -149,8 +149,6 @@ public final class View extends Command {
couldNotReadError(file, ioe);
}
}
System.out.println("count:" + optionCount);
System.out.println("size:" + options.size());
if (optionCount == options.size()) {
String peek = options.peek();
if (peek == null) {

View File

@ -37,7 +37,7 @@ import jdk.test.lib.process.OutputAnalyzer;
* & vm.opt.ExplicitGCInvokesConcurrent != false
* @library /test/lib /test/jdk
* @run main/othervm -XX:-ExplicitGCInvokesConcurrent -XX:-DisableExplicitGC
* -XX:+UseG1GC jdk.jfr.jcmd.TestJcmdView
* -XX:+UseG1GC jdk.jfr.tool.TestView
*/
public class TestView {