Skip to content

Commit 0141d68

Browse files
authored
Merge pull request #137 from SAP/pr-9c5aedab96398e070c281fe9e1366bf3837451d4-sap
sap: Merge 9c5aeda
2 parents a1c2f07 + 9c5aeda commit 0141d68

File tree

23 files changed

+270
-26
lines changed

23 files changed

+270
-26
lines changed

application/org.openjdk.jmc.flightrecorder.metadata/src/main/java/org/openjdk/jmc/flightrecorder/metadata/MetadataPage.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
import org.openjdk.jmc.flightrecorder.ui.common.AbstractDataPage;
6464
import org.openjdk.jmc.flightrecorder.ui.common.DataPageToolkit;
6565
import org.openjdk.jmc.flightrecorder.ui.common.LabeledPageFactory;
66+
import org.openjdk.jmc.flightrecorder.ui.common.TreeExpandCollapseSupport;
6667
import org.openjdk.jmc.flightrecorder.ui.common.TypeLabelProvider;
6768
import org.openjdk.jmc.ui.TypeAppearance;
6869
import org.openjdk.jmc.ui.column.ColumnBuilder;
@@ -179,7 +180,7 @@ public class MetadataUi implements IPageUI {
179180
MCContextMenuManager mm = MCContextMenuManager.create(viewer.getControl());
180181
ColumnMenusFactory.addDefaultMenus(attributeTable, mm);
181182
ColumnViewerToolTipSupport.enableFor(viewer);
182-
183+
TreeExpandCollapseSupport.installFor(viewer);
183184
viewer.setContentProvider(new MetadataContentProvider());
184185
ColumnViewerToolTipSupport.enableFor(viewer);
185186
Text tableFilter = ColumnsFilter.addFilterControl(formBody, toolkit, attributeTable);

application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/common/DataPageToolkit.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,11 @@ public Color getColor(IItem item) {
198198

199199
// FIXME: Handle ColorProvider and combined events
200200
Map<String, Integer> columnsOrderMap = new HashMap<>();
201-
columnsOrderMap.put(createColumnId(JfrAttributes.START_TIME), 1);
202-
columnsOrderMap.put(createColumnId(JfrAttributes.DURATION), 2);
203-
columnsOrderMap.put(createColumnId(JfrAttributes.END_TIME), 3);
204-
columnsOrderMap.put(createColumnId(JfrAttributes.EVENT_THREAD), 4);
201+
columnsOrderMap.put(createColumnId(JfrAttributes.EVENT_TYPE), 1);
202+
columnsOrderMap.put(createColumnId(JfrAttributes.START_TIME), 2);
203+
columnsOrderMap.put(createColumnId(JfrAttributes.DURATION), 3);
204+
columnsOrderMap.put(createColumnId(JfrAttributes.END_TIME), 4);
205+
columnsOrderMap.put(createColumnId(JfrAttributes.EVENT_THREAD), 5);
205206
DEFAULT_COLUMNS_ORDER = Collections.unmodifiableMap(columnsOrderMap);
206207
}
207208

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
3+
*
4+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5+
*
6+
* The contents of this file are subject to the terms of either the Universal Permissive License
7+
* v 1.0 as shown at https://oss.oracle.com/licenses/upl
8+
*
9+
* or the following license:
10+
*
11+
* Redistribution and use in source and binary forms, with or without modification, are permitted
12+
* provided that the following conditions are met:
13+
*
14+
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions
15+
* and the following disclaimer.
16+
*
17+
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of
18+
* conditions and the following disclaimer in the documentation and/or other materials provided with
19+
* the distribution.
20+
*
21+
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to
22+
* endorse or promote products derived from this software without specific prior written permission.
23+
*
24+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
25+
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
26+
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
27+
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
30+
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
31+
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32+
*/
33+
34+
package org.openjdk.jmc.flightrecorder.ui.common;
35+
36+
import org.eclipse.jface.viewers.IStructuredSelection;
37+
import org.eclipse.jface.viewers.TreeViewer;
38+
39+
/**
40+
* Enables double-click and enter key press to expand or collapse tree nodes.
41+
*/
42+
public final class TreeExpandCollapseSupport {
43+
44+
/**
45+
* Private since we don't want any instances.
46+
*/
47+
private TreeExpandCollapseSupport() {
48+
}
49+
50+
/**
51+
* Installs a handler for both double click and enter key press.
52+
*
53+
* @param viewer
54+
* the TreeViewer to update
55+
*/
56+
public static void installFor(TreeViewer viewer) {
57+
viewer.addDoubleClickListener(event -> {
58+
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
59+
if (!selection.isEmpty()) {
60+
Object element = selection.getFirstElement();
61+
if (element != null) {
62+
boolean isExpanded = viewer.getExpandedState(element);
63+
viewer.setExpandedState(element, !isExpanded);
64+
}
65+
}
66+
});
67+
}
68+
}

application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/common/TypeLabelProvider.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ public static Color getColor(String typeId) {
141141
return new Color(0x000096);
142142
case JdkTypeIDs.THREAD_DUMP:
143143
return new Color(0xFFA800);
144+
case JdkTypeIDs.TENURING_DISTRIBUTION:
145+
return new Color(0x4682B4);
144146
default:
145147
// "http://www.oracle.com/hotspot/jvm/vm/gc/collector/old_garbage_collection" -> new Color(0x800000);
146148
// "http://www.oracle.com/hotspot/jvm/vm/gc/collector/young_garbage_collection" -> new Color(0xFF8080);

application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/messages/internal/Messages.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ public class Messages extends NLS {
240240
public static String GarbageCollectionsPage_PAGE_NAME;
241241
public static String GarbageCollectionsPage_PAUSE_PHASES_TITLE;
242242
public static String GarbageCollectionsPage_PAUSE_PHASE_SELECTION;
243+
public static String GarbageCollectionsPage_TENURING_DISTRIBUTION_TITLE;
244+
public static String GarbageCollectionsPage_TENURING_DISTRIBUTION_NO_EVENTS_MESSAGE;
245+
public static String GarbageCollectionsPage_TENURING_DISTRIBUTION_NO_SELECTION_MESSAGE;
246+
public static String GarbageCollectionsPage_TENURING_DISTRIBUTION_MULTI_SELECTION_MESSAGE;
247+
public static String GarbageCollectionsPage_TENURING_SIZE;
243248
public static String GarbageCollectionsPage_ROW_HEAP;
244249
public static String GarbageCollectionsPage_ROW_HEAP_DESC;
245250
public static String GarbageCollectionsPage_ROW_HEAP_POST_GC;

application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultTableUi.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
import org.openjdk.jmc.common.IWritableState;
5757
import org.openjdk.jmc.common.unit.IQuantity;
5858
import org.openjdk.jmc.flightrecorder.rules.IResult;
59+
import org.openjdk.jmc.flightrecorder.rules.ResultToolkit;
5960
import org.openjdk.jmc.flightrecorder.rules.TypedResult;
6061
import org.openjdk.jmc.flightrecorder.ui.DataPageDescriptor;
6162
import org.openjdk.jmc.flightrecorder.ui.IPageContainer;
@@ -222,21 +223,21 @@ public String getTextTyped(IResult IResult) {
222223
new TypedLabelProvider<IResult>(IResult.class) {
223224
@Override
224225
public String getTextTyped(IResult IResult) {
225-
return IResult.getSummary();
226+
return ResultToolkit.populateMessage(IResult, IResult.getSummary(), false);
226227
}
227228
}).build();
228229
IColumn explanationColumn = new ColumnBuilder(Messages.ResultOverview_COLUMN_EXPLANATION, "explanation", //$NON-NLS-1$
229230
new TypedLabelProvider<IResult>(IResult.class) {
230231
@Override
231232
public String getTextTyped(IResult IResult) {
232-
return IResult.getExplanation();
233+
return ResultToolkit.populateMessage(IResult, IResult.getExplanation(), false);
233234
}
234235
}).build();
235236
IColumn solutionColumn = new ColumnBuilder(Messages.ResultOverview_COLUMN_SOLUTION, "solution", //$NON-NLS-1$
236237
new TypedLabelProvider<IResult>(IResult.class) {
237238
@Override
238239
public String getTextTyped(IResult IResult) {
239-
return IResult.getSolution();
240+
return ResultToolkit.populateMessage(IResult, IResult.getSolution(), false);
240241
}
241242
}).build();
242243
IColumn idColumn = new ColumnBuilder(Messages.ResultOverview_COLUMN_RESULT_ID, "id", //$NON-NLS-1$

application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/EventBrowserPage.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
import org.openjdk.jmc.flightrecorder.ui.common.ImageConstants;
9090
import org.openjdk.jmc.flightrecorder.ui.common.ItemList;
9191
import org.openjdk.jmc.flightrecorder.ui.common.ItemList.ItemListBuilder;
92+
import org.openjdk.jmc.flightrecorder.ui.common.TreeExpandCollapseSupport;
9293
import org.openjdk.jmc.flightrecorder.ui.common.TypeFilterBuilder;
9394
import org.openjdk.jmc.flightrecorder.ui.messages.internal.Messages;
9495
import org.openjdk.jmc.flightrecorder.ui.selection.SelectionStoreActionToolkit;
@@ -209,6 +210,7 @@ class EventBrowserUI implements IPageUI {
209210
treeSash = new SashForm(form.getBody(), SWT.HORIZONTAL);
210211
toolkit.adapt(treeSash);
211212
typeFilterTree = DataPageToolkit.buildEventTypeTree(treeSash, toolkit, this::onTypeChange, false);
213+
TreeExpandCollapseSupport.installFor(typeFilterTree.getViewer());
212214
MCContextMenuManager mm = typeFilterTree.getMenuManager();
213215
IAction addPageAction = ActionToolkit.action(() -> DataPageToolkit.addPage(selectedTypes),
214216
Messages.EventBrowserPage_NEW_PAGE_USING_TYPES_ACTION, NEW_PAGE_ICON);
@@ -312,7 +314,6 @@ private void rebuildItemList() {
312314
}
313315

314316
// FIXME: Possibly move to attribute toolkit/handler?
315-
// FIXME: Make sure to get Event Type as the first column
316317
// FIXME: Stream<IType> -> Stream<IAttribute> should be delegated to some context (e.g. the editor)
317318
Stream<IAttribute<?>> commonAttributes = Stream.empty();
318319
if (types.hasNext()) {

application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/GarbageCollectionsPage.java

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@
6464
import org.eclipse.swt.SWT;
6565
import org.eclipse.swt.custom.CTabFolder;
6666
import org.eclipse.swt.custom.SashForm;
67+
import org.eclipse.swt.custom.StackLayout;
6768
import org.eclipse.swt.layout.GridData;
6869
import org.eclipse.swt.layout.GridLayout;
6970
import org.eclipse.swt.widgets.Composite;
71+
import org.eclipse.swt.widgets.Label;
7072
import org.eclipse.ui.forms.widgets.Form;
7173
import org.eclipse.ui.forms.widgets.FormToolkit;
7274

@@ -92,6 +94,7 @@
9294
import org.openjdk.jmc.common.unit.LinearKindOfQuantity;
9395
import org.openjdk.jmc.common.unit.UnitLookup;
9496
import org.openjdk.jmc.flightrecorder.JfrAttributes;
97+
import org.openjdk.jmc.flightrecorder.jdk.JdkAggregators;
9598
import org.openjdk.jmc.flightrecorder.jdk.JdkAttributes;
9699
import org.openjdk.jmc.flightrecorder.jdk.JdkFilters;
97100
import org.openjdk.jmc.flightrecorder.jdk.JdkTypeIDs;
@@ -106,6 +109,7 @@
106109
import org.openjdk.jmc.flightrecorder.ui.IPageUI;
107110
import org.openjdk.jmc.flightrecorder.ui.StreamModel;
108111
import org.openjdk.jmc.flightrecorder.ui.common.AbstractDataPage;
112+
import org.openjdk.jmc.flightrecorder.ui.common.BucketBuilder;
109113
import org.openjdk.jmc.flightrecorder.ui.common.DataPageToolkit;
110114
import org.openjdk.jmc.flightrecorder.ui.common.FilterComponent;
111115
import org.openjdk.jmc.flightrecorder.ui.common.FlavorSelector;
@@ -119,12 +123,14 @@
119123
import org.openjdk.jmc.flightrecorder.ui.messages.internal.Messages;
120124
import org.openjdk.jmc.flightrecorder.ui.selection.SelectionStoreActionToolkit;
121125
import org.openjdk.jmc.ui.charts.AWTChartToolkit;
126+
import org.openjdk.jmc.ui.charts.IQuantitySeries;
122127
import org.openjdk.jmc.ui.charts.ISpanSeries;
123128
import org.openjdk.jmc.ui.charts.IXDataRenderer;
124129
import org.openjdk.jmc.ui.charts.QuantitySeries;
125130
import org.openjdk.jmc.ui.charts.RendererToolkit;
126131
import org.openjdk.jmc.ui.charts.SpanRenderer;
127132
import org.openjdk.jmc.ui.charts.XYChart;
133+
import org.openjdk.jmc.ui.charts.XYDataRenderer;
128134
import org.openjdk.jmc.ui.column.ColumnBuilder;
129135
import org.openjdk.jmc.ui.column.ColumnManager;
130136
import org.openjdk.jmc.ui.column.ColumnManager.SelectionState;
@@ -177,6 +183,9 @@ public IDisplayablePage createPage(IPageDefinition dpd, StreamModel items, IPage
177183
private final static Color LONGEST_PAUSE_COLOR = DataPageToolkit.GC_BASE_COLOR.brighter();
178184
private final static Color SUM_OF_PAUSES_COLOR = DataPageToolkit.GC_BASE_COLOR.brighter().brighter();
179185

186+
private static final Color TENURING_DISTRIBUTION_EVENT_COLOR = TypeLabelProvider
187+
.getColorOrDefault(JdkTypeIDs.TENURING_DISTRIBUTION);
188+
180189
public static final IAttribute<IQuantity> HEAP_USED_POST_GC = attr("heapUsed", Messages.ATTR_HEAP_USED_POST_GC, //$NON-NLS-1$
181190
Messages.ATTR_HEAP_USED_POST_GC_DESC, MEMORY);
182191

@@ -187,6 +196,8 @@ public IDisplayablePage createPage(IPageDefinition dpd, StreamModel items, IPage
187196
JdkAttributes.GC_METASPACE_COMMITTED, JdkAttributes.GC_METASPACE_RESERVED)
188197
.build();
189198

199+
private static final IAggregator<IQuantity, ?> tenuringAgeSizeAggregator = JdkAggregators.TENURING_AGE_SIZE;
200+
190201
private static class GC {
191202
final IType<IItem> type;
192203
final IItem gcItem;
@@ -288,11 +299,18 @@ private class GarbageCollectionsUi implements IPageUI {
288299
private FilterComponent phasesFilter;
289300
private ItemList metaspaceList;
290301
private FilterComponent metaspaceFilter;
302+
private Composite tenuringComposite;
303+
private StackLayout tenuringLayout;
304+
private ChartCanvas tenuringChartCanvas;
305+
private XYChart tenuringChart;
306+
private Label noGcIdSelectionLabel;
307+
private Label multiGcIdSelectionLabel;
291308
private CTabFolder gcInfoFolder;
292309
private IItemCollection selectionItems;
293310
private FlavorSelector flavorSelector;
294311
private ThreadGraphLanes lanes;
295312
private MCContextMenuManager mm;
313+
private IItemCollection tenuringDistributionItems;
296314

297315
GarbageCollectionsUi(Composite parent, FormToolkit toolkit, IPageContainer pageContainer, IState state) {
298316
this.pageContainer = pageContainer;
@@ -336,11 +354,15 @@ private class GarbageCollectionsUi implements IPageUI {
336354
gcList = ColumnManager.build(tableViewer, columns, TableSettings.forState(state.getChild(GCS)));
337355
MCContextMenuManager itemListMm = MCContextMenuManager.create(gcList.getViewer().getControl());
338356
ColumnMenusFactory.addDefaultMenus(gcList, itemListMm);
357+
tenuringDistributionItems = getDataSource().getItems().apply(JdkFilters.TENURING_DISTRIBUTION);
339358
gcList.getViewer().addSelectionChangedListener(e -> {
340359
buildChart();
341360
pageContainer.showSelection(ItemCollectionToolkit.build(gcSelectedGcItems()));
342361
updatePhaseList();
343362
updateMetaspaceList();
363+
if (tenuringDistributionItems.hasItems()) {
364+
updateTenuringHistogram();
365+
}
344366
});
345367

346368
SelectionStoreActionToolkit.addSelectionStoreActions(gcList.getViewer(), pageContainer.getSelectionStore(),
@@ -388,6 +410,31 @@ private class GarbageCollectionsUi implements IPageUI {
388410
DataPageToolkit.addTabItem(gcInfoFolder, metaspaceFilter.getComponent(),
389411
Messages.GarbageCollectionsPage_METASPACE_TITLE);
390412

413+
tenuringComposite = toolkit.createComposite(gcInfoFolder);
414+
tenuringLayout = new StackLayout();
415+
tenuringComposite.setLayout(tenuringLayout);
416+
if (tenuringDistributionItems.hasItems()) {
417+
noGcIdSelectionLabel = new Label(tenuringComposite, SWT.CENTER);
418+
noGcIdSelectionLabel
419+
.setText(Messages.GarbageCollectionsPage_TENURING_DISTRIBUTION_NO_SELECTION_MESSAGE);
420+
multiGcIdSelectionLabel = new Label(tenuringComposite, SWT.CENTER);
421+
multiGcIdSelectionLabel
422+
.setText(Messages.GarbageCollectionsPage_TENURING_DISTRIBUTION_MULTI_SELECTION_MESSAGE);
423+
tenuringChart = new XYChart(UnitLookup.NUMBER.getDefaultUnit().quantity(0),
424+
UnitLookup.NUMBER.getDefaultUnit().quantity(16), RendererToolkit.empty(), 95);
425+
tenuringChartCanvas = new ChartCanvas(tenuringComposite);
426+
tenuringChartCanvas.setChart(tenuringChart);
427+
DataPageToolkit.createChartTooltip(tenuringChartCanvas);
428+
tenuringLayout.topControl = noGcIdSelectionLabel;
429+
} else {
430+
Label noTenuringItemsLabel = new Label(tenuringComposite, SWT.CENTER);
431+
noTenuringItemsLabel.setText(Messages.GarbageCollectionsPage_TENURING_DISTRIBUTION_NO_EVENTS_MESSAGE);
432+
tenuringLayout.topControl = noTenuringItemsLabel;
433+
}
434+
tenuringComposite.layout();
435+
DataPageToolkit.addTabItem(gcInfoFolder, tenuringComposite,
436+
Messages.GarbageCollectionsPage_TENURING_DISTRIBUTION_TITLE);
437+
391438
Composite chartContainer = toolkit.createComposite(sash);
392439
chartContainer.setLayout(new GridLayout(2, false));
393440
chartCanvas = new ChartCanvas(chartContainer);
@@ -452,6 +499,29 @@ private void updateMetaspaceList() {
452499
metaspaceList.show(ItemCollectionToolkit.filterIfNotNull(getMetaspaceItems(), metaspaceFilterState));
453500
}
454501

502+
private void updateTenuringHistogram() {
503+
Set<IQuantity> selectedGcIds = getSelectedGcIds();
504+
if (selectedGcIds.isEmpty()) {
505+
tenuringLayout.topControl = noGcIdSelectionLabel;
506+
} else if (selectedGcIds.size() > 1) {
507+
tenuringLayout.topControl = multiGcIdSelectionLabel;
508+
} else {
509+
IQuantity selectedGcId = selectedGcIds.iterator().next();
510+
IItemCollection items = tenuringDistributionItems
511+
.apply(ItemFilters.equals(JdkAttributes.GC_ID, selectedGcId));
512+
IQuantitySeries<IQuantity[]> series = BucketBuilder.aggregatorSeries(items, tenuringAgeSizeAggregator,
513+
JdkAttributes.TENURING_DISTRIBUTION_AGE);
514+
XYDataRenderer renderer = new XYDataRenderer(UnitLookup.MEMORY.getDefaultUnit().quantity(0),
515+
tenuringAgeSizeAggregator.getName(), tenuringAgeSizeAggregator.getDescription());
516+
renderer.addBarChart(tenuringAgeSizeAggregator.getName(), series, TENURING_DISTRIBUTION_EVENT_COLOR);
517+
IXDataRenderer itemRow = new ItemRow(Messages.GarbageCollectionsPage_TENURING_SIZE,
518+
tenuringAgeSizeAggregator.getDescription(), renderer, items);
519+
tenuringChartCanvas.replaceRenderer(itemRow);
520+
tenuringLayout.topControl = tenuringChartCanvas;
521+
}
522+
tenuringComposite.layout();
523+
}
524+
455525
private IItemCollection getMetaspaceItems() {
456526
Set<IQuantity> selectedGcIds = getSelectedGcIds();
457527
IItemCollection metaspaceItems = getDataSource().getItems().apply(JdkFilters.METASPACE_SUMMARY)

application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/HeapPage.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,12 @@ protected IXDataRenderer getChartRenderer(IItemCollection itemsInTable, Histogra
215215
XYDataRenderer heapRenderer = new XYDataRenderer(UnitLookup.MEMORY.getDefaultUnit().quantity(0),
216216
Messages.HeapPage_ROW_MEMORY_USAGE, Messages.HeapPage_ROW_MEMORY_USAGE_DESC);
217217

218+
Optional<IItemCollection> optionalHeapSummaryItems = getMemoryEvents(allItems, HEAP_SUMMARY, heapRenderer);
219+
Optional<IItemCollection> optionalRssItems = getRssEvents(allItems, heapRenderer);
220+
Optional<IItemCollection> optionalOsMemorySummaryItems = getMemoryEvents(allItems, OS_MEMORY_SUMMARY,
221+
heapRenderer);
218222
Supplier<Stream<IItemCollection>> memoryEventsSupplier = () -> Stream
219-
.of(getMemoryEvents(allItems, HEAP_SUMMARY, heapRenderer), getRssEvents(allItems, heapRenderer),
220-
getMemoryEvents(allItems, OS_MEMORY_SUMMARY, heapRenderer))
223+
.of(optionalHeapSummaryItems, optionalRssItems, optionalOsMemorySummaryItems)
221224
.filter(Optional::isPresent).map(Optional::get);
222225

223226
IItemCollection mergedEvents = ItemCollectionToolkit.merge(memoryEventsSupplier);

application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/ProcessesPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private class ProcessesUi implements IPageUI {
143143

144144
// FIXME: Configure y-axis to always show 100%?
145145
cpuCanvas = new ChartCanvas(sash);
146-
cpuChart = new XYChart(pageContainer.getRecordingRange(), RendererToolkit.empty(), 100);
146+
cpuChart = new XYChart(pageContainer.getRecordingRange(), RendererToolkit.empty(), 180);
147147
cpuChart.setVisibleRange(timelineRange.getStart(), timelineRange.getEnd());
148148
cpuChart.addVisibleRangeListener(r -> timelineRange = r);
149149
DataPageToolkit.createChartTimestampTooltip(cpuCanvas);

0 commit comments

Comments
 (0)