Skip to content

Commit

Permalink
GH-343 Extract Heap library to a separate module
Browse files Browse the repository at this point in the history
  • Loading branch information
thurka committed Sep 14, 2021
1 parent c878fe5 commit 42f7c64
Show file tree
Hide file tree
Showing 92 changed files with 192 additions and 12 deletions.
5 changes: 2 additions & 3 deletions visualvm/heapviewer.console/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.graalvm.visualvm.lib.jfluid</code-name-base>
<code-name-base>org.graalvm.visualvm.lib.jfluid.heap</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>2</release-version>
<specification-version>2.7</specification-version>
<specification-version>1.0</specification-version>
</run-dependency>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
import javax.swing.plaf.basic.BasicSplitPaneDivider;
import javax.swing.plaf.basic.BasicSplitPaneUI;
import org.graalvm.polyglot.Context;
import org.graalvm.visualvm.lib.jfluid.ProfilerLogger;
import org.graalvm.visualvm.lib.jfluid.heap.Heap;
import org.graalvm.visualvm.lib.jfluid.heap.Instance;
import org.graalvm.visualvm.lib.jfluid.heap.JavaClass;
Expand Down Expand Up @@ -192,7 +191,7 @@ class RConsoleView extends HeapViewerFeature {
// if (REngine.isSupported()) try {
// engine = new REngine(heap);
// } catch (Exception e) {
// ProfilerLogger.log(e);
// LOGGER.log(Level.INFO, "Error initializing REngine", e); // NOI18N
// }

// if (engine != null) {
Expand All @@ -219,7 +218,7 @@ protected String computeData(HeapContext context, String viewID) {
if (REngine.isSupported()) try {
engine = new REngine(heap);
} catch (Exception e) {
ProfilerLogger.log(e);
LOGGER.log(Level.INFO, "Error initializing REngine", e); // NOI18N
}

updateUIState();
Expand Down
8 changes: 8 additions & 0 deletions visualvm/heapviewer.truffle/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@
<specification-version>2.8</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.graalvm.visualvm.lib.jfluid.heap</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.0</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.graalvm.visualvm.lib.profiler.api</code-name-base>
<build-prerequisite/>
Expand Down
8 changes: 8 additions & 0 deletions visualvm/heapviewer/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
<specification-version>2.8</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.graalvm.visualvm.lib.jfluid.heap</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.0</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.graalvm.visualvm.lib.profiler.api</code-name-base>
<build-prerequisite/>
Expand Down
29 changes: 29 additions & 0 deletions visualvm/libs.profiler/lib.profiler.heap/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation. Oracle designates this
particular file as subject to the "Classpath" exception as provided
by Oracle in the LICENSE file that accompanied this code.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).
You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any
questions.
-->
<project basedir="." default="netbeans" name="lib.profiler.heap">
<description>Builds, tests, and runs the project org.graalvm.visualvm.lib.jfluid.heap</description>
<import file="nbproject/build-impl.xml"/>
</project>
5 changes: 5 additions & 0 deletions visualvm/libs.profiler/lib.profiler.heap/manifest.mf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Manifest-Version: 1.0
OpenIDE-Module: org.graalvm.visualvm.lib.jfluid.heap
OpenIDE-Module-Localizing-Bundle: org/graalvm/visualvm/lib/jfluid/heap/Bundle.properties
OpenIDE-Module-Specification-Version: 1.0

45 changes: 45 additions & 0 deletions visualvm/libs.profiler/lib.profiler.heap/nbproject/build-impl.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
*** GENERATED FROM project.xml - DO NOT EDIT ***
*** EDIT ../build.xml INSTEAD ***
-->
<project name="org.graalvm.visualvm.lib.jfluid.heap-impl" basedir="..">
<fail message="Please build using Ant 1.7.1 or higher.">
<condition>
<not>
<antversion atleast="1.7.1"/>
</not>
</condition>
</fail>
<property file="nbproject/private/suite-private.properties"/>
<property file="nbproject/suite.properties"/>
<fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
<property file="${suite.dir}/nbproject/private/platform-private.properties"/>
<property file="${suite.dir}/nbproject/platform.properties"/>
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
<attribute name="name"/>
<attribute name="value"/>
<sequential>
<property name="@{name}" value="${@{value}}"/>
</sequential>
</macrodef>
<macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
<attribute name="property"/>
<attribute name="value"/>
<sequential>
<property name="@{property}" value="@{value}"/>
</sequential>
</macrodef>
<property file="${user.properties.file}"/>
<nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
<nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
<nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
<fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
<condition>
<not>
<contains string="${cluster.path.evaluated}" substring="platform"/>
</not>
</condition>
</fail>
<import file="${harness.dir}/build.xml"/>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=d0716bc0
nbproject/build-impl.xml.script.CRC32=9dc5437f
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.73
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.

is.autoload=true
43 changes: 43 additions & 0 deletions visualvm/libs.profiler/lib.profiler.heap/nbproject/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation. Oracle designates this
particular file as subject to the "Classpath" exception as provided
by Oracle in the LICENSE file that accompanied this code.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).
You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any
questions.
-->
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.apisupport.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
<code-name-base>org.graalvm.visualvm.lib.jfluid.heap</code-name-base>
<suite-component/>
<module-dependencies/>
<friend-packages>
<friend>org.graalvm.visualvm.heapviewer</friend>
<friend>org.graalvm.visualvm.heapviewer.console</friend>
<friend>org.graalvm.visualvm.heapviewer.truffle</friend>
<friend>org.graalvm.visualvm.lib.profiler.heapwalker</friend>
<friend>org.graalvm.visualvm.lib.profiler.oql</friend>
<package>org.graalvm.visualvm.lib.jfluid.heap</package>
</friend-packages>
</data>
</configuration>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
suite.dir=${basedir}/../..
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,5 @@
# or visit www.oracle.com if you need additional information or have any
# questions.


HprofByteBuffer_ShortFile=File too short

HprofByteBuffer_InvalidFormat=Invalid HPROF version or format
OpenIDE-Module-Display-Category=Profiling
OpenIDE-Module-Name=Java Profiler (Heap)
2 changes: 0 additions & 2 deletions visualvm/libs.profiler/lib.profiler/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ questions.
<friend>org.graalvm.visualvm.core</friend>
<friend>org.graalvm.visualvm.heapdump</friend>
<friend>org.graalvm.visualvm.heapviewer</friend>
<friend>org.graalvm.visualvm.heapviewer.console</friend>
<friend>org.graalvm.visualvm.heapviewer.truffle</friend>
<friend>org.graalvm.visualvm.jfr</friend>
<friend>org.graalvm.visualvm.lib.common</friend>
Expand All @@ -82,7 +81,6 @@ questions.
<package>org.graalvm.visualvm.lib.jfluid.client</package>
<package>org.graalvm.visualvm.lib.jfluid.filters</package>
<package>org.graalvm.visualvm.lib.jfluid.global</package>
<package>org.graalvm.visualvm.lib.jfluid.heap</package>
<package>org.graalvm.visualvm.lib.jfluid.instrumentation</package>
<package>org.graalvm.visualvm.lib.jfluid.jps</package>
<package>org.graalvm.visualvm.lib.jfluid.marker</package>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ questions.
<specification-version>2.8</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.graalvm.visualvm.lib.jfluid.heap</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.0</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.graalvm.visualvm.lib.profiler</code-name-base>
<build-prerequisite/>
Expand Down
8 changes: 8 additions & 0 deletions visualvm/libs.profiler/profiler.oql/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ questions.
<specification-version>2.7</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.graalvm.visualvm.lib.jfluid.heap</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.0</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.graalvm.visualvm.lib.profiler.api</code-name-base>
<build-prerequisite/>
Expand Down
2 changes: 2 additions & 0 deletions visualvm/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ modules=\
${project.org.graalvm.visualvm.lib.jfluid}:\
${project.org.graalvm.visualvm.lib.charts}:\
${project.org.graalvm.visualvm.lib.common}:\
${project.org.graalvm.visualvm.lib.heap}:\
${project.org.graalvm.visualvm.lib.ui}:\
${project.org.graalvm.visualvm.lib.profiler}:\
${project.org.graalvm.visualvm.lib.profiler.api}:\
Expand Down Expand Up @@ -85,6 +86,7 @@ project.org.graalvm.visualvm.uisupport=uisupport
project.org.graalvm.visualvm.lib.jfluid=libs.profiler/lib.profiler
project.org.graalvm.visualvm.lib.charts=libs.profiler/lib.profiler.charts
project.org.graalvm.visualvm.lib.common=libs.profiler/lib.profiler.common
project.org.graalvm.visualvm.lib.heap=libs.profiler/lib.profiler.heap
project.org.graalvm.visualvm.lib.ui=libs.profiler/lib.profiler.ui
project.org.graalvm.visualvm.lib.profiler=libs.profiler/profiler
project.org.graalvm.visualvm.lib.profiler.api=libs.profiler/profiler.api
Expand Down

0 comments on commit 42f7c64

Please sign in to comment.