Skip to content

Commit 7ec76bc

Browse files
committed
Merge branch 'master' into release21
2 parents ca67851 + 0fa6a00 commit 7ec76bc

File tree

6 files changed

+14
-17
lines changed

6 files changed

+14
-17
lines changed

visualvm/heapviewer.truffle/src/org/graalvm/visualvm/heapviewer/truffle/ui/TruffleObjectsView.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ protected static enum Aggregation {
105105

106106
private ProfilerToolbar toolbar;
107107
private final PluggableTreeTableView objectsView;
108+
private JComponent component;
108109

109110
private Preset preset = Preset.ALL_OBJECTS;
110111
private Aggregation aggregation = Aggregation.TYPES;
@@ -153,11 +154,12 @@ protected HeapViewerNode[] computeData(RootNode root, Heap heap, String viewID,
153154
}
154155
}
155156
protected JComponent createComponent() {
156-
JComponent comp = super.createComponent();
157-
158-
setFilterComponent(FilterUtils.createFilterPanel(this));
157+
if (component == null) {
158+
component = super.createComponent();
159+
setFilterComponent(FilterUtils.createFilterPanel(this));
160+
}
159161

160-
return comp;
162+
return component;
161163
}
162164
};
163165
}
@@ -331,6 +333,7 @@ synchronized void setAggregation(Aggregation aggregation) {
331333

332334
if (objectsInvolved) {
333335
// TODO: having Count visible for Instances aggregation resets the column width!
336+
objectsView.getComponent(); // Make sure objectsView is initialized before accessing its columns
334337
boolean countVisible = objectsView.isColumnVisible(DataType.COUNT);
335338
if (Aggregation.OBJECTS.equals(aggregation)) {
336339
countVisible1 = countVisible;

visualvm/heapviewer/src/org/graalvm/visualvm/heapviewer/ui/TreeTableView.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,15 @@ public void setColumnVisible(DataType dataType, boolean visible) {
278278
int column = getColumn(dataType);
279279
if (column == -1) return;
280280

281+
if (treeTable == null) return;
281282
treeTable.setColumnVisibility(column, visible);
282283
}
283284

284285
public boolean isColumnVisible(DataType dataType) {
285286
int column = getColumn(dataType);
286287
if (column == -1) return false;
287288

289+
if (treeTable == null) return true; // assume initially visible
288290
return treeTable.isColumnVisible(column);
289291
}
290292

visualvm/profiler/src/org/graalvm/visualvm/profiler/ApplicationProfilerView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ protected void showURL(URL url) {
811811
jdbcButton = new OneWayToggleButton(NbBundle.getMessage(ApplicationProfilerView.class, "LBL_JDBC")); // NOI18N
812812
jdbcButton.setIcon(new ImageIcon(ImageUtilities.loadImage("org/graalvm/visualvm/profiler/resources/jdbc.png", true))); // NOI18N
813813
jdbcButton.addActionListener(new ActionListener() {
814-
public void actionPerformed(ActionEvent e) { handleLocksProfiling(); }
814+
public void actionPerformed(ActionEvent e) { handleJDBCProfiling(); }
815815
});
816816
constraints = new GridBagConstraints();
817817
constraints.gridx = 4;

visualvm/sampler.truffle/src/org/graalvm/visualvm/sampler/truffle/Bundle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ MSG_Press_mem=Press the 'Memory' button to start collecting memory data.
105105

106106
MSG_Unavailable=Not available.
107107

108+
MSG_unavailable_init_jmx=Not available. Cannot initialize JMX connection to target application. Use 'Add JMX Connection' action to attach to the application.
109+
110+
MSG_unavailable_create_jmx=Not available. Failed to create JMX connection to target application. Use 'Add JMX Connection' action to attach to the application.
111+
108112
MSG_Unavailable_remote=Not available. Remote sampling is only supported for Java 8+ applications.
109113

110114
MSG_Unavailable_connect_jdk=Not available. Cannot connect to target application. Make sure the application is running on a supported Java 6+.

visualvm/sampler.truffle/src/org/graalvm/visualvm/sampler/truffle/cpu/Bundle.properties

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ TOOLTIP_Thread_dump=Take thread dump
4444

4545
LBL_No_data=<No Data>
4646

47-
MSG_unavailable=Not available.
48-
49-
MSG_unavailable_init_jmx=Not available. Cannot initialize JMX connection to target application. Use 'Add JMX Connection' action to attach to the application.
50-
51-
MSG_unavailable_create_jmx=Not available. Failed to create JMX connection to target application. Use 'Add JMX Connection' action to attach to the application.
52-
5347
MSG_unavailable_threads=Not available. Cannot access truffle JMX in target application. Check the VisualVM logfile ({0}).
5448

5549
MSG_unavailable_stacktraces=Not available. StackTraces instrument is not available. Please start your application with --stacktraces commandline option.

visualvm/sampler.truffle/src/org/graalvm/visualvm/sampler/truffle/memory/Bundle.properties

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,6 @@ MemoryView_LBL_Data=Collected data\:
6868
MemoryView_LBL_Snapshot=Snapshot
6969
MemoryView_Context_GoToSource=Go to Source
7070

71-
MSG_unavailable=Not available.
72-
73-
MSG_unavailable_init_jmx=Not available. Cannot initialize JMX connection to target application. Use 'Add JMX Connection' action to attach to the application.
74-
75-
MSG_unavailable_create_jmx=Not available. Failed to create JMX connection to target application. Use 'Add JMX Connection' action to attach to the application.
76-
7771
MSG_unavailable_threads=Not available. Cannot access truffle JMX in target application. Check the VisualVM logfile ({0}).
7872

7973
MSG_unavailable_heaphisto=Not available. Heap histogram instrument is not available. Please start your application with --heaphisto commandline option.

0 commit comments

Comments
 (0)