changeset 163:9a214341f795

JMC-3338: Adds simple visualization of loaded native libraries Summary: Also fixes some other annoyances, like environment variables should be sorted on key by default, system properties should be sorted on key by default, it should be okay to have a quary with both attributes and aggregators to fuel the DistinctItemsPage and removal of some unused imports Reviewed-by: hdafgard, Jie Kang <jkang@redhat.com>
author hirt <marcus.hirt@oracle.com>
date Fri, 31 May 2019 23:26:35 +0200
parents 4c9efa5eb5b8
children 7c0748da48ec
files application/org.openjdk.jmc.flightrecorder.ui/defaultPages.xml application/org.openjdk.jmc.flightrecorder.ui/icons/pages/nativelibraries.png application/org.openjdk.jmc.flightrecorder.ui/icons/pages/nativelibraries@2x.png application/org.openjdk.jmc.flightrecorder.ui/plugin.xml application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/JfrPropertySheet.java application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/common/DataPageToolkit.java application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/common/ImageConstants.java application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/messages/internal/Messages.java application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/EventBrowserPage.java application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/NativeLibraryPage.java application/org.openjdk.jmc.flightrecorder.ui/src/main/resources/org/openjdk/jmc/flightrecorder/ui/messages/internal/messages.properties application/uitests/org.openjdk.jmc.test.jemmy/src/test/java/org/openjdk/jmc/test/jemmy/misc/wrappers/JfrUi.java core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/latency/BiasedLockingRevocationRule.java core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/JfrRuleTopics.java core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkAggregators.java core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkAttributes.java core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkQueries.java core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkTypeIDs.java core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/messages/internal/Messages.java core/org.openjdk.jmc.flightrecorder/src/main/resources/org/openjdk/jmc/flightrecorder/jdk/messages/internal/messages.properties
diffstat 20 files changed, 169 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/application/org.openjdk.jmc.flightrecorder.ui/defaultPages.xml	Fri May 24 13:05:05 2019 +0200
+++ b/application/org.openjdk.jmc.flightrecorder.ui/defaultPages.xml	Fri May 31 23:26:35 2019 +0200
@@ -771,8 +771,8 @@
 		<page factory="org.openjdk.jmc.flightrecorder.ui.environmentvariables"
 			id="org.openjdk.jmc.flightrecorder.ui.environmentvariables">
 			<state>
-				<table>
-					<column id="key:text" width="200">
+				<table sortColumn="key:text">
+					<column id="key:text" width="200" sortAscending="true">
 					</column>
 					<column id="value:text" width="600">
 					</column>
@@ -785,13 +785,25 @@
 		<page factory="org.openjdk.jmc.flightrecorder.ui.systemproperties"
 			id="org.openjdk.jmc.flightrecorder.ui.systemproperties">
 			<state>
-				<table>
-					<column id="key:text" width="230" />
+				<table sortColumn="key:text">
+					<column id="key:text" width="230" sortAscending="true" />
 					<column id="value:text" width="550" />
 				</table>
 				<filter showFilter="false" showSearch="true" />
 			</state>
 		</page>
+		<page factory="org.openjdk.jmc.flightrecorder.ui.nativelibrary"
+			id="org.openjdk.jmc.flightrecorder.ui.nativelibrary">
+			<state>
+				<table sortColumn="name:text">
+					<column id="name:text" sortAscending="true" width="420" />
+					<column id="baseAddress:address" width="100" />
+					<column id="topAddress:address" width="100" />
+					<column id="Count" width="70" hidden="true" />
+				</table>
+				<filter showFilter="false" showSearch="true" />
+			</state>
+		</page>
 		<page factory="org.openjdk.jmc.flightrecorder.ui.recording" id="org.openjdk.jmc.flightrecorder.ui.recording">
 			<state>
 				<sash weights="27,20,70" />
Binary file application/org.openjdk.jmc.flightrecorder.ui/icons/pages/nativelibraries.png has changed
Binary file application/org.openjdk.jmc.flightrecorder.ui/icons/pages/nativelibraries@2x.png has changed
--- a/application/org.openjdk.jmc.flightrecorder.ui/plugin.xml	Fri May 24 13:05:05 2019 +0200
+++ b/application/org.openjdk.jmc.flightrecorder.ui/plugin.xml	Fri May 31 23:26:35 2019 +0200
@@ -243,6 +243,10 @@
             id="org.openjdk.jmc.flightrecorder.ui.methodprofiling">
       </factory>
       <factory
+            class="org.openjdk.jmc.flightrecorder.ui.pages.NativeLibraryPage$NativeLibraryPageFactory"
+            id="org.openjdk.jmc.flightrecorder.ui.nativelibrary">
+      </factory>
+      <factory
             class="org.openjdk.jmc.flightrecorder.ui.pages.ExceptionsPage$ExceptionsPageFactory"
             id="org.openjdk.jmc.flightrecorder.ui.exceptions">
       </factory>
--- a/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/JfrPropertySheet.java	Fri May 24 13:05:05 2019 +0200
+++ b/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/JfrPropertySheet.java	Fri May 31 23:26:35 2019 +0200
@@ -339,6 +339,7 @@
 				};
 			}).build();
 
+	@SuppressWarnings("unchecked")
 	private static void updateSelectedTypes(Object value) {
 		if (value instanceof IType<?>) {
 			selectedTypes = new HashSet<IType<?>>();
--- a/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/common/DataPageToolkit.java	Fri May 24 13:05:05 2019 +0200
+++ b/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/common/DataPageToolkit.java	Fri May 31 23:26:35 2019 +0200
@@ -514,6 +514,9 @@
 		for (IAttribute<?> attribute : query.getAttributes()) {
 			histogramBuilder.addKeyColumn(attribute);
 		}
+		for (IAggregator<?, ?> aggregator : query.getAggregators()) {
+			histogramBuilder.addColumn(aggregator.getName(), aggregator);
+		}
 		ItemHistogram table = histogramBuilder.buildWithoutBorder(parent, settings);
 		return table;
 	}
--- a/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/common/ImageConstants.java	Fri May 24 13:05:05 2019 +0200
+++ b/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/common/ImageConstants.java	Fri May 31 23:26:35 2019 +0200
@@ -131,4 +131,5 @@
 	public static final String PAGE_ENVIRONMENT_VARIABLES = "pages/environment.png"; //$NON-NLS-1$
 	public static final String PAGE_SYSTEM_PROPERTIES = "pages/systemproperties.png"; //$NON-NLS-1$
 	public static final String PAGE_RECORDING = "pages/recording.png"; //$NON-NLS-1$
+	public static final String PAGE_NATIVE_LIBRARY = "pages/nativelibraries.png"; //$NON-NLS-1$ //FIXME!
 }
--- a/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/messages/internal/Messages.java	Fri May 24 13:05:05 2019 +0200
+++ b/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/messages/internal/Messages.java	Fri May 31 23:26:35 2019 +0200
@@ -36,7 +36,6 @@
 
 public class Messages extends NLS {
 	private static final String BUNDLE_NAME = "org.openjdk.jmc.flightrecorder.ui.messages.internal.messages"; //$NON-NLS-1$
-
 	public static String ATTRIBUTE_CONFIG_PAGE_RULES;
 	public static String ATTRIBUTE_CONFIG_RULE;
 	public static String ATTRIBUTE_CONFIG_RULES;
@@ -339,6 +338,7 @@
 	public static String MethodProfilingPage_CLASS_HISTOGRAM_SELECTION;
 	public static String MethodProfilingPage_PACKAGE_HISTOGRAM_SELECTION;
 	public static String MethodProfilingPage_PAGE_NAME;
+	public static String NativeLibraryPage_PAGE_NAME;
 	public static String NAVIGATOR_MOVE_BACKWARD_TEXT;
 	public static String NAVIGATOR_MOVE_FORWARD_TEXT;
 	public static String NAVIGATOR_SELECT_ALL_TEXT;
--- a/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/EventBrowserPage.java	Fri May 24 13:05:05 2019 +0200
+++ b/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/EventBrowserPage.java	Fri May 31 23:26:35 2019 +0200
@@ -78,7 +78,6 @@
 import org.openjdk.jmc.flightrecorder.ui.IPageDefinition;
 import org.openjdk.jmc.flightrecorder.ui.IPageUI;
 import org.openjdk.jmc.flightrecorder.ui.ItemCollectionToolkit;
-import org.openjdk.jmc.flightrecorder.ui.PageManager;
 import org.openjdk.jmc.flightrecorder.ui.RuleManager;
 import org.openjdk.jmc.flightrecorder.ui.StreamModel;
 import org.openjdk.jmc.flightrecorder.ui.common.AbstractDataPage;
@@ -90,8 +89,6 @@
 import org.openjdk.jmc.flightrecorder.ui.common.ItemList.ItemListBuilder;
 import org.openjdk.jmc.flightrecorder.ui.common.TypeFilterBuilder;
 import org.openjdk.jmc.flightrecorder.ui.messages.internal.Messages;
-import org.openjdk.jmc.flightrecorder.ui.pages.itemhandler.ItemHandlerPage;
-import org.openjdk.jmc.flightrecorder.ui.pages.itemhandler.ItemHandlerPage.ItemHandlerUiStandIn;
 import org.openjdk.jmc.flightrecorder.ui.selection.SelectionStoreActionToolkit;
 import org.openjdk.jmc.ui.OrientationAction;
 import org.openjdk.jmc.ui.column.ColumnManager.SelectionState;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/NativeLibraryPage.java	Fri May 31 23:26:35 2019 +0200
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019 Datadog. All rights reserved.
+ * 
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * The contents of this file are subject to the terms of either the Universal Permissive License
+ * v 1.0 as shown at http://oss.oracle.com/licenses/upl
+ *
+ * or the following license:
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted
+ * provided that the following conditions are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions
+ * and the following disclaimer.
+ * 
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of
+ * conditions and the following disclaimer in the documentation and/or other materials provided with
+ * the distribution.
+ * 
+ * 3. Neither the name of the copyright holder nor the names of its contributors may be used to
+ * endorse or promote products derived from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+ * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.openjdk.jmc.flightrecorder.ui.pages;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.openjdk.jmc.common.IState;
+import org.openjdk.jmc.common.item.IItemFilter;
+import org.openjdk.jmc.common.item.ItemFilters;
+import org.openjdk.jmc.flightrecorder.jdk.JdkQueries;
+import org.openjdk.jmc.flightrecorder.jdk.JdkTypeIDs;
+import org.openjdk.jmc.flightrecorder.rules.util.JfrRuleTopics;
+import org.openjdk.jmc.flightrecorder.ui.FlightRecorderUI;
+import org.openjdk.jmc.flightrecorder.ui.IDataPageFactory;
+import org.openjdk.jmc.flightrecorder.ui.IDisplayablePage;
+import org.openjdk.jmc.flightrecorder.ui.IPageContainer;
+import org.openjdk.jmc.flightrecorder.ui.IPageDefinition;
+import org.openjdk.jmc.flightrecorder.ui.StreamModel;
+import org.openjdk.jmc.flightrecorder.ui.common.ImageConstants;
+import org.openjdk.jmc.flightrecorder.ui.messages.internal.Messages;
+
+public class NativeLibraryPage extends DistinctItemsPage {
+	public static class NativeLibraryPageFactory implements IDataPageFactory {
+
+		@Override
+		public String getName(IState state) {
+			return Messages.NativeLibraryPage_PAGE_NAME;
+		}
+
+		@Override
+		public ImageDescriptor getImageDescriptor(IState state) {
+			return FlightRecorderUI.getDefault().getMCImageDescriptor(ImageConstants.PAGE_NATIVE_LIBRARY);
+		}
+
+		@Override
+		public String[] getTopics(IState state) {
+			return new String[] {JfrRuleTopics.NATIVE_LIBRARY_TOPIC};
+		}
+
+		@Override
+		public IDisplayablePage createPage(IPageDefinition dpd, StreamModel items, IPageContainer editor) {
+			return new NativeLibraryPage(dpd, items, editor);
+		}
+	}
+
+	public NativeLibraryPage(IPageDefinition dpd, StreamModel items, IPageContainer editor) {
+		super(dpd, items, editor);
+		setTableDefinition(JdkQueries.NATIVE_LIBRARIES);
+	}
+
+	@Override
+	public IItemFilter getDefaultSelectionFilter() {
+		return ItemFilters.type(JdkTypeIDs.NATIVE_LIBRARY);
+	}
+}
--- a/application/org.openjdk.jmc.flightrecorder.ui/src/main/resources/org/openjdk/jmc/flightrecorder/ui/messages/internal/messages.properties	Fri May 24 13:05:05 2019 +0200
+++ b/application/org.openjdk.jmc.flightrecorder.ui/src/main/resources/org/openjdk/jmc/flightrecorder/ui/messages/internal/messages.properties	Fri May 31 23:26:35 2019 +0200
@@ -311,6 +311,7 @@
 INFORMATION_COMPONENT_NOT_AVAILABLE=N/A
 
 N_A=N/A
+NativeLibraryPage_PAGE_NAME=Native Libraries
 NAVIGATOR_MOVE_FORWARD_TEXT=Move Forward
 NAVIGATOR_MOVE_BACKWARD_TEXT=Move Backward
 NAVIGATOR_SELECT_ALL_TEXT=Select All
--- a/application/uitests/org.openjdk.jmc.test.jemmy/src/test/java/org/openjdk/jmc/test/jemmy/misc/wrappers/JfrUi.java	Fri May 24 13:05:05 2019 +0200
+++ b/application/uitests/org.openjdk.jmc.test.jemmy/src/test/java/org/openjdk/jmc/test/jemmy/misc/wrappers/JfrUi.java	Fri May 31 23:26:35 2019 +0200
@@ -73,6 +73,7 @@
 		VM_OPERATIONS,
 		ALLOCATIONS,
 		ENVIRONMENT,
+		NATIVE_LIBRARIES,
 		PROCESSES,
 		ENVIRONMENT_VARIABLES,
 		SYSTEM_PROPS,
@@ -144,6 +145,9 @@
 			case PROCESSES:
 				tabText = new String[] {"Environment", "Processes"};
 				break;
+			case NATIVE_LIBRARIES:
+				tabText = new String[] {"Environment", "Native Libraries"};
+				break;				
 			case ENVIRONMENT_VARIABLES:
 				tabText = new String[] {"Environment", "Environment Variables"};
 				break;
--- a/core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/latency/BiasedLockingRevocationRule.java	Fri May 24 13:05:05 2019 +0200
+++ b/core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/latency/BiasedLockingRevocationRule.java	Fri May 31 23:26:35 2019 +0200
@@ -319,7 +319,6 @@
 
 	@Override
 	public String getTopic() {
-		return JfrRuleTopics.BIASED_LOCKING;
+		return JfrRuleTopics.BIASED_LOCKING_TOPIC;
 	}
-
 }
--- a/core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/JfrRuleTopics.java	Fri May 24 13:05:05 2019 +0200
+++ b/core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/JfrRuleTopics.java	Fri May 31 23:26:35 2019 +0200
@@ -35,9 +35,11 @@
 /**
  * A number of constant strings that are used as topics by JMC rules and pages. These are only used
  * as a convenience, you are by no means limited to these strings.
+ * <p>
+ * NOTE: If we want the word TOPIC in these constants, it should be the first word. Let's consider
+ * this for 8.0.0. See JMC-6487.
  */
 public final class JfrRuleTopics {
-
 	public static final String CLASS_LOADING_TOPIC = "classloading"; //$NON-NLS-1$
 	public static final String CODE_CACHE_TOPIC = "code_cache"; //$NON-NLS-1$
 	public static final String COMPILATIONS_TOPIC = "compilations"; //$NON-NLS-1$
@@ -61,5 +63,8 @@
 	public static final String THREADS_TOPIC = "threads"; //$NON-NLS-1$
 	public static final String VM_OPERATIONS_TOPIC = "vm_operations"; //$NON-NLS-1$
 	public static final String MEMORY_LEAK_TOPIC = "memoryleak"; //$NON-NLS-1$
+	public static final String BIASED_LOCKING_TOPIC = "biased_locking"; //$NON-NLS-1$
+	public static final String NATIVE_LIBRARY_TOPIC = "native_library"; //$NON-NLS-1$
+	@Deprecated
 	public static final String BIASED_LOCKING = "biased_locking"; //$NON-NLS-1$
 }
--- a/core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkAggregators.java	Fri May 24 13:05:05 2019 +0200
+++ b/core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkAggregators.java	Fri May 31 23:26:35 2019 +0200
@@ -113,16 +113,16 @@
 
 	// VM Info
 	public static final IAggregator<String, ?> JVM_NAME = distinctAsString(VM_INFO, JdkAttributes.JVM_NAME);
-	public static final IAggregator<IQuantity, ?> JVM_PID = min(JdkAttributes.JVM_PID.getName(), null,
-			VM_INFO, JdkAttributes.JVM_PID);
+	public static final IAggregator<IQuantity, ?> JVM_PID = min(JdkAttributes.JVM_PID.getName(), null, VM_INFO,
+			JdkAttributes.JVM_PID);
 	public static final IAggregator<IQuantity, ?> JVM_START_TIME = min(JdkAttributes.JVM_START_TIME.getName(), null,
 			VM_INFO, JdkAttributes.JVM_START_TIME);
 	public static final IAggregator<String, ?> JVM_VERSION = distinctAsString(VM_INFO, JdkAttributes.JVM_VERSION);
 	public static final IAggregator<String, ?> JAVA_ARGUMENTS = distinctAsString(VM_INFO, JdkAttributes.JAVA_ARGUMENTS);
 	public static final IAggregator<String, ?> JVM_ARGUMENTS = distinctAsString(VM_INFO, JdkAttributes.JVM_ARGUMENTS);
-	
-	public static final IAggregator<IQuantity, ?> JVM_SHUTDOWN_TIME = min(Messages.getString(Messages.ATTR_SHUTDOWN_TIME), null,
-			JdkTypeIDs.VM_SHUTDOWN, JfrAttributes.START_TIME);
+
+	public static final IAggregator<IQuantity, ?> JVM_SHUTDOWN_TIME = min(
+			Messages.getString(Messages.ATTR_SHUTDOWN_TIME), null, JdkTypeIDs.VM_SHUTDOWN, JfrAttributes.START_TIME);
 	public static final IAggregator<String, ?> JVM_SHUTDOWN_REASON = distinctAsString(JdkTypeIDs.VM_SHUTDOWN,
 			JdkAttributes.SHUTDOWN_REASON);
 	// CPU info
@@ -227,7 +227,8 @@
 			Messages.getString(Messages.AGGR_INSIDE_TLAB_COUNT),
 			Messages.getString(Messages.AGGR_INSIDE_TLAB_COUNT_DESC), ALLOC_INSIDE_TLAB);
 	public static final IAggregator<IQuantity, ?> FILE_WRITE_LONGEST = Aggregators.max(FILE_WRITE, DURATION);
-	public static final IAggregator<IQuantity, ?> FILE_WRITE_LARGEST = Aggregators.max(FILE_WRITE, IO_FILE_BYTES_WRITTEN);
+	public static final IAggregator<IQuantity, ?> FILE_WRITE_LARGEST = Aggregators.max(FILE_WRITE,
+			IO_FILE_BYTES_WRITTEN);
 	public static final IAggregator<IQuantity, ?> FILE_READ_LONGEST = Aggregators.max(FILE_READ, DURATION);
 	public static final IAggregator<IQuantity, ?> FILE_READ_LARGEST = Aggregators.max(FILE_READ, IO_FILE_BYTES_READ);
 	public static final IAggregator<IQuantity, ?> FILE_WRITE_SIZE = Aggregators.sum(
@@ -255,9 +256,11 @@
 			Messages.getString(Messages.AGGR_CODE_CACHE_FULL_COUNT),
 			Messages.getString(Messages.AGGR_CODE_CACHE_FULL_COUNT_DESC), CODE_CACHE_FULL);
 	public static final IAggregator<IQuantity, ?> SOCKET_WRITE_LONGEST = Aggregators.max(SOCKET_WRITE, DURATION);
-	public static final IAggregator<IQuantity, ?> SOCKET_WRITE_LARGEST = Aggregators.max(SOCKET_WRITE, IO_SOCKET_BYTES_WRITTEN);
+	public static final IAggregator<IQuantity, ?> SOCKET_WRITE_LARGEST = Aggregators.max(SOCKET_WRITE,
+			IO_SOCKET_BYTES_WRITTEN);
 	public static final IAggregator<IQuantity, ?> SOCKET_READ_LONGEST = Aggregators.max(SOCKET_READ, DURATION);
-	public static final IAggregator<IQuantity, ?> SOCKET_READ_LARGEST = Aggregators.max(SOCKET_READ, IO_SOCKET_BYTES_READ);
+	public static final IAggregator<IQuantity, ?> SOCKET_READ_LARGEST = Aggregators.max(SOCKET_READ,
+			IO_SOCKET_BYTES_READ);
 	public static final IAggregator<IQuantity, ?> SOCKET_WRITE_SIZE = Aggregators.sum(
 			Messages.getString(Messages.AGGR_SOCKET_WRITE_SIZE),
 			Messages.getString(Messages.AGGR_SOCKET_WRITE_SIZE_DESC), SOCKET_WRITE, IO_SOCKET_BYTES_WRITTEN);
@@ -419,6 +422,11 @@
 			Messages.getString(Messages.AGGR_ADDRESSES_COUNT), Messages.getString(Messages.AGGR_ADDRESSES_COUNT_DESC),
 			JdkAttributes.OLD_OBJECT_ADDRESS);
 
+	public static final IAggregator<?, ?> BASE_ADDRESS = Aggregators.min(JdkTypeIDs.NATIVE_LIBRARY,
+			JdkAttributes.BASE_ADDRESS);
+	public static final IAggregator<?, ?> TOP_ADDRESS = Aggregators.min(JdkTypeIDs.NATIVE_LIBRARY,
+			JdkAttributes.TOP_ADDRESS);
+
 	/**
 	 * Aggregator for getting the first value, ie. the value from the event with the first occurring
 	 * start time.
--- a/core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkAttributes.java	Fri May 24 13:05:05 2019 +0200
+++ b/core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkAttributes.java	Fri May 31 23:26:35 2019 +0200
@@ -472,17 +472,17 @@
 	public static final IAttribute<IQuantity> IO_SOCKET_BYTES_WRITTEN = attr("bytesWritten", //$NON-NLS-1$
 			Messages.getString(Messages.ATTR_IO_SOCKET_BYTES_WRITTEN),
 			Messages.getString(Messages.ATTR_IO_SOCKET_BYTES_WRITTEN_DESC), MEMORY);
-	public static final IAttribute<IQuantity> IO_SIZE = Attribute.canonicalize(new Attribute<IQuantity>("size",  //#NON-NLS-1$
+	public static final IAttribute<IQuantity> IO_SIZE = Attribute.canonicalize(new Attribute<IQuantity>("size", //#NON-NLS-1$
 			"Size", null, MEMORY) {
 		@Override
-		public <U> IMemberAccessor<IQuantity, U> customAccessor(IType<U> type){
+		public <U> IMemberAccessor<IQuantity, U> customAccessor(IType<U> type) {
 			List<IMemberAccessor<IQuantity, U>> accessorList = new ArrayList<>();
 			accessorList.add(type.getAccessor(JdkAttributes.IO_SOCKET_BYTES_READ.getKey()));
 			accessorList.add(type.getAccessor(JdkAttributes.IO_SOCKET_BYTES_WRITTEN.getKey()));
 			accessorList.add(type.getAccessor(JdkAttributes.IO_FILE_BYTES_READ.getKey()));
 			accessorList.add(type.getAccessor(JdkAttributes.IO_FILE_BYTES_WRITTEN.getKey()));
 			for (IMemberAccessor<IQuantity, U> accessor : accessorList) {
-				if(accessor != null) {
+				if (accessor != null) {
 					return accessor;
 				}
 			}
@@ -721,10 +721,10 @@
 	public static final IAttribute<String> DUMP_REASON_RECORDING_ID = attr("recordingId", //$NON-NLS-1$
 			Messages.getString(Messages.ATTR_DUMP_REASON_RECORDING_ID),
 			Messages.getString(Messages.ATTR_DUMP_REASON_RECORDING_ID_DESC), PLAIN_TEXT);
-	
+
 	public static final IAttribute<String> SHUTDOWN_REASON = attr("reason", //$NON-NLS-1$
-			Messages.getString(Messages.ATTR_SHUTDOWN_REASON),
-			Messages.getString(Messages.ATTR_SHUTDOWN_REASON_DESC), PLAIN_TEXT);
+			Messages.getString(Messages.ATTR_SHUTDOWN_REASON), Messages.getString(Messages.ATTR_SHUTDOWN_REASON_DESC),
+			PLAIN_TEXT);
 
 	public static final IAttribute<IQuantity> CLASSLOADER_LOADED_COUNT = attr("loadedClassCount", //$NON-NLS-1$
 			Messages.getString(Messages.ATTR_CLASSLOADER_LOADED_COUNT),
@@ -899,7 +899,7 @@
 	public static final IAttribute<IQuantity> CLASS_COUNT = attr("classCount", //$NON-NLS-1$
 			Messages.getString(Messages.ATTR_CLASS_COUNT), NUMBER);
 	public static final IAttribute<IQuantity> CLASS_LOADER_DATA = attr("classLoaderData", //$NON-NLS-1$
-			Messages.getString(Messages.ATTR_CLASSLOADER_DATA), ADDRESS);	
+			Messages.getString(Messages.ATTR_CLASSLOADER_DATA), ADDRESS);
 
 	public static final IAttribute<IQuantity> COMPILER_COMPILATION_ID = attr("compileId", //$NON-NLS-1$
 			Messages.getString(Messages.ATTR_COMPILER_COMPILATION_ID), NUMBER);
@@ -1212,4 +1212,11 @@
 			CLASS);
 	public static final IAttribute<Boolean> BIASED_REVOCATION_DISABLE_BIASING = attr("disableBiasing", //$NON-NLS-1$
 			Messages.getString(Messages.ATTR_DISABLE_BIASING), FLAG);
+
+	public static final IAttribute<String> NATIVE_LIBRARY_NAME = attr("name", //$NON-NLS-1$
+			Messages.getString(Messages.ATTR_NATIVE_LIBRARY_NAME), PLAIN_TEXT);
+	public static final IAttribute<IQuantity> BASE_ADDRESS = attr("baseAddress", //$NON-NLS-1$
+			Messages.getString(Messages.ATTR_BASE_ADDRESS), ADDRESS);
+	public static final IAttribute<IQuantity> TOP_ADDRESS = attr("topAddress", //$NON-NLS-1$
+			Messages.getString(Messages.ATTR_TOP_ADDRESS), ADDRESS);
 }
--- a/core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkQueries.java	Fri May 24 13:05:05 2019 +0200
+++ b/core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkQueries.java	Fri May 31 23:26:35 2019 +0200
@@ -53,9 +53,9 @@
 import static org.openjdk.jmc.flightrecorder.jdk.JdkAttributes.CALLER;
 import static org.openjdk.jmc.flightrecorder.jdk.JdkAttributes.CLASSLOADER_LOADED_COUNT;
 import static org.openjdk.jmc.flightrecorder.jdk.JdkAttributes.CLASSLOADER_UNLOADED_COUNT;
+import static org.openjdk.jmc.flightrecorder.jdk.JdkAttributes.CLASS_DEFINED;
 import static org.openjdk.jmc.flightrecorder.jdk.JdkAttributes.CLASS_DEFINING_CLASSLOADER;
 import static org.openjdk.jmc.flightrecorder.jdk.JdkAttributes.CLASS_INITIATING_CLASSLOADER;
-import static org.openjdk.jmc.flightrecorder.jdk.JdkAttributes.CLASS_DEFINED;
 import static org.openjdk.jmc.flightrecorder.jdk.JdkAttributes.CLASS_LOADED;
 import static org.openjdk.jmc.flightrecorder.jdk.JdkAttributes.CLASS_UNLOADED;
 import static org.openjdk.jmc.flightrecorder.jdk.JdkAttributes.COMMAND_LINE;
@@ -127,6 +127,7 @@
 import static org.openjdk.jmc.flightrecorder.jdk.JdkAttributes.THREAD_DUMP_RESULT;
 import static org.openjdk.jmc.flightrecorder.jdk.JdkAttributes.UNALLOCATED;
 
+import org.openjdk.jmc.common.item.Aggregators;
 import org.openjdk.jmc.common.item.IItemQuery;
 import org.openjdk.jmc.common.item.ItemFilters;
 
@@ -145,8 +146,7 @@
 			.select(CLASS_LOADED, CLASS_DEFINING_CLASSLOADER, CLASS_INITIATING_CLASSLOADER, EVENT_THREAD, DURATION)
 			.build();
 	public static final IItemQuery CLASS_DEFINE = fromWhere(JdkFilters.CLASS_DEFINE)
-			.select(CLASS_DEFINED, CLASS_DEFINING_CLASSLOADER)
-			.build();
+			.select(CLASS_DEFINED, CLASS_DEFINING_CLASSLOADER).build();
 	public static final IItemQuery CLASS_LOAD_STATISTICS = fromWhere(JdkFilters.CLASS_LOAD_STATISTICS)
 			.select(CLASSLOADER_LOADED_COUNT, CLASSLOADER_UNLOADED_COUNT).build();
 	public static final IItemQuery CLASS_UNLOAD = fromWhere(JdkFilters.CLASS_UNLOAD)
@@ -204,6 +204,9 @@
 			.select(HEAP_USED, GC_HEAPSPACE_COMMITTED, GC_HEAPSPACE_RESERVED).build();
 	public static final IItemQuery METASPACE_SUMMARY_AFTER_GC = fromWhere(JdkFilters.METASPACE_SUMMARY_AFTER_GC)
 			.select(GC_ID, END_TIME, GC_METASPACE_USED).build();
+	public static final IItemQuery NATIVE_LIBRARIES = fromWhere(ItemFilters.type(JdkTypeIDs.NATIVE_LIBRARY))
+			.select(JdkAttributes.NATIVE_LIBRARY_NAME, JdkAttributes.BASE_ADDRESS, JdkAttributes.TOP_ADDRESS)
+			.select(Aggregators.count()).build();
 	public static final IItemQuery NO_RMI_SOCKET_READ = fromWhere(JdkFilters.NO_RMI_SOCKET_READ)
 			.select(DURATION, IO_ADDRESS, IO_PORT, IO_TIMEOUT, EVENT_THREAD, IO_SOCKET_BYTES_READ).build();
 	public static final IItemQuery NO_RMI_SOCKET_WRITE = fromWhere(JdkFilters.NO_RMI_SOCKET_WRITE)
@@ -234,4 +237,5 @@
 			.select(DURATION, OPERATION, BLOCKING, SAFEPOINT, EVENT_THREAD, CALLER).build();
 	public static final IItemQuery VM_OPERATIONS_BLOCKING = fromWhere(JdkFilters.VM_OPERATIONS_BLOCKING_OR_SAFEPOINT)
 			.select(DURATION, OPERATION, BLOCKING, SAFEPOINT, EVENT_THREAD, CALLER).build();
+
 }
--- a/core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkTypeIDs.java	Fri May 24 13:05:05 2019 +0200
+++ b/core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkTypeIDs.java	Fri May 31 23:26:35 2019 +0200
@@ -196,4 +196,6 @@
 
 	public static final String MODULE_EXPORT = PREFIX + "ModuleExport";
 	public static final String MODULE_REQUIRE = PREFIX + "ModuleRequire";
+	
+	public static final String NATIVE_LIBRARY = PREFIX + "NativeLibrary";	
 }
--- a/core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/messages/internal/Messages.java	Fri May 24 13:05:05 2019 +0200
+++ b/core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/messages/internal/Messages.java	Fri May 31 23:26:35 2019 +0200
@@ -159,6 +159,7 @@
 	public static final String ATTR_ANONYMOUS_BLOCK_SIZE = "ATTR_ANONYMOUS_BLOCK_SIZE"; //$NON-NLS-1$
 	public static final String ATTR_ANONYMOUS_CHUNK_SIZE = "ATTR_ANONYMOUS_CHUNK_SIZE"; //$NON-NLS-1$
 	public static final String ATTR_ANONYMOUS_CLASS_COUNT = "ATTR_ANONYMOUS_CLASS_COUNT"; //$NON-NLS-1$
+	public static final String ATTR_BASE_ADDRESS = "ATTR_BASE_ADDRESS"; //$NON-NLS-1$
 	public static final String ATTR_BLOCK_SIZE = "ATTR_BLOCK_SIZE"; //$NON-NLS-1$
 	public static final String ATTR_BLOCKING = "ATTR_BLOCKING"; //$NON-NLS-1$
 	public static final String ATTR_BLOCKING_DESC = "ATTR_BLOCKING_DESC"; //$NON-NLS-1$
@@ -329,6 +330,7 @@
 	public static final String ATTR_MONITOR_ADDRESS = "ATTR_MONITOR_ADDRESS"; //$NON-NLS-1$
 	public static final String ATTR_MONITOR_CLASS = "ATTR_MONITOR_CLASS"; //$NON-NLS-1$
 	public static final String ATTR_MONITOR_PREVIOUS_OWNER = "ATTR_MONITOR_PREVIOUS_OWNER"; //$NON-NLS-1$
+	public static final String ATTR_NATIVE_LIBRARY_NAME = "ATTR_NATIVE_LIBRARY_NAME"; //$NON-NLS-1$;
 	public static final String ATTR_NEW_RATIO = "ATTR_NEW_RATIO"; //$NON-NLS-1$
 	public static final String ATTR_NEW_RATIO_DESC = "ATTR_NEW_RATIO_DESC"; //$NON-NLS-1$
 	public static final String ATTR_NON_NMETHODS_ADAPTORS = "ATTR_NON_NMETHODS_ADAPTORS"; //$NON-NLS-1$
@@ -435,6 +437,7 @@
 	public static final String ATTR_TLAB_MIN_SIZE = "ATTR_TLAB_MIN_SIZE"; //$NON-NLS-1$
 	public static final String ATTR_TLAB_REFILL_WASTE_LIMIT = "ATTR_TLAB_REFILL_WASTE_LIMIT"; //$NON-NLS-1$
 	public static final String ATTR_TLAB_SIZE = "ATTR_TLAB_SIZE"; //$NON-NLS-1$
+	public static final String ATTR_TOP_ADDRESS = "ATTR_TOP_ADDRESS"; //$NON-NLS-1$
 	public static final String ATTR_UNALLOCATED = "ATTR_UNALLOCATED"; //$NON-NLS-1$
 	public static final String ATTR_USES_TLABS = "ATTR_USES_TLABS"; //$NON-NLS-1$
 	public static final String ATTR_USES_TLABS_DESC = "ATTR_USES_TLABS_DESC"; //$NON-NLS-1$
@@ -446,7 +449,7 @@
 	public static final String ATTR_YOUNG_GENERATION_MIN_SIZE = "ATTR_YOUNG_GENERATION_MIN_SIZE"; //$NON-NLS-1$
 	public static final String ATTR_SHUTDOWN_REASON = "ATTR_SHUTDOWN_REASON"; //$NON-NLS-1$
 	public static final String ATTR_SHUTDOWN_REASON_DESC = "ATTR_SHUTDOWN_REASON_DESC"; //$NON-NLS-1$
-	public static final String ATTR_SHUTDOWN_TIME = "ATTR_SHUTDOWN_TIME"; //$NON-NLS-1$
+	public static final String ATTR_SHUTDOWN_TIME = "ATTR_SHUTDOWN_TIME"; //$NON-NLS-1$	
 
 	private Messages() {
 	}
--- a/core/org.openjdk.jmc.flightrecorder/src/main/resources/org/openjdk/jmc/flightrecorder/jdk/messages/internal/messages.properties	Fri May 24 13:05:05 2019 +0200
+++ b/core/org.openjdk.jmc.flightrecorder/src/main/resources/org/openjdk/jmc/flightrecorder/jdk/messages/internal/messages.properties	Fri May 31 23:26:35 2019 +0200
@@ -136,6 +136,7 @@
 ATTR_HEAP_COMPRESSED_OOPS_MODE_DESC=The kind of compressed oops being used
 ATTR_YOUNG_GENERATION_MIN_SIZE=Minimum Young Generation Size
 ATTR_YOUNG_GENERATION_MAX_SIZE=Maximum Young Generation Size
+ATTR_NATIVE_LIBRARY_NAME=Library Name
 ATTR_NEW_RATIO=New Ratio
 ATTR_NEW_RATIO_DESC=The size of the young generation relative to the tenured generation
 ATTR_NON_NMETHOD_SIZE=Non-nmethod Size
@@ -324,8 +325,8 @@
 ATTR_SHUTDOWN_REASON=Shutdown Reason
 ATTR_SHUTDOWN_REASON_DESC=Reason for JVM Shutdown
 ATTR_SHUTDOWN_TIME=Shutdown Time
-
-
+ATTR_TOP_ADDRESS=Top Address
+ATTR_BASE_ADDRESS=Base Address
 AGGR_MAX_USED_MEMORY=Maximum used memory
 AGGR_MIN_TOTAL_MEMORY=Available physical memory
 AGGR_ADDRESSES_COUNT=Addresses