summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2017-04-28 01:40:13 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-04-28 01:40:14 +0000
commit3f5f85d9382416b053359c3c1f11ab824843f3b4 (patch)
tree54f802dbd78cdfaa7cec3c93a772494d4c4af84f
parent70940dfe99df0084a3f3fed1a88255ec976a60e3 (diff)
parentb166f413411b380d32c75cb842fc2ab8be96a963 (diff)
Merge "Only log a few types of GC causes for the blocking cases"
-rw-r--r--runtime/gc/heap.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index 7da722160e..bd4f99b7f5 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -3517,7 +3517,13 @@ collector::GcType Heap::WaitForGcToCompleteLocked(GcCause cause, Thread* self) {
// is not the heap task daemon thread, it's considered as a
// blocking GC (i.e., blocking itself).
running_collection_is_blocking_ = true;
- VLOG(gc) << "Starting a blocking GC " << cause;
+ // Don't log fake "GC" types that are only used for debugger or hidden APIs. If we log these,
+ // it results in log spam. kGcCauseExplicit is already logged in LogGC, so avoid it here too.
+ if (cause == kGcCauseForAlloc ||
+ cause == kGcCauseForNativeAlloc ||
+ cause == kGcCauseDisableMovingGc) {
+ VLOG(gc) << "Starting a blocking GC " << cause;
+ }
}
return last_gc_type;
}