diff -r bba6644b6fe3 -r 6dd6f988b4e4 src/hotspot/share/oops/method.hpp --- a/src/hotspot/share/oops/method.hpp Fri Mar 08 16:21:16 2019 -0500 +++ b/src/hotspot/share/oops/method.hpp Fri Mar 08 23:02:06 2019 +0100 @@ -1022,36 +1022,12 @@ // Write (bci, line number) pair to stream void write_pair_regular(int bci_delta, int line_delta); - inline void write_pair_inline(int bci, int line) { - int bci_delta = bci - _bci; - int line_delta = line - _line; - _bci = bci; - _line = line; - // Skip (0,0) deltas - they do not add information and conflict with terminator. - if (bci_delta == 0 && line_delta == 0) return; - // Check if bci is 5-bit and line number 3-bit unsigned. - if (((bci_delta & ~0x1F) == 0) && ((line_delta & ~0x7) == 0)) { - // Compress into single byte. - jubyte value = ((jubyte) bci_delta << 3) | (jubyte) line_delta; - // Check that value doesn't match escape character. - if (value != 0xFF) { - write_byte(value); - return; - } - } - write_pair_regular(bci_delta, line_delta); - } + // If (bci delta, line delta) fits in (5-bit unsigned, 3-bit unsigned) + // we save it as one byte, otherwise we write a 0xFF escape character + // and use regular compression. 0x0 is used as end-of-stream terminator. + void write_pair_inline(int bci, int line); -// Windows AMD64 + Apr 2005 PSDK with /O2 generates bad code for write_pair. -// Disabling optimization doesn't work for methods in header files -// so we force it to call through the non-optimized version in the .cpp. -// It's gross, but it's the only way we can ensure that all callers are -// fixed. _MSC_VER is defined by the windows compiler -#if defined(_M_AMD64) && _MSC_VER >= 1400 void write_pair(int bci, int line); -#else - void write_pair(int bci, int line) { write_pair_inline(bci, line); } -#endif // Write end-of-stream marker void write_terminator() { write_byte(0); }