mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
33 lines
1.9 KiB
Diff
33 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: hayanesuru <hayanesuru@outlook.jp>
|
|
Date: Sat, 7 Jun 2025 20:33:16 +0900
|
|
Subject: [PATCH] dump pwt thread
|
|
|
|
|
|
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
|
index e45d5da04428c26fc6aa97fba974bde3573d7950..16e5ab49bc96f64143eb9e0dff19b33a7e3b5f3a 100644
|
|
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
|
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
|
@@ -126,6 +126,21 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre
|
|
WatchdogThread.dumpThread(ManagementFactory.getThreadMXBean().getThreadInfo(MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE), logger);
|
|
logger.log(Level.SEVERE, "------------------------------");
|
|
|
|
+ // Leaf start - dump pwt thread
|
|
+ logger.log(Level.SEVERE, "Parallel world ticking thread dump");
|
|
+ for (Thread thread : org.apache.commons.lang3.ThreadUtils.getAllThreads()) {
|
|
+ if (MinecraftServer.getServer().serverThread == thread || thread instanceof WatchdogThread) {
|
|
+ continue;
|
|
+ }
|
|
+ if (thread instanceof ca.spottedleaf.moonrise.common.util.TickThread tickThread) {
|
|
+ if (tickThread instanceof ServerLevelTickThread tickThread1) {
|
|
+ WatchdogThread.dumpThread(ManagementFactory.getThreadMXBean().getThreadInfo(tickThread1.threadId(), Integer.MAX_VALUE), logger);
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+ logger.log(Level.SEVERE, "------------------------------");
|
|
+ // Leaf end - dump pwt thread
|
|
+
|
|
// Paper start - Only print full dump on long timeouts
|
|
if (isLongTimeout) {
|
|
logger.log(Level.SEVERE, "Entire Thread Dump:");
|