File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
visualvm/jfr.generic/src/org/graalvm/visualvm/jfr/generic/model/impl Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -78,7 +78,8 @@ private IAccessorKey computeNext() {
78
78
}
79
79
80
80
private boolean isDisplayable (IAccessorKey key ) {
81
- return !ID_STACKTRACE .equals (key .getIdentifier ());
81
+ if (ID_STACKTRACE .equals (key .getIdentifier ())) return false ;
82
+ return includeExperimental || !isExperimental (key );
82
83
}
83
84
};
84
85
}
@@ -94,6 +95,13 @@ static JFRDataDescriptor getDataDescriptor(IAccessorKey key) {
94
95
}
95
96
96
97
98
+ private static boolean isExperimental (IAccessorKey key ) {
99
+ // TODO: should be turned into regexp and test matching, not startsWith!
100
+ String accessorName = TypeHandling .getValueString (key );
101
+ return accessorName .startsWith (JFRGenericEventType .EXPERIMENTAL_PREFIX );
102
+ }
103
+
104
+
97
105
private DisplayableSupport () {}
98
106
99
107
Original file line number Diff line number Diff line change 41
41
*/
42
42
final class JFRGenericEventType extends JFREventType {
43
43
44
- private static final String EXPERIMENTAL_PREFIX = Messages .getString (Messages .TypeManager_EXPERIMENTAL_TYPE ).replace ("{0}" , "" ).trim (); // NOI18N
44
+ static final String EXPERIMENTAL_PREFIX = Messages .getString (Messages .TypeManager_EXPERIMENTAL_TYPE ).replace ("{0}" , "" ).trim (); // NOI18N
45
45
46
46
47
47
private final long typeId ;
You can’t perform that action at this time.
0 commit comments