code: func (s *Symbolizer) Symbolize(mode string, sources plugin.MappingSources, p *profile.Profile) error {
  	remote, local, fast, force, demanglerMode := true, true, false, false, ""
  	for _, o := range strings.Split(strings.ToLower(mode), ":") {
  		switch o {
  		case "":
  			continue
  		case "none", "no":
  			return nil
  		case "local":
  			remote, local = false, true
  		case "fastlocal":
  			remote, local, fast = false, true, true
  		case "remote":
  			remote, local = true, false
  		case "force":
  			force = true
  		default:
  			switch d := strings.TrimPrefix(o, "demangle="); d {
  			case "full", "none", "templates":
  				demanglerMode = d
  				force = true
  				continue
  			case "default":
  				continue
  			}
  			s.UI.PrintErr("ignoring unrecognized symbolization option: " + mode)
  			s.UI.PrintErr("expecting -symbolize=[local|fastlocal|remote|none][:force][:demangle=[none|full|templates|default]")
  		}
  	}
  
  	var err error
  	if local {
  		// Symbolize locally using binutils.
  		if err = localSymbolize(p, fast, force, s.Obj, s.UI); err != nil {
  			s.UI.PrintErr("local symbolization: " + err.Error())
  		}
  	}
  	if remote {
  		post := func(source, post string) ([]byte, error) {
  			return postURL(source, post, s.Transport)
  		}
  		if err = symbolzSymbolize(p, force, sources, post, s.UI); err != nil {
  			return err // Ran out of options.
  		}
  	}
  
  	demangleFunction(p, force, demanglerMode)
  	return nil
  }
docs: // Symbolize attempts to symbolize profile p. First uses binutils on
  // local binaries; if the source is a URL it attempts to get any
  // missed entries using symbolz.