Skip to content
Success

Changes

Summary

  1. Re-enable the vanilla debug MethodProfiler and /debug command (details)
Commit 4d3bf2015504897fc69af2a209d4c8bbe217394d by Pokechu022
Re-enable the vanilla debug MethodProfiler and /debug command
This is highly useful for profiling vanilla code, and in some cases
plugin code.  It is somewhat expensive, though, which is why it was
initially disabled.
I chose to use a system property instead of a configuration setting
because 1) the MethodProfiler is exclusive to CraftBukkit and not part
of the general API (the timings system is the general API equivalent),
and 2) using a static final boolean property _may_ allow the JITter to
optimize out the methods when disabled (though I'm not sure of it).
There are several changes to fix cases where the profiler code was
broken slightly by other craftbukkit changes.  All of cases have been
fixed, except for the block entity ticking one, due to the cost of the
getSimpleName call.  For that, a ticking entry is used instead, so that
time spent actually ticking the block entities can be compared with time
processing the list.
This (effectively) reverts 7dde6cc5663e1f6b84f549c54a47bc623b49fdf1.
The file was modifiednms-patches/PlayerList.patch
The file was modifiednms-patches/Entity.patch
The file was modifiednms-patches/World.patch
The file was modifiednms-patches/WorldServer.patch
The file was addednms-patches/CommandDebug.patch
The file was modifiednms-patches/MethodProfiler.patch