|
60 | 60 | import static com.oracle.graal.python.builtins.objects.cext.hpy.GraalHPyNativeSymbol.GRAAL_HPY_WRITE_PTR;
|
61 | 61 |
|
62 | 62 | import java.nio.charset.StandardCharsets;
|
| 63 | +import java.util.logging.Level; |
63 | 64 |
|
64 | 65 | import com.oracle.graal.python.PythonLanguage;
|
65 | 66 | import com.oracle.graal.python.builtins.PythonBuiltinClassType;
|
@@ -1456,7 +1457,9 @@ Object execute(Object[] arguments,
|
1456 | 1457 | // write data pointer to out var
|
1457 | 1458 | callWriteDataNode.call(context, GRAAL_HPY_WRITE_PTR, dataOutVar, 0L, dataPtr);
|
1458 | 1459 |
|
1459 |
| - LOGGER.fine(() -> String.format("Allocated HPy object with native space of size %d at %s", basicsize, dataPtr)); |
| 1460 | + if (LOGGER.isLoggable(Level.FINEST)) { |
| 1461 | + LOGGER.finest(() -> String.format("Allocated HPy object with native space of size %d at %s", basicsize, dataPtr)); |
| 1462 | + } |
1460 | 1463 | // TODO(fa): add memory tracing
|
1461 | 1464 | }
|
1462 | 1465 | return asHandleNode.execute(pythonObject);
|
@@ -1515,7 +1518,9 @@ Object execute(Object[] arguments,
|
1515 | 1518 | Object dataPtr = callMallocNode.call(context, GraalHPyNativeSymbol.GRAAL_HPY_CALLOC, basicsize, 1L);
|
1516 | 1519 | writeNativeSpaceNode.execute(pythonObject, OBJECT_HPY_NATIVE_SPACE, dataPtr);
|
1517 | 1520 |
|
1518 |
| - LOGGER.fine(() -> String.format("Allocated HPy object with native space of size %d at %s", basicsize, dataPtr)); |
| 1521 | + if (LOGGER.isLoggable(Level.FINEST)) { |
| 1522 | + LOGGER.finest(() -> String.format("Allocated HPy object with native space of size %d at %s", basicsize, dataPtr)); |
| 1523 | + } |
1519 | 1524 | // TODO(fa): add memory tracing
|
1520 | 1525 | }
|
1521 | 1526 | return asHandleNode.execute(pythonObject);
|
|
0 commit comments