]> Cypherpunks repositories - gostls13.git/commit
runtime: avoid debug prints of huge objects
authorAustin Clements <austin@google.com>
Fri, 18 Sep 2015 16:06:24 +0000 (12:06 -0400)
committerAustin Clements <austin@google.com>
Fri, 18 Sep 2015 22:23:18 +0000 (22:23 +0000)
commit97b64d88eb66981d9105bb3997b47955d2b1bd19
tree0cccbfa752b1a80e5a2b663e705524a981a5b4e3
parentb7c55ba49684cc454f6c699bd3b3fa8fe6455c67
runtime: avoid debug prints of huge objects

Currently when the GC prints an object for debugging (e.g., for a
failed invalidptr or checkmark check), it dumps the entire object. To
avoid inundating the user with output for really large objects, limit
this to printing just the first 128 words (which are most likely to be
useful in identifying the type of an object) and the 32 words around
the problematic field.

Change-Id: Id94a5c9d8162f8bd9b2a63bf0b1bfb0adde83c68
Reviewed-on: https://go-review.googlesource.com/14764
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgcmark.go