Commit 8eea16b
committed
Fix KalmanPatRecHPS Kalman Patrec timing regression (HugeMethodLimit)
Commit 44ee666 changed `debug` from a compile-time static final
constant to a runtime-armed instance field so per-event tracing could
be enabled via KalmanParams.debugEvent. This made all ~150 "if (debug)"
blocks in kalmanPatRec() non-eliminable at compile time, bloating the
method's bytecode past HotSpot's 8000-byte HugeMethodLimit and
permanently disqualifying it from C2 JIT compilation (~2.5x slowdown).
Revert debug to `private static final boolean debug = false;` so javac
dead-code-eliminates every guarded block again (kalmanPatRec() back to
~7689 bytes, under the JIT limit). To keep the debugEvent per-event
tracing feature working for a manual debug=true rebuild, each guard is
now `if (debug && (kPar.debugEvent == -1 || eventNumber == kPar.debugEvent))`
instead of bare `if (debug)`: when debug=false this still folds away
to nothing (confirmed empirically and via javap byte count), and when
debug=true it evaluates the debugEvent check normally per event.1 parent 50d9a50 commit 8eea16b
1 file changed
Lines changed: 682 additions & 465 deletions
0 commit comments