8178148: Log more detailed information about scan rs phase
Summary: Add logging about the number of cards actually scanned, claimed and skipped during the Scan RS phase
Reviewed-by: ehelin, sangheki
Copyright (c) 2015, 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 itunder the terms of the GNU General Public License version 2 only, aspublished by the Free Software Foundation.This code is distributed in the hope that it will be useful, but WITHOUTANY WARRANTY; without even the implied warranty of MERCHANTABILITY orFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Licenseversion 2 for more details (a copy is included in the LICENSE file thataccompanied this code).You should have received a copy of the GNU General Public License version2 along with this work; if not, write to the Free Software Foundation,Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USAor visit www.oracle.com if you need additional information or have anyquestions.DESCRIPTIONThe purpose of this library is gathering diagnostic information on testfailures and timeouts. The library runs platform specific tools, which areconfigured in the way described below. The collected data will be availablein HTML format next to JTR files.The library uses JTHarness Observer and jtreg TimeoutHandler extensions points.DEPENDENCESThe library requires jtreg 4b13+ and JDK 7+.BUILDINGThe library is built using the top level build-test-failure-handler target andis automatically included in the test image and picked up by hotspot and jdktest makefiles.CONFIGURATIONProperties files are used to configure the library. They define which actionsto be performed in case of individual test failure or timeout. Each platformfamily uses its own property file (named '<platform>.properties'). For platformindependent actions, 'common.properties' is used.Actions to be performed on each failure are listed in 'environment' property.Extra actions for timeouts are listed in 'onTimeout'.Each action is defined via the following parameters: - 'javaOnly' -- run the action only for java applications, false by default - 'app' -- an application to run, mandatory parameter - 'args' -- application command line arguments, none by default - 'params' -- a structure which defines how an application should be run, described belowActions listed in 'onTimeout' are "patterned" actions. Besides the parameterslisted above, they also have 'pattern' parameter -- a string which will bereplaced by PID in 'args' parameter before action execution.'params' structure has the following parameters: - repeat -- how many times an action will be run, 1 by default - pause -- delay in ms between iterations, 500 by default - timeout -- time limitation for iteration in ms, 20 000 by default - stopOnError -- if true, an action will be interrupted after the first error, false by defaultFrom '<platform>.properties', the library reads the following parameters - 'config.execSuffix' -- a suffix for all binary application file names - 'config.getChildren' -- a "patterned" action used to get the list of all childrenFor simplicity we use parameter values inheritance. This means that we arelooking for the most specified parameter value. If we do not find it, we aretrying to find less specific value by reducing prefix.For example, if properties contains 'p1=A', 'a.p1=B', 'a.b.p1=C', thenparameter 'p1' will be: - 'C' for 'a.b.c' - 'B' for 'a.c' - 'A' for 'b.c'RUNNINGTo enable the library in jtreg, the following options should be set: - '-timeoutHandlerDir' points to the built jar ('jtregFailureHandler.jar') - '-observerDir' points to the built jar - '-timeoutHandler' equals to jdk.test.failurehandler.jtreg.GatherProcessInfoTimeoutHandler - '-observer' equals to jdk.test.failurehandler.jtreg.GatherDiagnosticInfoObserverIn case of environment issues during an action execution, such as missingapplication, hung application, lack of disk space, etc, the correspondingwarning appears and the library proceeds to next action.EXAMPLES$ ${JTREG_HOME}/bin/jtreg -jdk:${JAVA_HOME} \ -timeoutHandlerDir:./image/lib/jtregFailureHandler.jar \ -observerDir:./image/lib/jtregFailureHandler.jar \ -timeoutHandler:jdk.test.failurehandler.jtreg.GatherProcessInfoTimeoutHandler\ -observer:jdk.test.failurehandler.jtreg.GatherDiagnosticInfoObserver \ ${WS}/hotspot/test/