code: func stacks(all bool) []byte {
  	// We don't know how big the traces are, so grow a few times if they don't fit.
  	// Start large, though.
  	n := 10000
  	if all {
  		n = 100000
  	}
  	var trace []byte
  	for i := 0; i < 5; i++ {
  		trace = make([]byte, n)
  		nbytes := runtime.Stack(trace, all)
  		if nbytes < len(trace) {
  			return trace[:nbytes]
  		}
  		n *= 2
  	}
  	return trace
  }
docs: // stacks is a wrapper for runtime.Stack that attempts to recover the data for
  // all goroutines.
  //
  // This was copied from the glog library:
  // https://github.com/golang/glog @ / 23def4e6c14b4da8ac2ed8007337bc5eb5007998