The !heapstat sos command emits difficult to read output as the "Percentage" column...
authortvass83 <31535082+tvass83@users.noreply.github.com>
Thu, 14 Sep 2017 12:05:29 +0000 (14:05 +0200)
committerJan Vorlicek <janvorli@microsoft.com>
Thu, 14 Sep 2017 12:05:29 +0000 (14:05 +0200)
Commit migrated from https://github.com/dotnet/coreclr/commit/b2c680c1feb0f9ccf8f3bbb3d10179f197548062

src/coreclr/src/ToolBox/SOS/Strike/strike.cpp

index 1663e3f..84fde91 100644 (file)
@@ -4646,8 +4646,8 @@ DECLARE_API(GCHeapStat)
             ExtOut("Heap%-4d %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u\n", 0, 
                 hpUsage.genUsage[0].allocd, hpUsage.genUsage[1].allocd, 
                 hpUsage.genUsage[2].allocd, hpUsage.genUsage[3].allocd);
-            ExtOut("\nFree space:                                                 Percentage\n");
-            ExtOut("Heap%-4d %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u", 0, 
+            ExtOut("\nFree space:                                                  Percentage\n");
+            ExtOut("Heap%-4d %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u ", 0, 
                 hpUsage.genUsage[0].freed, hpUsage.genUsage[1].freed, 
                 hpUsage.genUsage[2].freed, hpUsage.genUsage[3].freed);
             tempf = ((float)(hpUsage.genUsage[0].freed+hpUsage.genUsage[1].freed+hpUsage.genUsage[2].freed)) /
@@ -4656,8 +4656,8 @@ DECLARE_API(GCHeapStat)
                 (int)(100*((float)hpUsage.genUsage[3].freed) / (hpUsage.genUsage[3].allocd)));
             if (bIncUnreachable)
             {
-            ExtOut("\nUnrooted objects:                                           Percentage\n");
-            ExtOut("Heap%-4d %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u", 0, 
+            ExtOut("\nUnrooted objects:                                            Percentage\n");
+            ExtOut("Heap%-4d %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u ", 0, 
                 hpUsage.genUsage[0].unrooted, hpUsage.genUsage[1].unrooted, 
                 hpUsage.genUsage[2].unrooted, hpUsage.genUsage[3].unrooted);
             tempf = ((float)(hpUsage.genUsage[0].unrooted+hpUsage.genUsage[1].unrooted+hpUsage.genUsage[2].unrooted)) / 
@@ -4735,10 +4735,10 @@ DECLARE_API(GCHeapStat)
             genUsageStat[0].allocd, genUsageStat[1].allocd, 
             genUsageStat[2].allocd, genUsageStat[3].allocd);
 
-        ExtOut("\nFree space:                                                 Percentage\n");
+        ExtOut("\nFree space:                                                  Percentage\n");
         for (DWORD n = 0; n < dwNHeaps; n ++)
         {
-            ExtOut("Heap%-4d %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u", n, 
+            ExtOut("Heap%-4d %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u ", n, 
                 hpUsage[n].genUsage[0].freed, hpUsage[n].genUsage[1].freed, 
                 hpUsage[n].genUsage[2].freed, hpUsage[n].genUsage[3].freed);
 
@@ -4754,10 +4754,10 @@ DECLARE_API(GCHeapStat)
 
         if (bIncUnreachable)
         {
-            ExtOut("\nUnrooted objects:                                           Percentage\n");
+            ExtOut("\nUnrooted objects:                                            Percentage\n");
             for (DWORD n = 0; n < dwNHeaps; n ++)
             {
-                ExtOut("Heap%-4d %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u", n, 
+                ExtOut("Heap%-4d %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u %12" POINTERSIZE_TYPE "u ", n, 
                     hpUsage[n].genUsage[0].unrooted, hpUsage[n].genUsage[1].unrooted, 
                     hpUsage[n].genUsage[2].unrooted, hpUsage[n].genUsage[3].unrooted);