9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-27 19:09:22 +00:00
Files
Leaf/leaf-server/paper-patches/features/0054-dump-pwt-thread.patch
hayanesuru 23b7b02eee optimize chunk map (#438)
* rebase

* optimize LivingEntity#travel

* cleanup

* Replace fluid height map

* reuse array list in Entity#collide

* cleanup

* fix fire and liquid collision shape

* fix checkInside

* inline betweenClosed

* cleanup

* optimize getOnPos

* optimize equals in getOnPos

* update mainSupportingBlockPos on dirty

* cleanup

* rename

* merge same patch

* rebase and remove properly

* [ci skip] cleanup

* rebase and rebuild

* fix async locator

* remove async locator

* cleanup

* rebase

---------

Co-authored-by: Taiyou06 <kaandindar21@gmail.com>
2025-08-19 20:48:26 +02:00

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 79eae898539f71a73525ed29d8a752f65f5f67fa..e98279e78c9f5ddbd6dd0cdf48973453304b8e1c 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -124,6 +124,21 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre
WatchdogThread.dumpThread(ManagementFactory.getThreadMXBean().getThreadInfo(MinecraftServer.getServer().serverThread.threadId(), 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:");