diff --git a/gluten-data/src/main/scala/org/apache/gluten/runtime/Runtime.scala b/gluten-data/src/main/scala/org/apache/gluten/runtime/Runtime.scala index 7ba72b379ba3..63db3e58e51f 100644 --- a/gluten-data/src/main/scala/org/apache/gluten/runtime/Runtime.scala +++ b/gluten-data/src/main/scala/org/apache/gluten/runtime/Runtime.scala @@ -98,16 +98,17 @@ object Runtime { s"Runtime instance already released: $handle, ${resourceName()}, ${priority()}") } - def dump(): KnownNameAndStats = { - new KnownNameAndStats() { - override def name: String = resourceName() - override def stats: MemoryUsageStats = collectMemoryUsage() - } + def dump(): String = { + SparkMemoryUtil.prettyPrintStats( + s"[${resourceName()}]", + new KnownNameAndStats() { + override def name: String = resourceName() + override def stats: MemoryUsageStats = collectMemoryUsage() + }) } if (LOGGER.isDebugEnabled) { - LOGGER.debug( - SparkMemoryUtil.prettyPrintStats("About to release memory manager, usage dump:", dump())) + LOGGER.debug("About to release memory manager, " + dump()) } RuntimeJniWrapper.releaseRuntime(handle)