--- old/src/os/linux/vm/os_linux.cpp 2012-11-12 10:52:08.252660265 -0800 +++ new/src/os/linux/vm/os_linux.cpp 2012-11-12 10:52:08.016663231 -0800 @@ -192,7 +192,6 @@ // utility functions static int SR_initialize(); -static int SR_finalize(); julong os::available_memory() { return Linux::available_memory(); @@ -3555,10 +3554,6 @@ return 0; } -static int SR_finalize() { - return 0; -} - // returns true on success and false on error - really an error is fatal // but this seems the normal response to library errors @@ -4402,16 +4397,6 @@ //////////////////////////////////////////////////////////////////////////////// // debug support -static address same_page(address x, address y) { - int page_bits = -os::vm_page_size(); - if ((intptr_t(x) & page_bits) == (intptr_t(y) & page_bits)) - return x; - else if (x > y) - return (address)(intptr_t(y) | ~page_bits) + 1; - else - return (address)(intptr_t(y) & page_bits); -} - bool os::find(address addr, outputStream* st) { Dl_info dlinfo; memset(&dlinfo, 0, sizeof(dlinfo)); @@ -4435,8 +4420,8 @@ if (Verbose) { // decode some bytes around the PC - address begin = same_page(addr-40, addr); - address end = same_page(addr+40, addr); + address begin = clamp_address_in_page(addr-40, addr); + address end = clamp_address_in_page(addr+40, addr); address lowest = (address) dlinfo.dli_sname; if (!lowest) lowest = (address) dlinfo.dli_fbase; if (begin < lowest) begin = lowest;