aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2022-09-30 23:19:51 +0200
committerNassim Jahnke <[email protected]>2022-09-30 23:19:51 +0200
commitf5fa69173cb59bf9fb4420163a25e305c7218b6b (patch)
treeb57e694ad3a8da68d926229dd1109fc66a886909
parent14c32bc43d640d7152c82ac6ca64496137227995 (diff)
downloadPaper-f5fa69173cb59bf9fb4420163a25e305c7218b6b.tar.gz
Paper-f5fa69173cb59bf9fb4420163a25e305c7218b6b.zip
Don't print full packages in new chunk system classes
Closes #8391, #8412
-rw-r--r--patches/server/0008-MC-Utils.patch14
-rw-r--r--patches/server/0016-Rewrite-chunk-system.patch48
2 files changed, 36 insertions, 26 deletions
diff --git a/patches/server/0008-MC-Utils.patch b/patches/server/0008-MC-Utils.patch
index 41a5d247a4..fba0b7f2ae 100644
--- a/patches/server/0008-MC-Utils.patch
+++ b/patches/server/0008-MC-Utils.patch
@@ -2156,6 +2156,20 @@ index 0000000000000000000000000000000000000000..b3329c6fcd6758a781a51f5ba8f5052a
+ return (this.backingSet & (1L << element.ordinal())) != 0;
+ }
+}
+diff --git a/src/main/java/com/mojang/logging/LogUtils.java b/src/main/java/com/mojang/logging/LogUtils.java
+index 46cab7a8c7b87ab01b26074b04f5a02b3907cfc4..49019b4a9bc4e634d54a9b0acaf9229a5c896f85 100644
+--- a/src/main/java/com/mojang/logging/LogUtils.java
++++ b/src/main/java/com/mojang/logging/LogUtils.java
+@@ -61,4 +61,9 @@ public class LogUtils {
+ public static Logger getLogger() {
+ return LoggerFactory.getLogger(STACK_WALKER.getCallerClass());
+ }
++ // Paper start
++ public static Logger getClassLogger() {
++ return LoggerFactory.getLogger(STACK_WALKER.getCallerClass().getSimpleName());
++ }
++ // Paper end
+ }
diff --git a/src/main/java/io/papermc/paper/chunk/SingleThreadChunkRegionManager.java b/src/main/java/io/papermc/paper/chunk/SingleThreadChunkRegionManager.java
new file mode 100644
index 0000000000000000000000000000000000000000..0b71cf7a462d25c3e4f910e09a37270ce9bc7776
diff --git a/patches/server/0016-Rewrite-chunk-system.patch b/patches/server/0016-Rewrite-chunk-system.patch
index f306e183c7..3a89d48b8c 100644
--- a/patches/server/0016-Rewrite-chunk-system.patch
+++ b/patches/server/0016-Rewrite-chunk-system.patch
@@ -2437,7 +2437,7 @@ index 0000000000000000000000000000000000000000..dd501e83d991e45598509134fab05baf
+}
diff --git a/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java b/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java
new file mode 100644
-index 0000000000000000000000000000000000000000..7d7540cb917564c497eb3a5ef98fb068944694ea
+index 0000000000000000000000000000000000000000..7d37b2b02dd64acdac7e5981bebcf988e2f5a7c1
--- /dev/null
+++ b/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java
@@ -0,0 +1,839 @@
@@ -2480,7 +2480,7 @@ index 0000000000000000000000000000000000000000..7d7540cb917564c497eb3a5ef98fb068
+
+public final class EntityLookup implements LevelEntityGetter<Entity> {
+
-+ private static final Logger LOGGER = LogUtils.getLogger();
++ private static final Logger LOGGER = LogUtils.getClassLogger();
+
+ protected static final int REGION_SHIFT = 5;
+ protected static final int REGION_MASK = (1 << REGION_SHIFT) - 1;
@@ -3282,7 +3282,7 @@ index 0000000000000000000000000000000000000000..7d7540cb917564c497eb3a5ef98fb068
+}
diff --git a/src/main/java/io/papermc/paper/chunk/system/io/RegionFileIOThread.java b/src/main/java/io/papermc/paper/chunk/system/io/RegionFileIOThread.java
new file mode 100644
-index 0000000000000000000000000000000000000000..de137486f610e9042853512f630b9dcc74b29280
+index 0000000000000000000000000000000000000000..a08cde4eefe879adcee7c4118bc38f98c5097ed0
--- /dev/null
+++ b/src/main/java/io/papermc/paper/chunk/system/io/RegionFileIOThread.java
@@ -0,0 +1,1328 @@
@@ -3330,7 +3330,7 @@ index 0000000000000000000000000000000000000000..de137486f610e9042853512f630b9dcc
+ */
+public final class RegionFileIOThread extends PrioritisedQueueExecutorThread {
+
-+ private static final Logger LOGGER = LogUtils.getLogger();
++ private static final Logger LOGGER = LogUtils.getClassLogger();
+
+ /**
+ * The kinds of region files controlled by the region file thread. Add more when needed, and ensure
@@ -4307,7 +4307,7 @@ index 0000000000000000000000000000000000000000..de137486f610e9042853512f630b9dcc
+
+ static final class InProgressRead {
+
-+ private static final Logger LOGGER = LogUtils.getLogger();
++ private static final Logger LOGGER = LogUtils.getClassLogger();
+
+ CompoundTag value;
+ Throwable throwable;
@@ -4449,7 +4449,7 @@ index 0000000000000000000000000000000000000000..de137486f610e9042853512f630b9dcc
+
+ protected static final CompoundTag NOTHING_TO_WRITE = new CompoundTag();
+
-+ private static final Logger LOGGER = LogUtils.getLogger();
++ private static final Logger LOGGER = LogUtils.getClassLogger();
+
+ RegionFileIOThread.InProgressRead inProgressRead;
+ volatile CompoundTag inProgressWrite = NOTHING_TO_WRITE; // only needs to be acquire/release
@@ -4902,7 +4902,7 @@ index 0000000000000000000000000000000000000000..0b7a2b0ead4f3bc07bfd9a38c2b7cf02
+}
diff --git a/src/main/java/io/papermc/paper/chunk/system/poi/PoiChunk.java b/src/main/java/io/papermc/paper/chunk/system/poi/PoiChunk.java
new file mode 100644
-index 0000000000000000000000000000000000000000..1695ef1d1ed2e067665431063fbca7f51873af32
+index 0000000000000000000000000000000000000000..dc298e61e2d479801c8469b2067a8f8bcb076b1d
--- /dev/null
+++ b/src/main/java/io/papermc/paper/chunk/system/poi/PoiChunk.java
@@ -0,0 +1,213 @@
@@ -4928,7 +4928,7 @@ index 0000000000000000000000000000000000000000..1695ef1d1ed2e067665431063fbca7f5
+
+public final class PoiChunk {
+
-+ private static final Logger LOGGER = LogUtils.getLogger();
++ private static final Logger LOGGER = LogUtils.getClassLogger();
+
+ public final ServerLevel world;
+ public final int chunkX;
@@ -5121,15 +5121,14 @@ index 0000000000000000000000000000000000000000..1695ef1d1ed2e067665431063fbca7f5
+}
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkFullTask.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkFullTask.java
new file mode 100644
-index 0000000000000000000000000000000000000000..b02619d7111c52d1b4e3b50267e54da31d6161e3
+index 0000000000000000000000000000000000000000..fb42d776f15f735fb59e972e00e2b512c23a8387
--- /dev/null
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkFullTask.java
-@@ -0,0 +1,125 @@
+@@ -0,0 +1,121 @@
+package io.papermc.paper.chunk.system.scheduling;
+
+import ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor;
+import ca.spottedleaf.concurrentutil.util.ConcurrentUtil;
-+import com.mojang.logging.LogUtils;
+import net.minecraft.server.level.ChunkMap;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.world.level.chunk.ChunkAccess;
@@ -5137,13 +5136,10 @@ index 0000000000000000000000000000000000000000..b02619d7111c52d1b4e3b50267e54da3
+import net.minecraft.world.level.chunk.ImposterProtoChunk;
+import net.minecraft.world.level.chunk.LevelChunk;
+import net.minecraft.world.level.chunk.ProtoChunk;
-+import org.slf4j.Logger;
+import java.lang.invoke.VarHandle;
+
+public final class ChunkFullTask extends ChunkProgressionTask implements Runnable {
+
-+ private static final Logger LOGGER = LogUtils.getLogger();
-+
+ protected final NewChunkHolder chunkHolder;
+ protected final ChunkAccess fromChunk;
+ protected final PrioritisedExecutor.PrioritisedTask convertToFullTask;
@@ -5252,7 +5248,7 @@ index 0000000000000000000000000000000000000000..b02619d7111c52d1b4e3b50267e54da3
+}
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
new file mode 100644
-index 0000000000000000000000000000000000000000..a07d920d453c8687ed86d9f9449537c3eb18041e
+index 0000000000000000000000000000000000000000..d220507e1a432883d3092720e3634e8d1d961dbe
--- /dev/null
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
@@ -0,0 +1,1190 @@
@@ -5313,7 +5309,7 @@ index 0000000000000000000000000000000000000000..a07d920d453c8687ed86d9f9449537c3
+
+public final class ChunkHolderManager {
+
-+ private static final Logger LOGGER = LogUtils.getLogger();
++ private static final Logger LOGGER = LogUtils.getClassLogger();
+
+ public static final int FULL_LOADED_TICKET_LEVEL = 33;
+ public static final int BLOCK_TICKING_TICKET_LEVEL = 32;
@@ -6635,7 +6631,7 @@ index 0000000000000000000000000000000000000000..53ddd7e9ac05e6a9eb809f329796e6d4
+}
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkLoadTask.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkLoadTask.java
new file mode 100644
-index 0000000000000000000000000000000000000000..1e2b8e457aabba2a5d1fabfba22be2faa1d3f45d
+index 0000000000000000000000000000000000000000..2410210739420ca7b384633dd7560759f04743c7
--- /dev/null
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkLoadTask.java
@@ -0,0 +1,499 @@
@@ -6670,7 +6666,7 @@ index 0000000000000000000000000000000000000000..1e2b8e457aabba2a5d1fabfba22be2fa
+
+public final class ChunkLoadTask extends ChunkProgressionTask {
+
-+ private static final Logger LOGGER = LogUtils.getLogger();
++ private static final Logger LOGGER = LogUtils.getClassLogger();
+
+ private final NewChunkHolder chunkHolder;
+ private final ChunkDataLoadTask loadTask;
@@ -7251,7 +7247,7 @@ index 0000000000000000000000000000000000000000..322675a470eacbf0e5452f4009c643f2
+}
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkTaskScheduler.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkTaskScheduler.java
new file mode 100644
-index 0000000000000000000000000000000000000000..2b4e3f31d7c31aa5a4a5a18ba9e1d8b3f232fd16
+index 0000000000000000000000000000000000000000..c43c62fb22a26e4e3f5df4001f1b3e65d3833833
--- /dev/null
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkTaskScheduler.java
@@ -0,0 +1,780 @@
@@ -7296,7 +7292,7 @@ index 0000000000000000000000000000000000000000..2b4e3f31d7c31aa5a4a5a18ba9e1d8b3
+
+public final class ChunkTaskScheduler {
+
-+ private static final Logger LOGGER = LogUtils.getLogger();
++ private static final Logger LOGGER = LogUtils.getClassLogger();
+
+ static int newChunkSystemIOThreads;
+ static int newChunkSystemWorkerThreads;
@@ -8037,7 +8033,7 @@ index 0000000000000000000000000000000000000000..2b4e3f31d7c31aa5a4a5a18ba9e1d8b3
+}
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkUpgradeGenericStatusTask.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkUpgradeGenericStatusTask.java
new file mode 100644
-index 0000000000000000000000000000000000000000..e96ecf351a1952b4e23e9a352f32d326146380e7
+index 0000000000000000000000000000000000000000..73ce0909bd89244835a0d0f2030a25871461f1e0
--- /dev/null
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkUpgradeGenericStatusTask.java
@@ -0,0 +1,209 @@
@@ -8062,7 +8058,7 @@ index 0000000000000000000000000000000000000000..e96ecf351a1952b4e23e9a352f32d326
+
+public final class ChunkUpgradeGenericStatusTask extends ChunkProgressionTask implements Runnable {
+
-+ private static final Logger LOGGER = LogUtils.getLogger();
++ private static final Logger LOGGER = LogUtils.getClassLogger();
+
+ protected final ChunkAccess fromChunk;
+ protected final ChunkStatus fromStatus;
@@ -8252,7 +8248,7 @@ index 0000000000000000000000000000000000000000..e96ecf351a1952b4e23e9a352f32d326
+}
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/GenericDataLoadTask.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/GenericDataLoadTask.java
new file mode 100644
-index 0000000000000000000000000000000000000000..ffbfaef2a57f0f26d0143f3a8fcf937bee7e7398
+index 0000000000000000000000000000000000000000..396d72c00e47cf1669ae20dc839c1c961b1f262a
--- /dev/null
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/GenericDataLoadTask.java
@@ -0,0 +1,746 @@
@@ -8276,7 +8272,7 @@ index 0000000000000000000000000000000000000000..ffbfaef2a57f0f26d0143f3a8fcf937b
+
+public abstract class GenericDataLoadTask<OnMain,FinalCompletion> {
+
-+ private static final Logger LOGGER = LogUtils.getLogger();
++ private static final Logger LOGGER = LogUtils.getClassLogger();
+
+ protected static final CompoundTag CANCELLED_DATA = new CompoundTag();
+
@@ -9004,7 +9000,7 @@ index 0000000000000000000000000000000000000000..ffbfaef2a57f0f26d0143f3a8fcf937b
+}
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
new file mode 100644
-index 0000000000000000000000000000000000000000..9a4ec0f1fb3bac0e84e6bd3aaeb77f44e248aadb
+index 0000000000000000000000000000000000000000..dd9c1d68a2bc42467b4566953aaed028bddf0f74
--- /dev/null
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
@@ -0,0 +1,2071 @@
@@ -9055,7 +9051,7 @@ index 0000000000000000000000000000000000000000..9a4ec0f1fb3bac0e84e6bd3aaeb77f44
+
+public final class NewChunkHolder {
+
-+ private static final Logger LOGGER = LogUtils.getLogger();
++ private static final Logger LOGGER = LogUtils.getClassLogger();
+
+ public static final Thread.UncaughtExceptionHandler CHUNKSYSTEM_UNCAUGHT_EXCEPTION_HANDLER = new Thread.UncaughtExceptionHandler() {
+ @Override