code: func (r *report) filter(cum bool, focus *regexp.Regexp) []string {
  	r.mu.Lock()
  	defer r.mu.Unlock()
  	if r.p == nil {
  		return nil
  	}
  	c := r.p.Copy()
  	c.FilterSamplesByName(focus, nil, nil)
  	rpt := goreport.NewDefault(c, goreport.Options{
  		OutputFormat:   goreport.Text,
  		CumSort:        cum,
  		PrintAddresses: true,
  	})
  	buf := bytes.NewBuffer(nil)
  	goreport.Generate(buf, rpt, nil)
  	return strings.Split(buf.String(), "\n")
  }
docs: // filter filters the report with a focus regex. If no focus is provided,
  // it reports back with the entire set of calls.
  // Focus regex works on the package, type and function names. Filtered
  // results will include parent samples from the call graph.