code: func grabProfile(s *source, source string, fetcher plugin.Fetcher, obj plugin.ObjTool, ui plugin.UI, tr http.RoundTripper) (p *profile.Profile, msrc plugin.MappingSources, remote bool, err error) {
  	var src string
  	duration, timeout := time.Duration(s.Seconds)*time.Second, time.Duration(s.Timeout)*time.Second
  	if fetcher != nil {
  		p, src, err = fetcher.Fetch(source, duration, timeout)
  		if err != nil {
  			return
  		}
  	}
  	if err != nil || p == nil {
  		// Fetch the profile over HTTP or from a file.
  		p, src, err = fetch(source, duration, timeout, ui, tr)
  		if err != nil {
  			return
  		}
  	}
  
  	if err = p.CheckValid(); err != nil {
  		return
  	}
  
  	// Update the binary locations from command line and paths.
  	locateBinaries(p, s, obj, ui)
  
  	// Collect the source URL for all mappings.
  	if src != "" {
  		msrc = collectMappingSources(p, src)
  		remote = true
  		if strings.HasPrefix(src, "http://"+testSourceAddress) {
  			// Treat test inputs as local to avoid saving
  			// testcase profiles during driver testing.
  			remote = false
  		}
  	}
  	return
  }
docs: // grabProfile fetches a profile. Returns the profile, sources for the
  // profile mappings, a bool indicating if the profile was fetched
  // remotely, and an error.