Skip to content
Open
Show file tree
Hide file tree
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 Aug 3, 2026
ffc7abc
fix(deps): add condensed-data 0.1.1 reader jar to third-party p2 repo
parttimenerd Aug 3, 2026
a65e04b
Fix code formatting
parttimenerd Aug 3, 2026
80d854b
fix(deps): switch to condensed-data 0.1.2 main jar (includes WritingJ…
parttimenerd Aug 3, 2026
cf73c46
fix(cjfr): include flightrecorder.writer bundle in product
parttimenerd Aug 3, 2026
d5ad089
fix(cjfr): add Require-Bundle for writer to condensed-data bnd manifest
parttimenerd Aug 3, 2026
1690360
fix(cjfr): export writer impl packages so condensed-data can load them
parttimenerd Aug 3, 2026
d9ed8e1
fix(writer): add setGmtOffset/setRegion for timezone preservation
parttimenerd Aug 3, 2026
9806b35
fix(cjfr): add femtojson as p2 bundle for me.bechberger.util.json
parttimenerd Aug 3, 2026
e7af062
fix(ci): add femtojson unit to target platform definition
parttimenerd Aug 3, 2026
daf6e6e
fix(ci): wait for Jetty p2 site to be ready before application build
parttimenerd Aug 3, 2026
6193ba1
fix(ci): robust Jetty readiness check using HTTP status code
parttimenerd Aug 4, 2026
efd4d0b
ci: trigger Validation workflow
parttimenerd Aug 4, 2026
a9a77e1
fix: update copyright year to 2026 in MetadataImpl and RecordingImpl
parttimenerd Aug 4, 2026
51b8f87
Reduce diff
parttimenerd Aug 4, 2026
ef9b2e2
refactor(cjfr): inflate .cjfr to temp .jfr in CjfrEditor; drop CjfrRe…
parttimenerd Aug 4, 2026
e80a5f6
refactor(cjfr): drop femtojson as separate bundle (already shaded int…
parttimenerd Aug 4, 2026
2af3666
refactor(cjfr): override createPartControl instead of adding hook to …
parttimenerd Aug 4, 2026
70e0969
refactor(cjfr): remove license header from plugin.xml; drop Require-B…
parttimenerd Aug 4, 2026
31afb98
refactor(cjfr): revert writer changes (shaded copy already has timezo…
parttimenerd Aug 4, 2026
2404396
refactor(cjfr): use condensed-data -jmc jar; add flightrecorder.write…
parttimenerd Aug 4, 2026
9c83643
build(cjfr): bump condensed-data to 0.1.3
parttimenerd Aug 4, 2026
df7506c
ci: retrigger after Central sync
parttimenerd Aug 4, 2026
2e1dd28
ci: retrigger after condensed-data Central sync
parttimenerd Aug 4, 2026
ad5777b
fix(p2): use p2-maven-plugin artifact coordinate format — version last
parttimenerd Aug 4, 2026
b2b955b
fix(p2): use actual bnd-generated BSN me.bechberger.condensed.data.jmc
parttimenerd Aug 4, 2026
16cab89
fix(p2): bnd appends classifier to BSN — set base name without .jmc s…
parttimenerd Aug 4, 2026
b020d9f
fix(p2): remove Require-Bundle — writer is a workspace bundle, not a …
parttimenerd Aug 4, 2026
2fcbc18
fix(app): restore flightrecorder.writer Maven dependency in applicati…
parttimenerd Aug 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions application/org.openjdk.jmc.feature.flightrecorder/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,29 @@
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.openjdk.jmc.flightrecorder.writer"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.openjdk.jmc.flightrecorder.cjfr"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="me.bechberger.condensed.data"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="me.bechberger.util.femtojson"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>
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
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 application/org.openjdk.jmc.flightrecorder.cjfr/plugin.xml
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>
22 changes: 22 additions & 0 deletions application/org.openjdk.jmc.flightrecorder.cjfr/pom.xml
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>
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);
}
}
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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ public void createPartControl(Composite parent) {
resultContainer.addDisposeListener(e -> saveCurrentPageState());
ProgressIndicator progressIndicator = CompositeToolkit.createWaitIndicator(toolkit.createComposite(parent),
toolkit);
new RecordingLoader(this, progressIndicator).schedule();
createRecordingLoader(progressIndicator).schedule();
Comment thread
parttimenerd marked this conversation as resolved.
Outdated
}

protected RecordingLoader createRecordingLoader(ProgressIndicator progressIndicator) {
return new RecordingLoader(this, progressIndicator);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -162,8 +162,7 @@ public void run() {
});
}

private EventArrays doCreateRecording(File file, ProgressMonitor lm)
throws CouldNotLoadRecordingException, IOException {
protected EventArrays doCreateRecording(File file, Runnable lm) throws CouldNotLoadRecordingException, IOException {
// FIXME: Can we calculate available memory without resorting to System.gc?
System.gc();
Runtime runtime = Runtime.getRuntime();
Expand All @@ -184,7 +183,7 @@ private EventArrays doCreateRecording(File file, ProgressMonitor lm)
if (IOToolkit.isCompressedFile(file)) {
file = unzipFile(file);
}
return loadFromUnzippedFile(file, fileName, lm, availableMemory);
return loadFromUnzippedFile(file, fileName, (ProgressMonitor) lm, availableMemory);
}

private static void checkForJRockitRecording(EventArrays events) {
Expand Down Expand Up @@ -246,7 +245,7 @@ private EventArrays loadFromUnzippedFile(
throw new NotEnoughMemoryException();
}

private boolean shouldShowHiddenFrames() {
protected boolean shouldShowHiddenFrames() {
return FlightRecorderUI.getDefault().getPreferenceStore()
.getBoolean(PreferenceKeys.PROPERTY_STACKTRACE_SHOW_HIDDEN_FRAMES);
}
Expand Down
11 changes: 11 additions & 0 deletions application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<module>org.openjdk.jmc.flightrecorder.pde</module>
<module>org.openjdk.jmc.flightrecorder.rules.extensionprovider</module>
<module>org.openjdk.jmc.flightrecorder.ui</module>
<module>org.openjdk.jmc.flightrecorder.cjfr</module>
<module>org.openjdk.jmc.greychart</module>
<module>org.openjdk.jmc.greychart.ui</module>
<module>org.openjdk.jmc.ide.jdt</module>
Expand Down Expand Up @@ -160,6 +161,16 @@
<artifactId>flightrecorder.serializers</artifactId>
<version>${revision}${changelist}</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmc</groupId>
<artifactId>flightrecorder.writer</artifactId>
<version>${revision}${changelist}</version>
</dependency>
<dependency>
<groupId>me.bechberger.util</groupId>
<artifactId>femtojson</artifactId>
<version>0.4.1</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmc</groupId>
<artifactId>rjmx.common</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Bundle-Name: Mission Control Flight Recorder Writer
Bundle-SymbolicName: org.openjdk.jmc.flightrecorder.writer;singleton:=true
Bundle-Version: 10.0.0.qualifier
Bundle-Vendor: Oracle Corporation
Export-Package: org.openjdk.jmc.flightrecorder.writer.api
Export-Package: org.openjdk.jmc.flightrecorder.writer.api,
org.openjdk.jmc.flightrecorder.writer,
org.openjdk.jmc.flightrecorder.writer.util
Require-Bundle: org.openjdk.jmc.common;visibility:=reexport
Automatic-Module-Name: org.openjdk.jmc.flightrecorder.writer
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2025, Datadog, Inc. All rights reserved.
* Copyright (c) 2021, 2026, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2026, Datadog, Inc. All rights reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -66,6 +66,9 @@ final class MetadataImpl {
private static final String DIMENSION_KEY = "dimension";
private static final String ANNOTATION_KEY = "annotation";
private static final String VAL_1_VALUE = "1";
private static final String GMT_OFFSET_KEY = "gmtOffset";
private static final String LOCALE_KEY = "locale";
private static final long GMT_OFFSET_UNSET = Long.MIN_VALUE;

private final AtomicLong typeCounter = new AtomicLong(1);
private final ConstantPools constantPools;
Expand All @@ -75,6 +78,8 @@ final class MetadataImpl {
private final Set<ResolvableType> unresolvedTypes = new CopyOnWriteArraySet<>();

private volatile TypesImpl types;
private volatile long regionGmtOffsetMillis = GMT_OFFSET_UNSET;
private volatile String regionLocale;

MetadataImpl(ConstantPools constantPools) {
this.constantPools = constantPools;
Expand Down Expand Up @@ -106,6 +111,19 @@ private void fillStrings() {
storeString(REGION_KEY);
storeString(DIMENSION_KEY);
storeString(ANNOTATION_KEY);
storeString(GMT_OFFSET_KEY);
storeString(LOCALE_KEY);
}

void setRegion(long gmtOffsetMillis, String locale) {
this.regionGmtOffsetMillis = gmtOffsetMillis;
this.regionLocale = locale;
if (gmtOffsetMillis != GMT_OFFSET_UNSET) {
storeString(Long.toString(gmtOffsetMillis));
}
if (locale != null) {
storeString(locale);
}
}

/**
Expand Down Expand Up @@ -380,6 +398,17 @@ private void writeMetaEventWithSize(LEB128Writer metaWriter, LEB128Writer writer
}

private void writeRegion(LEB128Writer metaWriter) {
if (regionGmtOffsetMillis != GMT_OFFSET_UNSET) {
boolean hasLocale = regionLocale != null;
int attributes = hasLocale ? 2 : 1;
metaWriter.writeInt(stringIndex(REGION_KEY)).writeInt(attributes).writeInt(stringIndex(GMT_OFFSET_KEY))
.writeInt(stringIndex(Long.toString(regionGmtOffsetMillis)));
if (hasLocale) {
metaWriter.writeInt(stringIndex(LOCALE_KEY)).writeInt(stringIndex(regionLocale));
}
metaWriter.writeInt(0); // 0 child elements
return;
}
metaWriter.writeInt(stringIndex(REGION_KEY)).writeInt(0) // 0 attributes
.writeInt(0); // 0 elements
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2025, Datadog, Inc. All rights reserved.
* Copyright (c) 2021, 2026, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2026, Datadog, Inc. All rights reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -160,6 +160,10 @@ private void processChunkDataQueue(long pollTimeout, TimeUnit timeUnit) throws I
}
}

public void setGmtOffset(long gmtOffsetMillis, String locale) {
metadata.setRegion(gmtOffsetMillis, locale);
}

@Override
public RecordingImpl rotateChunk() {
Chunk chunk = getChunk();
Expand Down
2 changes: 1 addition & 1 deletion core/org.openjdk.jmc.flightrecorder/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Bundle-Vendor: Oracle Corporation
Eclipse-BuddyPolicy: app
Eclipse-ExtensibleAPI: true
Export-Package: org.openjdk.jmc.flightrecorder,
org.openjdk.jmc.flightrecorder.internal;x-friends:="org.openjdk.jmc.flightrecorder.ui,org.openjdk.jmc.flightrecorder.configuration",
org.openjdk.jmc.flightrecorder.internal;x-friends:="org.openjdk.jmc.flightrecorder.ui,org.openjdk.jmc.flightrecorder.configuration,org.openjdk.jmc.flightrecorder.cjfr",
org.openjdk.jmc.flightrecorder.internal.util;x-friends:="org.openjdk.jmc.flightrecorder.test",
org.openjdk.jmc.flightrecorder.jdk,
org.openjdk.jmc.flightrecorder.memleak,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
<unit id="fireplace-swing-animation" version="0.0.1.rc9"/>
<unit id="radiance-animation" version="8.5.0"/>
<unit id="org.awaitility" version="4.0.0"/>
<unit id="me.bechberger.condensed.data" version="0.1.2"/>
<unit id="me.bechberger.util.femtojson" version="0.4.1"/>
<repository location="http://localhost:8080/site"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
Expand Down
Loading