From b2c680c1feb0f9ccf8f3bbb3d10179f197548062 Mon Sep 17 00:00:00 2001 From: tvass83 <31535082+tvass83@users.noreply.github.com> Date: Thu, 14 Sep 2017 14:05:29 +0200 Subject: [PATCH] The !heapstat sos command emits difficult to read output as the "Percentage" column is not aligned properly (#13856) --- src/ToolBox/SOS/Strike/strike.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ToolBox/SOS/Strike/strike.cpp b/src/ToolBox/SOS/Strike/strike.cpp index 1663e3f..84fde91 100644 --- a/src/ToolBox/SOS/Strike/strike.cpp +++ b/src/ToolBox/SOS/Strike/strike.cpp @@ -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); -- 2.7.4