Mercurial > hg > openjdk > jdk7u > hotspot
changeset 4841:99e96aaac8af hs24.60-b04
Merge
author | amurillo |
---|---|
date | Thu, 12 Dec 2013 11:42:46 -0800 |
parents | 74d14a44c398 (current diff) 032149b2891f (diff) |
children | 27db84519a53 |
files | |
diffstat | 4 files changed, 36 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/agent/src/os/linux/ps_core.c Wed Nov 27 14:57:31 2013 -0800 +++ b/agent/src/os/linux/ps_core.c Thu Dec 12 11:42:46 2013 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -704,6 +704,8 @@ ELF_PHDR* phbuf; ELF_PHDR* lib_php = NULL; + int page_size=sysconf(_SC_PAGE_SIZE); + if ((phbuf = read_program_header_table(lib_fd, lib_ehdr)) == NULL) return false; @@ -712,8 +714,32 @@ // have been already added from core file segments. for (lib_php = phbuf, i = 0; i < lib_ehdr->e_phnum; i++) { if ((lib_php->p_type == PT_LOAD) && !(lib_php->p_flags & PF_W) && (lib_php->p_filesz != 0)) { - if (add_map_info(ph, lib_fd, lib_php->p_offset, lib_php->p_vaddr + lib_base, lib_php->p_filesz) == NULL) - goto err; + uintptr_t target_vaddr = lib_php->p_vaddr + lib_base; + map_info *existing_map = core_lookup(ph, target_vaddr); + + if (existing_map == NULL) { + if (add_map_info(ph, lib_fd, lib_php->p_offset, + target_vaddr, lib_php->p_filesz) == NULL) { + goto err; + } + } else { + if ((existing_map->memsz != page_size) && + (existing_map->fd != lib_fd) && + (existing_map->memsz != lib_php->p_filesz)) { + + print_debug("address conflict @ 0x%lx (size = %ld, flags = %d\n)", + target_vaddr, lib_php->p_filesz, lib_php->p_flags); + goto err; + } + + /* replace PT_LOAD segment with library segment */ + print_debug("overwrote with new address mapping (memsz %ld -> %ld)\n", + existing_map->memsz, lib_php->p_filesz); + + existing_map->fd = lib_fd; + existing_map->offset = lib_php->p_offset; + existing_map->memsz = lib_php->p_filesz; + } } lib_php++; }
--- a/make/hotspot_version Wed Nov 27 14:57:31 2013 -0800 +++ b/make/hotspot_version Thu Dec 12 11:42:46 2013 -0800 @@ -35,7 +35,7 @@ HS_MAJOR_VER=24 HS_MINOR_VER=60 -HS_BUILD_NUMBER=03 +HS_BUILD_NUMBER=04 JDK_MAJOR_VER=1 JDK_MINOR_VER=7
--- a/src/cpu/x86/vm/frame_x86.cpp Wed Nov 27 14:57:31 2013 -0800 +++ b/src/cpu/x86/vm/frame_x86.cpp Thu Dec 12 11:42:46 2013 -0800 @@ -94,12 +94,6 @@ // other generic buffer blobs are more problematic so we just assume they are // ok. adapter blobs never have a frame complete and are never ok. - // check for a valid frame_size, otherwise we are unlikely to get a valid sender_pc - - if (!Interpreter::contains(_pc) && _cb->frame_size() <= 0) { - return false; - } - if (!_cb->is_frame_complete_at(_pc)) { if (_cb->is_nmethod() || _cb->is_adapter_blob() || _cb->is_runtime_stub()) { return false; @@ -139,6 +133,11 @@ // must be some sort of compiled/runtime frame // fp does not have to be safe (although it could be check for c1?) + // check for a valid frame_size, otherwise we are unlikely to get a valid sender_pc + if (_cb->frame_size() <= 0) { + return false; + } + sender_sp = _unextended_sp + _cb->frame_size(); // On Intel the return_address is always the word on the stack sender_pc = (address) *(sender_sp-1);
--- a/src/cpu/x86/vm/globals_x86.hpp Wed Nov 27 14:57:31 2013 -0800 +++ b/src/cpu/x86/vm/globals_x86.hpp Thu Dec 12 11:42:46 2013 -0800 @@ -62,7 +62,7 @@ // due to lack of optimization caused by C++ compiler bugs define_pd_global(intx, StackShadowPages, NOT_WIN64(20) WIN64_ONLY(6) DEBUG_ONLY(+2)); #else -define_pd_global(intx, StackShadowPages, 4 DEBUG_ONLY(+5)); +define_pd_global(intx, StackShadowPages, 6 DEBUG_ONLY(+5)); #endif // AMD64 define_pd_global(intx, PreInflateSpin, 10);