comparison src/os/solaris/vm/perfMemory_solaris.cpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents 2c2a99f6cf83
children 52b4284cb496
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
1 /* 1 /*
2 * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
429 429
430 for (size_t remaining = sizeof(psinfo_t); remaining > 0;) { 430 for (size_t remaining = sizeof(psinfo_t); remaining > 0;) {
431 431
432 RESTARTABLE(::read(fd, addr, remaining), result); 432 RESTARTABLE(::read(fd, addr, remaining), result);
433 if (result == OS_ERR) { 433 if (result == OS_ERR) {
434 ::close(fd);
435 THROW_MSG_0(vmSymbols::java_io_IOException(), "Read error"); 434 THROW_MSG_0(vmSymbols::java_io_IOException(), "Read error");
436 } else {
437 remaining-=result;
438 addr+=result;
439 } 435 }
436 remaining-=result;
437 addr+=result;
440 } 438 }
441 439
442 ::close(fd); 440 ::close(fd);
443 441
444 // get the user name for the effective user id of the process 442 // get the user name for the effective user id of the process
906 if (luser != user) FREE_C_HEAP_ARRAY(char, luser, mtInternal); 904 if (luser != user) FREE_C_HEAP_ARRAY(char, luser, mtInternal);
907 FREE_C_HEAP_ARRAY(char, dirname, mtInternal); 905 FREE_C_HEAP_ARRAY(char, dirname, mtInternal);
908 FREE_C_HEAP_ARRAY(char, filename, mtInternal); 906 FREE_C_HEAP_ARRAY(char, filename, mtInternal);
909 907
910 // open the shared memory file for the give vmid 908 // open the shared memory file for the give vmid
911 fd = open_sharedmem_file(rfilename, file_flags, THREAD); 909 fd = open_sharedmem_file(rfilename, file_flags, CHECK);
912 910 assert(fd != OS_ERR, "unexpected value");
913 if (fd == OS_ERR) {
914 return;
915 }
916
917 if (HAS_PENDING_EXCEPTION) {
918 ::close(fd);
919 return;
920 }
921 911
922 if (*sizep == 0) { 912 if (*sizep == 0) {
923 size = sharedmem_filesize(fd, CHECK); 913 size = sharedmem_filesize(fd, CHECK);
924 } else { 914 } else {
925 size = *sizep; 915 size = *sizep;