changeset 14774:8594b26fc5d8

fixed incorrect uses of Debug.log API
author Doug Simon <doug.simon@oracle.com>
date Wed, 26 Mar 2014 22:17:31 +0100
parents 78343531acc7
children 40aa1eb176db
files graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/HSAILHotSpotBackend.java
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/HSAILHotSpotBackend.java	Wed Mar 26 21:10:24 2014 +0100
+++ b/graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/HSAILHotSpotBackend.java	Wed Mar 26 22:17:31 2014 +0100
@@ -90,7 +90,7 @@
 
     /**
      * Initializes the GPU device.
-     * 
+     *
      * @return whether or not initialization was successful
      */
     private static native boolean initialize();
@@ -141,7 +141,7 @@
 
     /**
      * Compiles a given method to HSAIL code.
-     * 
+     *
      * @param makeBinary specifies whether a GPU binary should also be generated for the HSAIL code.
      *            If true, the returned value is guaranteed to have a non-zero
      *            {@linkplain ExternalCompilationResult#getEntryPoint() entry point}.
@@ -172,7 +172,7 @@
             if (Debug.isLogEnabled()) {
                 // show infopoints
                 List<Infopoint> infoList = hsailCode.getInfopoints();
-                Debug.log(infoList.size() + " HSAIL infopoints");
+                Debug.log("%d HSAIL infopoints", infoList.size());
                 for (Infopoint info : infoList) {
                     Debug.log(info.toString());
                     Debug.log(info.debugInfo.frame().toString());
@@ -228,7 +228,7 @@
      * Installs the {@linkplain ExternalCompilationResult#getEntryPoint() GPU binary} associated
      * with some given HSAIL code in the code cache and returns a {@link HotSpotNmethod} handle to
      * the installed code.
-     * 
+     *
      * @param hsailCode HSAIL compilation result for which a GPU binary has been generated
      * @return a handle to the binary as installed in the HotSpot code cache
      */
@@ -247,12 +247,12 @@
             try (Scope ds = Debug.scope("GeneratingHostGraph")) {
                 HotSpotBackend hostBackend = getRuntime().getHostBackend();
                 JavaType[] parameterTypes = new JavaType[hostGraph.getNodes(ParameterNode.class).count()];
-                Debug.log("Param count :" + parameterTypes.length);
+                Debug.log("Param count: %d", parameterTypes.length);
                 for (int i = 0; i < parameterTypes.length; i++) {
                     ParameterNode parameter = hostGraph.getParameter(i);
-                    Debug.log("Param [" + i + "]=" + parameter);
+                    Debug.log("Param [%d]=%d", i, parameter);
                     parameterTypes[i] = parameter.stamp().javaType(hostBackend.getProviders().getMetaAccess());
-                    Debug.log(" " + parameterTypes[i]);
+                    Debug.log(" %s", parameterTypes[i]);
                 }
                 CallingConvention cc = hostBackend.getProviders().getCodeCache().getRegisterConfig().getCallingConvention(Type.JavaCallee, method.getSignature().getReturnType(null), parameterTypes,
                                 hostBackend.getTarget(), false);
@@ -482,7 +482,7 @@
         /**
          * Compute the hsail size mappings up to but not including the last non-constant parameter
          * (which is the gid).
-         * 
+         *
          */
         String[] paramHsailSizes = new String[totalParamCount];
         for (int i = 0; i < totalParamCount; i++) {