Archiviert
13
0

Add thread naes to their own patch.

Dieser Commit ist enthalten in:
md_5 2013-04-23 11:50:42 +10:00
Ursprung 18520d21b2
Commit 8614adffd3
7 geänderte Dateien mit 86 neuen und 81 gelöschten Zeilen

Datei anzeigen

@ -1,6 +1,6 @@
From 37052de31a36a7565122c58b9fe743dc2a046e45 Mon Sep 17 00:00:00 2001
From f29d525666c67bdc26e351f7dbd17d55a742676f Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 19 Apr 2013 17:44:39 +1000
Date: Tue, 23 Apr 2013 11:47:32 +1000
Subject: [PATCH] Netty
Implement an uber efficient network engine based on the
@ -48,18 +48,9 @@ index 3e02cc3..f2b6e35 100644
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index bd7e41c..93cd0a9 100644
index bd7e41c..b04d8a1 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -34,7 +34,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
super(options);
// CraftBukkit end
this.l = new ConsoleLogManager("Minecraft-Server", (String) null, (String) null); // CraftBukkit - null last argument
- new ThreadSleepForever(this);
+ // new ThreadSleepForever(this); // Spigot
}
protected boolean init() throws java.net.UnknownHostException { // CraftBukkit - throws UnknownHostException
@@ -91,10 +91,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
this.getLogger().info("Generating keypair");
@ -148,7 +139,7 @@ index 84dbb88..617b474 100644
this.d = chunkmap.c;
this.c = chunkmap.b;
diff --git a/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java b/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java
index 9f8afe3..b1d3a17 100644
index 9f8afe3..a89c9c9 100644
--- a/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java
+++ b/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java
@@ -24,7 +24,7 @@ public class Packet56MapChunkBulk extends Packet {
@ -156,7 +147,7 @@ index 9f8afe3..b1d3a17 100644
protected Deflater initialValue() {
// Don't use higher compression level, slows things down too much
- return new Deflater(6);
+ return new Deflater(4);
+ return new Deflater(4); // Spigot - use lower compression level still
}
};
// CraftBukkit end
@ -213,43 +204,11 @@ index eb474f5..836ad94 100644
this.b = true;
} catch (Exception exception) {
diff --git a/src/main/java/net/minecraft/server/ThreadCommandReader.java b/src/main/java/net/minecraft/server/ThreadCommandReader.java
index 489e184..9533b6f 100644
--- a/src/main/java/net/minecraft/server/ThreadCommandReader.java
+++ b/src/main/java/net/minecraft/server/ThreadCommandReader.java
@@ -11,6 +11,7 @@ class ThreadCommandReader extends Thread {
final DedicatedServer server;
ThreadCommandReader(DedicatedServer dedicatedserver) {
+ super("Command Reader Thread"); // Spigot
this.server = dedicatedserver;
}
diff --git a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
index 9ed3db5..a2a4458 100644
--- a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
+++ b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
@@ -21,6 +21,7 @@ class ThreadLoginVerifier extends Thread {
CraftServer server;
ThreadLoginVerifier(PendingConnection pendingconnection, CraftServer server) {
+ super("Login Verifier Thread");
this.server = server;
// CraftBukkit end
this.pendingConnection = pendingconnection;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 20d38b4..a85d0c8 100644
index 20d38b4..f7ec7bb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -129,6 +129,7 @@ import com.avaje.ebean.config.dbplatform.SQLitePlatform;
import com.avaje.ebeaninternal.server.lib.sql.TransactionIsolation;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.MapMaker;
+import java.net.InetSocketAddress;
import jline.console.ConsoleReader;
@@ -1372,4 +1373,20 @@ public final class CraftServer implements Server {
@@ -1372,4 +1372,20 @@ public final class CraftServer implements Server {
public CraftScoreboardManager getScoreboardManager() {
return scoreboardManager;
}
@ -263,26 +222,13 @@ index 20d38b4..a85d0c8 100644
+ for (Object o : listeners) {
+
+ Map<String, Object> sect = (Map<String, Object>) o;
+ ret.add(new InetSocketAddress((String) sect.get("address"), (Integer) sect.get("port")));
+ ret.add(new java.net.InetSocketAddress((String) sect.get("address"), (Integer) sect.get("port")));
+ }
+ }
+ return ret;
+ }
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 84dcfcc..a30f217 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -71,7 +71,7 @@ public class CraftScheduler implements BukkitScheduler {
*/
private final ConcurrentHashMap<Integer, CraftTask> runners = new ConcurrentHashMap<Integer, CraftTask>();
private volatile int currentTick = -1;
- private final Executor executor = Executors.newCachedThreadPool();
+ private final Executor executor = Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("Craft Scheduler Thread - %1$d").build()); // Spigot
private CraftAsyncDebugger debugHead = new CraftAsyncDebugger(-1, null, null) {@Override StringBuilder debugTo(StringBuilder string) {return string;}};
private CraftAsyncDebugger debugTail = debugHead;
private static final int RECENT_TICKS;
diff --git a/src/main/java/org/spigotmc/MultiplexingServerConnection.java b/src/main/java/org/spigotmc/MultiplexingServerConnection.java
new file mode 100644
index 0000000..c8ea80a
@ -1352,14 +1298,13 @@ index 0000000..5dc3754
+ DATA;
+}
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 7a6c12f..558a3e2 100644
index 7a6c12f..1a57fdd 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -12,7 +12,9 @@
# Twitter: http://twitter.com/Craftbukkit
@@ -13,6 +13,9 @@
# Bug tracker: http://leaky.bukkit.org/
-
+#listeners:
+# - address: 127.0.0.1
+# port: 25577

Datei anzeigen

@ -1,4 +1,4 @@
From facb4f20791fa2f225e3dc727923035bfebb8b09 Mon Sep 17 00:00:00 2001
From e8ddf21f0ec35ca6e4ffc6bd8e298fffc7203462 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 20 Feb 2013 11:58:47 -0500
Subject: [PATCH] Entity Tracking Ranges
@ -115,10 +115,10 @@ index ea2b688..435358f 100644
if (filterIps) {
try {
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 558a3e2..746b8d9 100644
index 1a57fdd..eb23dae 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -54,6 +54,11 @@ world-settings:
@@ -55,6 +55,11 @@ world-settings:
entity-activation-range-animals: 32
entity-activation-range-monsters: 32
entity-activation-range-misc: 16

Datei anzeigen

@ -1,4 +1,4 @@
From b2c322170b2b5d4b0f25680bd1f63592a3cdee43 Mon Sep 17 00:00:00 2001
From 4b167babf36a1df279095cae6a3a0f2ba4f63831 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 11:15:11 +1100
Subject: [PATCH] BungeeCord Support
@ -48,10 +48,10 @@ index 435358f..e7917a3 100644
if (metrics == null) {
try {
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 746b8d9..bc8f4e2 100644
index eb23dae..62bf79a 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -36,6 +36,8 @@ settings:
@@ -37,6 +37,8 @@ settings:
timeout-time: 30
restart-on-crash: false
restart-script-location: /path/to/server/start.sh

Datei anzeigen

@ -1,4 +1,4 @@
From a4e6123ad2e10c7aa69cd196913c9decc4390472 Mon Sep 17 00:00:00 2001
From 02d1a854b541633f659b9683c3e23a947c8c43f5 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 13:04:45 +1100
Subject: [PATCH] Texture Pack Resolutions
@ -52,10 +52,10 @@ index 0b5ea21..f959fdf 100644
getHandle().playerConnection.sendPacket(new Packet250CustomPayload("MC|TPack", message));
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index bc8f4e2..6d8cf5f 100644
index 62bf79a..8d07ae2 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -38,6 +38,7 @@ settings:
@@ -39,6 +39,7 @@ settings:
restart-script-location: /path/to/server/start.sh
bungee-proxies:
- 127.0.0.1

Datei anzeigen

@ -1,4 +1,4 @@
From d419dd29e1778c4858269b2f6bfd002387285673 Mon Sep 17 00:00:00 2001
From 1f5108837838e843ddb91982255bab80bc77cc1e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 24 Feb 2013 20:45:20 +1100
Subject: [PATCH] Enable Improved ping sending
@ -48,10 +48,10 @@ index eaeb0bf..f94cc54 100644
public void sendAll(Packet packet) {
for (int i = 0; i < this.players.size(); ++i) {
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 6d8cf5f..9b59af9 100644
index 8d07ae2..871b984 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -33,6 +33,7 @@ settings:
@@ -34,6 +34,7 @@ settings:
spam-exclusions:
- /skill
filter-unsafe-ips: false

Datei anzeigen

@ -1,4 +1,4 @@
From cea8e2c5e01c5b382f91b906f442738f9389c7b9 Mon Sep 17 00:00:00 2001
From 96d4fdc902484c9a4762423c931cd53f85f500d7 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 19 Apr 2013 19:13:42 +1000
Subject: [PATCH] Snapshot Protocol
@ -365,10 +365,10 @@ index 1f61d23..fcdad66 100644
if (metrics == null) {
try {
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 9b59af9..d4546ef 100644
index 871b984..e1ec284 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -40,6 +40,8 @@ settings:
@@ -41,6 +41,8 @@ settings:
bungee-proxies:
- 127.0.0.1
texture-resolution: 16

Datei anzeigen

@ -0,0 +1,60 @@
From 3d9bd6d6fb82c74bb15ad01e32e1908615e5f8ed Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 23 Apr 2013 11:50:27 +1000
Subject: [PATCH] Thread Naming and Tweaks
Removes the sleep forever thread and adds useful names for debugging to all staged thread files.
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index b04d8a1..a271510 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -34,7 +34,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
super(options);
// CraftBukkit end
this.l = new ConsoleLogManager("Minecraft-Server", (String) null, (String) null); // CraftBukkit - null last argument
- new ThreadSleepForever(this);
+ // new ThreadSleepForever(this);
}
protected boolean init() throws java.net.UnknownHostException { // CraftBukkit - throws UnknownHostException
diff --git a/src/main/java/net/minecraft/server/ThreadCommandReader.java b/src/main/java/net/minecraft/server/ThreadCommandReader.java
index 489e184..bfd219c 100644
--- a/src/main/java/net/minecraft/server/ThreadCommandReader.java
+++ b/src/main/java/net/minecraft/server/ThreadCommandReader.java
@@ -11,6 +11,7 @@ class ThreadCommandReader extends Thread {
final DedicatedServer server;
ThreadCommandReader(DedicatedServer dedicatedserver) {
+ super("Command Reader"); // Spigot
this.server = dedicatedserver;
}
diff --git a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
index 9ed3db5..4a8078e 100644
--- a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
+++ b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
@@ -21,6 +21,7 @@ class ThreadLoginVerifier extends Thread {
CraftServer server;
ThreadLoginVerifier(PendingConnection pendingconnection, CraftServer server) {
+ super("Login Verifier - " + pendingconnection.getName());
this.server = server;
// CraftBukkit end
this.pendingConnection = pendingconnection;
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 0a5c61a..35badf3 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -70,7 +70,7 @@ public class CraftScheduler implements BukkitScheduler {
*/
private final ConcurrentHashMap<Integer, CraftTask> runners = new ConcurrentHashMap<Integer, CraftTask>();
private volatile int currentTick = -1;
- private final Executor executor = Executors.newCachedThreadPool();
+ private final Executor executor = Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("Craft Scheduler Thread - %1$d").build()); // Spigot
private CraftAsyncDebugger debugHead = new CraftAsyncDebugger(-1, null, null) {@Override StringBuilder debugTo(StringBuilder string) {return string;}};
private CraftAsyncDebugger debugTail = debugHead;
private static final int RECENT_TICKS;
--
1.8.2.1