kiszk commented on a change in pull request #25766: [SPARK-29061][SQL] Prints 
bytecode statistics in debugCodegen
URL: https://github.com/apache/spark/pull/25766#discussion_r324070844
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/debug/package.scala
 ##########
 @@ -81,11 +82,21 @@ package object debug {
   def writeCodegen(append: String => Unit, plan: SparkPlan): Unit = {
     val codegenSeq = codegenStringSeq(plan)
     append(s"Found ${codegenSeq.size} WholeStageCodegen subtrees.\n")
-    for (((subtree, code), i) <- codegenSeq.zipWithIndex) {
-      append(s"== Subtree ${i + 1} / ${codegenSeq.size} ==\n")
+    for (((subtree, code, codeStats), i) <- codegenSeq.zipWithIndex) {
+      val usedConstPoolRatio = if (codeStats.maxConstPoolSize > 0) {
+        val rt = 100.0 * codeStats.maxConstPoolSize / 
CodeGenerator.MAX_JVM_CONSTANT_POOL_SIZE
+        "(%.2f%% used)".format(rt)
+      } else {
+        ""
+      }
+      val codeStatsStr = s"maxClassCodeSize:${codeStats.maxClassCodeSize}; " +
 
 Review comment:
   I am neutral on this. I am bit worry about the wider width regarding ease of 
reading._

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to