commit 07bef65cac73097261683a46e761be9bec864f27 Author: CentOS Sources Date: Tue May 9 05:32:23 2023 +0000 import jmc-8.2.0-13.20220203.el9.2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a598ebe --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/8.2.0-ga.tar.gz +SOURCES/repository-8.2.0-20220203.tar.gz diff --git a/.jmc.metadata b/.jmc.metadata new file mode 100644 index 0000000..fb4c520 --- /dev/null +++ b/.jmc.metadata @@ -0,0 +1,2 @@ +686f6d6b9bcab052a6a815e59e55bebb272a03fe SOURCES/8.2.0-ga.tar.gz +37eac4d47ec01624be56dcc7c102d00826026bf7 SOURCES/repository-8.2.0-20220203.tar.gz diff --git a/SOURCES/0-inline-javascript-into-templates.patch b/SOURCES/0-inline-javascript-into-templates.patch new file mode 100644 index 0000000..c044853 --- /dev/null +++ b/SOURCES/0-inline-javascript-into-templates.patch @@ -0,0 +1,389 @@ +diff --git a/application/org.openjdk.jmc.flightrecorder.flameview/pom.xml b/application/org.openjdk.jmc.flightrecorder.flameview/pom.xml +index d363cba..5bc7c45 100644 +--- a/application/org.openjdk.jmc.flightrecorder.flameview/pom.xml ++++ b/application/org.openjdk.jmc.flightrecorder.flameview/pom.xml +@@ -42,94 +42,4 @@ + + org.openjdk.jmc.flightrecorder.flameview + eclipse-plugin +- +- +- 1.6.7 +- process-resources +- ${project.basedir}/src/main/resources/jslibs +- ${basedir}/../../configuration/ide/eclipse/formatting/formatting.xml +- ${basedir}/../../configuration/ide/eclipse/formatting/formattingjs.xml +- +- +- +- +- +- com.googlecode.maven-download-plugin +- download-maven-plugin +- ${download.maven.plugin.version} +- +- +- d3-flamegraph-css +- ${download-maven-plugin.phase} +- +- wget +- +- +- https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph.css +- false +- ${download-maven-plugin.output} +- +- +- +- d3-v6-js +- ${download-maven-plugin.phase} +- +- wget +- +- +- https://d3js.org/d3.v6.min.js +- false +- ${download-maven-plugin.output} +- +- +- +- d3-flamegraph-tooltip-js +- ${download-maven-plugin.phase} +- +- wget +- +- +- https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph-tooltip.js +- false +- ${download-maven-plugin.output} +- +- +- +- d3-flamegraph-js +- ${download-maven-plugin.phase} +- +- wget +- +- +- https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph.js +- false +- ${download-maven-plugin.output} +- +- +- +- +- +- +- + +diff --git a/application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java b/application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java +index 93cc9a9..0e94a05 100644 +--- a/application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java ++++ b/application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java +@@ -61,7 +61,6 @@ import java.util.concurrent.Executors; + import java.util.concurrent.ThreadFactory; + import java.util.concurrent.atomic.AtomicInteger; + import java.util.logging.Level; +-import java.util.stream.Collectors; + import java.util.stream.Stream; + + import org.eclipse.jface.action.Action; +@@ -120,27 +119,17 @@ public class FlameGraphView extends ViewPart implements ISelectionListener { + private static final String TOOLTIP_DESCRIPTION = getFlameviewMessage(FLAMEVIEW_SELECT_HTML_TOOLTIP_DESCRIPTION); + private static final String HTML_PAGE; + static { +- // from: https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph.css +- String cssD3Flamegraph = "jslibs/d3-flamegraph.css"; +- // from: https://d3js.org/d3.v6.min.js +- String jsD3V6 = "jslibs/d3.v6.min.js"; +- // from: https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph-tooltip.js +- String jsD3Tip = "jslibs/d3-flamegraph-tooltip.js"; +- // from: https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph.js +- String jsD3FlameGraph = "jslibs/d3-flamegraph.js"; +- // jmc flameview coloring, tooltip and other functions + String jsFlameviewName = "flameview.js"; + String cssFlameview = "flameview.css"; + +- String jsD3 = loadLibraries(jsD3V6, jsD3FlameGraph, jsD3Tip); +- String styleheets = loadLibraries(cssD3Flamegraph, cssFlameview); ++ String styleheets = fileContent(cssFlameview); + String jsFlameviewColoring = fileContent(jsFlameviewName); + + String magnifierIcon = getIconBase64(ImageConstants.ICON_MAGNIFIER); + + // formatter arguments for the template: %1 - CSSs stylesheets, +- // %2 - Search Icon Base64, %3 - 3rd party scripts, %4 - Flameview Coloring, +- HTML_PAGE = String.format(fileContent("page.template"), styleheets, magnifierIcon, jsD3, jsFlameviewColoring); ++ // %2 - Search Icon Base64, %3 - Flameview Coloring, ++ HTML_PAGE = String.format(fileContent("page.template"), styleheets, magnifierIcon, jsFlameviewColoring); + } + + private static final int MODEL_EXECUTOR_THREADS_NUMBER = 3; +@@ -490,14 +479,6 @@ public class FlameGraphView extends ViewPart implements ISelectionListener { + } + } + +- private static String loadLibraries(String ... libs) { +- if (libs == null || libs.length == 0) { +- return ""; +- } else { +- return Stream.of(libs).map(FlameGraphView::fileContent).collect(Collectors.joining("\n")); +- } +- } +- + private static String fileContent(String fileName) { + try { + return StringToolkit.readString(FlameGraphView.class.getClassLoader().getResourceAsStream(fileName)); +diff --git a/application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/page.template b/application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/page.template +index 67bc3c7..4f0b21c 100644 +--- a/application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/page.template ++++ b/application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/page.template +@@ -3,6 +3,7 @@ + + + ++ + +