Mon, 23 Apr 2012 11:03:30 -0700
Merge
1.1 --- a/agent/src/os/linux/ps_core.c Fri Apr 20 17:13:36 2012 -0700 1.2 +++ b/agent/src/os/linux/ps_core.c Mon Apr 23 11:03:30 2012 -0700 1.3 @@ -440,7 +440,7 @@ 1.4 int j = 0; 1.5 print_debug("---- sorted virtual address map ----\n"); 1.6 for (j = 0; j < ph->core->num_maps; j++) { 1.7 - print_debug("base = 0x%lx\tsize = %zd\n", ph->core->map_array[j]->vaddr, 1.8 + print_debug("base = 0x%lx\tsize = %zu\n", ph->core->map_array[j]->vaddr, 1.9 ph->core->map_array[j]->memsz); 1.10 } 1.11 }
2.1 --- a/src/share/vm/runtime/arguments.cpp Fri Apr 20 17:13:36 2012 -0700 2.2 +++ b/src/share/vm/runtime/arguments.cpp Mon Apr 23 11:03:30 2012 -0700 2.3 @@ -829,6 +829,9 @@ 2.4 } else { 2.5 jio_fprintf(defaultStream::error_stream(), "%s", locked_message_buf); 2.6 } 2.7 + } else { 2.8 + jio_fprintf(defaultStream::error_stream(), 2.9 + "Unrecognized VM option '%s'\n", argname); 2.10 } 2.11 2.12 // allow for commandline "commenting out" options like -XX:#+Verbose
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/test/runtime/7162488/Test7162488.sh Mon Apr 23 11:03:30 2012 -0700 3.3 @@ -0,0 +1,77 @@ 3.4 +# 3.5 +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 3.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.7 +# 3.8 +# This code is free software; you can redistribute it and/or modify it 3.9 +# under the terms of the GNU General Public License version 2 only, as 3.10 +# published by the Free Software Foundation. 3.11 +# 3.12 +# This code is distributed in the hope that it will be useful, but WITHOUT 3.13 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3.14 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3.15 +# version 2 for more details (a copy is included in the LICENSE file that 3.16 +# accompanied this code). 3.17 +# 3.18 +# You should have received a copy of the GNU General Public License version 3.19 +# 2 along with this work; if not, write to the Free Software Foundation, 3.20 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3.21 +# 3.22 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 3.23 +# or visit www.oracle.com if you need additional information or have any 3.24 +# questions. 3.25 +# 3.26 + 3.27 + 3.28 +# @test Test7162488.sh 3.29 +# @bug 7162488 3.30 +# @summary VM not printing unknown -XX options 3.31 +# @run shell Test7162488.sh 3.32 +# 3.33 + 3.34 +if [ "${TESTSRC}" = "" ] 3.35 + then TESTSRC=. 3.36 +fi 3.37 + 3.38 +if [ "${TESTJAVA}" = "" ] 3.39 +then 3.40 + PARENT=`dirname \`which java\`` 3.41 + TESTJAVA=`dirname ${PARENT}` 3.42 + printf "TESTJAVA not set, selecting " ${TESTJAVA} 3.43 + printf " If this is incorrect, try setting the variable manually.\n" 3.44 +fi 3.45 + 3.46 +# set platform-dependent variables 3.47 +OS=`uname -s` 3.48 +case "$OS" in 3.49 + Windows_* ) 3.50 + FS="\\" 3.51 + ;; 3.52 + * ) 3.53 + FS="/" 3.54 + ;; 3.55 +esac 3.56 + 3.57 +JAVA=${TESTJAVA}${FS}bin${FS}java 3.58 + 3.59 +# 3.60 +# Just run with an option we are confident will not be recognized, 3.61 +# and check for the message: 3.62 +# 3.63 +OPTION=this_is_not_an_option 3.64 + 3.65 +${JAVA} ${TESTVMOPTS} -showversion -XX:${OPTION} 2>&1 | grep "Unrecognized VM option" 3.66 +if [ "$?" != "0" ] 3.67 +then 3.68 + printf "FAILED: option not flagged as unrecognized.\n" 3.69 + exit 1 3.70 +fi 3.71 + 3.72 +${JAVA} ${TESTVMOPTS} -showversion -XX:${OPTION} 2>&1 | grep ${OPTION} 3.73 +if [ "$?" != "0" ] 3.74 +then 3.75 + printf "FAILED: bad option not named as being bad.\n" 3.76 + exit 1 3.77 +fi 3.78 + 3.79 +printf "Passed.\n" 3.80 +