diff options
author | nharmata <nharmata@google.com> | 2018-03-08 10:18:43 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-08 10:20:04 -0800 |
commit | c7e31d3c68b86cfd1e148cebbeab3d3305a655f1 (patch) | |
tree | dc542aeea001b8c5d54e992a8de0de76d4f2ac25 /src/main/java/com/google/devtools/build/lib/UnixJniLoader.java | |
parent | 0520ac3348ea2bce7dc4fa75d8fff14bd47046a6 (diff) |
As a micro-optimization, inline the "Callstack.enabled" guard. The java-land function call overhead of the morally no-op Callstack#push/pop was profiled to be ~1.4% CPU in a benchmark of loading a BUILD file that was particularly heavy in Skylark function calls.
Alternatives considered: writing code that I hoped would be more amenable to the JIT choosing to inline the function call. I couldn't get this to work.
RELNOTES: None
PiperOrigin-RevId: 188350132
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/UnixJniLoader.java')
0 files changed, 0 insertions, 0 deletions