forked from openjdk/jmc
-
Notifications
You must be signed in to change notification settings - Fork 3
Support condensed-data directly in JMC #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
parttimenerd
wants to merge
29
commits into
SAP:sap
Choose a base branch
from
parttimenerd:sap
base: sap
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 14 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
bf58f80
feat(cjfr): add native .cjfr file support to JMC
parttimenerd ffc7abc
fix(deps): add condensed-data 0.1.1 reader jar to third-party p2 repo
parttimenerd a65e04b
Fix code formatting
parttimenerd 80d854b
fix(deps): switch to condensed-data 0.1.2 main jar (includes WritingJ…
parttimenerd cf73c46
fix(cjfr): include flightrecorder.writer bundle in product
parttimenerd d5ad089
fix(cjfr): add Require-Bundle for writer to condensed-data bnd manifest
parttimenerd 1690360
fix(cjfr): export writer impl packages so condensed-data can load them
parttimenerd d9ed8e1
fix(writer): add setGmtOffset/setRegion for timezone preservation
parttimenerd 9806b35
fix(cjfr): add femtojson as p2 bundle for me.bechberger.util.json
parttimenerd e7af062
fix(ci): add femtojson unit to target platform definition
parttimenerd daf6e6e
fix(ci): wait for Jetty p2 site to be ready before application build
parttimenerd 6193ba1
fix(ci): robust Jetty readiness check using HTTP status code
parttimenerd efd4d0b
ci: trigger Validation workflow
parttimenerd a9a77e1
fix: update copyright year to 2026 in MetadataImpl and RecordingImpl
parttimenerd 51b8f87
Reduce diff
parttimenerd ef9b2e2
refactor(cjfr): inflate .cjfr to temp .jfr in CjfrEditor; drop CjfrRe…
parttimenerd e80a5f6
refactor(cjfr): drop femtojson as separate bundle (already shaded int…
parttimenerd 2af3666
refactor(cjfr): override createPartControl instead of adding hook to …
parttimenerd 70e0969
refactor(cjfr): remove license header from plugin.xml; drop Require-B…
parttimenerd 31afb98
refactor(cjfr): revert writer changes (shaded copy already has timezo…
parttimenerd 2404396
refactor(cjfr): use condensed-data -jmc jar; add flightrecorder.write…
parttimenerd 9c83643
build(cjfr): bump condensed-data to 0.1.3
parttimenerd df7506c
ci: retrigger after Central sync
parttimenerd 2e1dd28
ci: retrigger after condensed-data Central sync
parttimenerd ad5777b
fix(p2): use p2-maven-plugin artifact coordinate format — version last
parttimenerd b2b955b
fix(p2): use actual bnd-generated BSN me.bechberger.condensed.data.jmc
parttimenerd 16cab89
fix(p2): bnd appends classifier to BSN — set base name without .jmc s…
parttimenerd b020d9f
fix(p2): remove Require-Bundle — writer is a workspace bundle, not a …
parttimenerd 2fcbc18
fix(app): restore flightrecorder.writer Maven dependency in applicati…
parttimenerd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
application/org.openjdk.jmc.flightrecorder.cjfr/META-INF/MANIFEST.MF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| Manifest-Version: 1.0 | ||
| Bundle-ManifestVersion: 2 | ||
| Bundle-RequiredExecutionEnvironment: JavaSE-21 | ||
| Bundle-Name: Condensed Flight Recording Plug-in | ||
| Bundle-SymbolicName: org.openjdk.jmc.flightrecorder.cjfr;singleton:=true | ||
| Bundle-Version: 10.0.0.qualifier | ||
| Bundle-Vendor: Johannes Bechberger | ||
| Require-Bundle: org.eclipse.ui, | ||
| org.eclipse.core.runtime, | ||
| org.openjdk.jmc.flightrecorder, | ||
| org.openjdk.jmc.flightrecorder.ui, | ||
| org.openjdk.jmc.flightrecorder.writer, | ||
| me.bechberger.condensed.data | ||
| Import-Package: org.eclipse.jface.dialogs, | ||
| org.openjdk.jmc.flightrecorder, | ||
| org.openjdk.jmc.flightrecorder.internal, | ||
| org.openjdk.jmc.flightrecorder.ui, | ||
| me.bechberger.condensed, | ||
| me.bechberger.jfr | ||
| Bundle-ActivationPolicy: lazy | ||
| Automatic-Module-Name: org.openjdk.jmc.flightrecorder.cjfr |
5 changes: 5 additions & 0 deletions
5
application/org.openjdk.jmc.flightrecorder.cjfr/build.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| source.. = src/main/java/ | ||
| output.. = target/classes/ | ||
| bin.includes = META-INF/,\ | ||
| plugin.xml,\ | ||
| . |
14 changes: 14 additions & 0 deletions
14
application/org.openjdk.jmc.flightrecorder.cjfr/plugin.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <?eclipse version="3.4"?> | ||
| <plugin> | ||
| <extension | ||
| point="org.eclipse.ui.editors"> | ||
| <editor | ||
| class="org.openjdk.jmc.flightrecorder.cjfr.CjfrEditor" | ||
| extensions="cjfr" | ||
| icon="platform:/plugin/org.openjdk.jmc.flightrecorder.ui/icons/jfr.png" | ||
| id="org.openjdk.jmc.flightrecorder.cjfr.CjfrEditor" | ||
| name="Condensed Flight Recording"> | ||
| </editor> | ||
| </extension> | ||
| </plugin> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| Copyright (c) 2026, Johannes Bechberger and/or its affiliates. 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 https://oss.oracle.com/licenses/upl | ||
| --> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
| <parent> | ||
| <groupId>org.openjdk.jmc</groupId> | ||
| <artifactId>missioncontrol.application</artifactId> | ||
| <version>${revision}${changelist}</version> | ||
| </parent> | ||
| <artifactId>org.openjdk.jmc.flightrecorder.cjfr</artifactId> | ||
| <packaging>eclipse-plugin</packaging> | ||
| <properties> | ||
| <jmc.config.path>${project.basedir}/../../configuration</jmc.config.path> | ||
| </properties> | ||
| </project> |
27 changes: 27 additions & 0 deletions
27
...jmc.flightrecorder.cjfr/src/main/java/org/openjdk/jmc/flightrecorder/cjfr/CjfrEditor.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /* | ||
| * Copyright (c) 2026, Johannes Bechberger and/or its affiliates. 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 https://oss.oracle.com/licenses/upl | ||
| */ | ||
| package org.openjdk.jmc.flightrecorder.cjfr; | ||
|
|
||
| import org.eclipse.jface.dialogs.ProgressIndicator; | ||
| import org.openjdk.jmc.flightrecorder.ui.JfrEditor; | ||
| import org.openjdk.jmc.flightrecorder.ui.RecordingLoader; | ||
|
|
||
| /** | ||
| * Eclipse editor for .cjfr (condensed JFR) files. Inflates the recording to standard JFR bytes in | ||
| * memory and hands them to the standard JFR loading machinery. | ||
| */ | ||
| public class CjfrEditor extends JfrEditor { | ||
|
|
||
| public static final String EDITOR_ID = "org.openjdk.jmc.flightrecorder.cjfr.CjfrEditor"; //$NON-NLS-1$ | ||
|
|
||
| @Override | ||
| protected RecordingLoader createRecordingLoader(ProgressIndicator progressIndicator) { | ||
| return new CjfrRecordingLoader(this, progressIndicator); | ||
| } | ||
| } |
56 changes: 56 additions & 0 deletions
56
...trecorder.cjfr/src/main/java/org/openjdk/jmc/flightrecorder/cjfr/CjfrRecordingLoader.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| /* | ||
| * Copyright (c) 2026, Johannes Bechberger and/or its affiliates. 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 https://oss.oracle.com/licenses/upl | ||
| */ | ||
| package org.openjdk.jmc.flightrecorder.cjfr; | ||
|
|
||
| import java.io.BufferedInputStream; | ||
| import java.io.ByteArrayInputStream; | ||
| import java.io.ByteArrayOutputStream; | ||
| import java.io.File; | ||
| import java.io.FileInputStream; | ||
| import java.io.IOException; | ||
|
|
||
| import org.eclipse.jface.dialogs.ProgressIndicator; | ||
| import org.openjdk.jmc.flightrecorder.CouldNotLoadRecordingException; | ||
| import org.openjdk.jmc.flightrecorder.JfrLoaderToolkit; | ||
| import org.openjdk.jmc.flightrecorder.internal.EventArrays; | ||
| import org.openjdk.jmc.flightrecorder.ui.FlightRecorderUI; | ||
| import org.openjdk.jmc.flightrecorder.ui.JfrEditor; | ||
| import org.openjdk.jmc.flightrecorder.ui.RecordingLoader; | ||
|
|
||
| import me.bechberger.condensed.CondensedInputStream; | ||
| import me.bechberger.jfr.BasicJFRReader; | ||
| import me.bechberger.jfr.WritingJFRReader; | ||
|
|
||
| /** | ||
| * Loads a .cjfr file by inflating it to standard JFR bytes in memory, then delegating to | ||
| * {@link JfrLoaderToolkit#loadStream}. | ||
| */ | ||
| public class CjfrRecordingLoader extends RecordingLoader { | ||
|
|
||
| public CjfrRecordingLoader(JfrEditor editor, ProgressIndicator ui) { | ||
| super(editor, ui); | ||
| } | ||
|
|
||
| @Override | ||
| protected EventArrays doCreateRecording(File file, Runnable lm) throws CouldNotLoadRecordingException, IOException { | ||
| if (!file.getName().endsWith(".cjfr")) { //$NON-NLS-1$ | ||
| return super.doCreateRecording(file, lm); | ||
| } | ||
| ByteArrayOutputStream baos = new ByteArrayOutputStream(); | ||
| try (CondensedInputStream cin = new CondensedInputStream(new BufferedInputStream(new FileInputStream(file)))) { | ||
| BasicJFRReader reader = new BasicJFRReader(cin); | ||
| WritingJFRReader.toJFRStream(reader, baos); | ||
| } | ||
| boolean hideExperimentals = !FlightRecorderUI.getDefault().includeExperimentalEventsAndFields(); | ||
| boolean ignoreTruncated = FlightRecorderUI.getDefault().allowIncompleteRecordingFile(); | ||
| boolean showHiddenFrames = shouldShowHiddenFrames(); | ||
| return JfrLoaderToolkit.loadStream(new ByteArrayInputStream(baos.toByteArray()), hideExperimentals, | ||
| ignoreTruncated, showHiddenFrames); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.