1.1 --- a/src/os/bsd/vm/perfMemory_bsd.cpp Fri Jun 21 15:56:24 2013 -0700 1.2 +++ b/src/os/bsd/vm/perfMemory_bsd.cpp Thu Jun 27 13:04:51 2013 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -60,7 +60,7 @@ 1.11 } 1.12 1.13 // commit memory 1.14 - if (!os::commit_memory(mapAddress, size)) { 1.15 + if (!os::commit_memory(mapAddress, size, !ExecMem)) { 1.16 if (PrintMiscellaneous && Verbose) { 1.17 warning("Could not commit PerfData memory\n"); 1.18 } 1.19 @@ -120,7 +120,7 @@ 1.20 addr += result; 1.21 } 1.22 1.23 - RESTARTABLE(::close(fd), result); 1.24 + result = ::close(fd); 1.25 if (PrintMiscellaneous && Verbose) { 1.26 if (result == OS_ERR) { 1.27 warning("Could not close %s: %s\n", destfile, strerror(errno)); 1.28 @@ -632,7 +632,7 @@ 1.29 if (PrintMiscellaneous && Verbose) { 1.30 warning("could not set shared memory file size: %s\n", strerror(errno)); 1.31 } 1.32 - RESTARTABLE(::close(fd), result); 1.33 + ::close(fd); 1.34 return -1; 1.35 } 1.36 1.37 @@ -656,7 +656,7 @@ 1.38 if (result != -1) { 1.39 return fd; 1.40 } else { 1.41 - RESTARTABLE(::close(fd), result); 1.42 + ::close(fd); 1.43 return -1; 1.44 } 1.45 } 1.46 @@ -734,9 +734,7 @@ 1.47 1.48 mapAddress = (char*)::mmap((char*)0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); 1.49 1.50 - // attempt to close the file - restart it if it was interrupted, 1.51 - // but ignore other failures 1.52 - RESTARTABLE(::close(fd), result); 1.53 + result = ::close(fd); 1.54 assert(result != OS_ERR, "could not close file"); 1.55 1.56 if (mapAddress == MAP_FAILED) { 1.57 @@ -755,8 +753,7 @@ 1.58 (void)::memset((void*) mapAddress, 0, size); 1.59 1.60 // it does not go through os api, the operation has to record from here 1.61 - MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC); 1.62 - MemTracker::record_virtual_memory_type((address)mapAddress, mtInternal); 1.63 + MemTracker::record_virtual_memory_reserve((address)mapAddress, size, mtInternal, CURRENT_PC); 1.64 1.65 return mapAddress; 1.66 } 1.67 @@ -909,7 +906,7 @@ 1.68 1.69 // attempt to close the file - restart if it gets interrupted, 1.70 // but ignore other failures 1.71 - RESTARTABLE(::close(fd), result); 1.72 + result = ::close(fd); 1.73 assert(result != OS_ERR, "could not close file"); 1.74 1.75 if (mapAddress == MAP_FAILED) { 1.76 @@ -921,8 +918,7 @@ 1.77 } 1.78 1.79 // it does not go through os api, the operation has to record from here 1.80 - MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC); 1.81 - MemTracker::record_virtual_memory_type((address)mapAddress, mtInternal); 1.82 + MemTracker::record_virtual_memory_reserve((address)mapAddress, size, mtInternal, CURRENT_PC); 1.83 1.84 *addr = mapAddress; 1.85 *sizep = size;