[VD] Print Garbage Collection log by default 32/317232/3
authorJinwoo Kwon <j83.kwon@samsung.com>
Fri, 6 Sep 2024 05:14:36 +0000 (14:14 +0900)
committerBot Blink <blinkbot@samsung.com>
Mon, 9 Sep 2024 07:09:24 +0000 (07:09 +0000)
GC time is a key factor to check the responsiveness
of applications, so we want to print it by default.

Change-Id: I6ce3c3ec8903b77cc9ff694b3746ac9b24b77a20
Signed-off-by: Jinwoo Kwon <j83.kwon@samsung.com>
v8/src/heap/gc-tracer.cc

index 08785b036473df2c2db387d12da22cb5a83532a2..2433047a1ec767711f8d81c0290f59972b0e0b73 100644 (file)
@@ -741,6 +741,22 @@ void GCTracer::Print() const {
       AverageMarkCompactMutatorUtilization(),
       CurrentMarkCompactMutatorUtilization(), ToString(current_.gc_reason),
       current_.collector_reason != nullptr ? current_.collector_reason : "");
+
+#if BUILDFLAG(IS_TIZEN_TV)
+  PrintF(
+      "[GC] Type: %s%s|Object: %.1f -> %.1f MB|"
+      "Memory: %.1f -> %.1f MB|"
+      "Duration: %.2f ms|Reason: %s; %s\n",
+      ToString(current_.type, false),
+      current_.reduce_memory ? " (reduce)" : "",
+      static_cast<double>(current_.start_object_size) / MB,
+      static_cast<double>(current_.end_object_size) / MB,
+      static_cast<double>(current_.start_memory_size) / MB,
+      static_cast<double>(current_.end_memory_size) / MB,
+      (duration.InMillisecondsF() + total_external_time),
+      ToString(current_.gc_reason),
+      current_.collector_reason != nullptr ? current_.collector_reason : "");
+#endif
 }
 
 void GCTracer::PrintNVP() const {