Skip to content

Commit

Permalink
wip use jnf variant
Browse files Browse the repository at this point in the history
  • Loading branch information
bric3 committed Feb 7, 2022
1 parent ddd125e commit 94849a7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repositories {
dependencies {
implementation(libs.bundles.flatlaf)
// implementation(libs.darklaf)
implementation("com.github.weisj:darklaf-platform-preferences:latest.integration")
implementation("com.github.weisj:darklaf-platform-preferences-jnf:latest.integration")
implementation(libs.flightrecorder)

// implementation(libs.graal.sdk)
Expand Down
41 changes: 21 additions & 20 deletions src/main/java/com/github/bric3/fireplace/FirePlaceMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ public static void main(String[] args) {
return events;
}).join());

// otherEvents(events);
// otherEvents(events);


// events.apply(ItemFilters.type(Set.of(
// "jdk.CPULoad"
// )));
// events.apply(ItemFilters.type(Set.of(
// "jdk.CPULoad"
// )));

setupLaF();
if (Boolean.getBoolean("fireplace.swing.debug")) {
Expand Down Expand Up @@ -134,7 +134,7 @@ public static void main(String[] args) {
jTabbedPane.addTab(ALLOCATIONS, allocationFlameGraphPanel);
jTabbedPane.addTab(CPU, cpuFlameGraphPanel);
jTabbedPane.setTabPlacement(JTabbedPane.BOTTOM);
// jTabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
// jTabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);

jTabbedPane.addChangeListener(e -> updateTabContent(jTabbedPane, nativeLibs, sysProps, eventSupplier.get()));

Expand Down Expand Up @@ -236,6 +236,7 @@ private static void setupLaF() {
Colors.setDarkMode(false);
break;
}
// Logger.getLogger("com.github.weisj.darklaf").setLevel(Level.INFO);
// Runtime.getRuntime().addShutdownHook(new Thread(() -> manager.enableReporting(false)));
}

Expand Down Expand Up @@ -273,22 +274,22 @@ private static StacktraceTreeModel stackTraceAllocationFun(IItemCollection event
return new StacktraceTreeModel(allocCollection,
methodFrameSeparator,
false
// , JdkAttributes.ALLOCATION_SIZE
// , JdkAttributes.ALLOCATION_SIZE
);


// allocCollection.forEach(eventsCollection -> {
// var stackAccessor = eventsCollection.getType().getAccessor(JfrAttributes.EVENT_STACKTRACE.getKey());
// eventsCollection.stream().limit(10).forEach(item -> {
// var stack = stackAccessor.getMember(item);
//
// if (stack == null || stack.getFrames() == null) {
// return;
// }
//
//
// });
// });
// allocCollection.forEach(eventsCollection -> {
// var stackAccessor = eventsCollection.getType().getAccessor(JfrAttributes.EVENT_STACKTRACE.getKey());
// eventsCollection.stream().limit(10).forEach(item -> {
// var stack = stackAccessor.getMember(item);
//
// if (stack == null || stack.getFrames() == null) {
// return;
// }
//
//
// });
// });
}

private static StacktraceTreeModel stackTraceCPUFun(IItemCollection events) {
Expand All @@ -301,7 +302,7 @@ private static StacktraceTreeModel stackTraceCPUFun(IItemCollection events) {
return new StacktraceTreeModel(allocCollection,
methodFrameSeparator,
false
// , JdkAttributes.SAMPLE_WEIGHT
// , JdkAttributes.SAMPLE_WEIGHT
);
}

Expand All @@ -310,7 +311,7 @@ private static void otherEvents(IItemCollection events) {
"jdk.CPUInformation",
"jdk.OSInformation",
"jdk.ActiveRecording",
// "jdk.ActiveSetting", // async profiler settings ?
// "jdk.ActiveSetting", // async profiler settings ?
"jdk.JVMInformation"
))).forEach(eventsCollection -> {
eventsCollection.stream().limit(10).forEach(event -> {
Expand Down

0 comments on commit 94849a7

Please sign in to comment.