This commit is contained in:
Daniel D. Daugherty 2013-04-05 10:38:08 -07:00
commit 78339229bb
40 changed files with 626 additions and 318 deletions

View file

@ -176,7 +176,6 @@ class MemNotifyThread: public Thread {
// utility functions
static int SR_initialize();
static int SR_finalize();
julong os::available_memory() {
return Linux::available_memory();
@ -1633,6 +1632,9 @@ bool os::dll_build_name(char* buffer, size_t buflen,
} else if (strchr(pname, *os::path_separator()) != NULL) {
int n;
char** pelements = split_path(pname, &n);
if (pelements == NULL) {
return false;
}
for (int i = 0 ; i < n ; i++) {
// Really shouldn't be NULL, but check can't hurt
if (pelements[i] == NULL || strlen(pelements[i]) == 0) {
@ -3655,10 +3657,6 @@ static int SR_initialize() {
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
@ -4500,16 +4498,6 @@ int os::Linux::safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mute
////////////////////////////////////////////////////////////////////////////////
// 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));
@ -4533,8 +4521,8 @@ bool os::find(address addr, outputStream* st) {
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, os::vm_page_size());
address end = clamp_address_in_page(addr+40, addr, os::vm_page_size());
address lowest = (address) dlinfo.dli_sname;
if (!lowest) lowest = (address) dlinfo.dli_fbase;
if (begin < lowest) begin = lowest;