// printCallgrind prints a graph for a profile on callgrind format.
165537
func printCallgrind(w io.Writer, rpt *Report) error {
	o := rpt.options
	rpt.options.NodeFraction = 0
	rpt.options.EdgeFraction = 0
	rpt.options.NodeCount = 0

	g, _, _, _ := rpt.newTrimmedGraph()
	rpt.selectOutputUnit(g)

	nodeNames := getDisambiguatedNames(g)

	fmt.Fprintln(w, "positions: instr line")
	fmt.Fprintln(w, "events:", o.SampleType+"("+o.OutputUnit+")")

	objfiles := make(map[string]int)
	files := make(map[string]int)
	names := make(map[string]int)

	// prevInfo points to the previous NodeInfo.
	// It is used to group cost lines together as much as possible.
	var prevInfo *graph.NodeInfo
	for _, n := range g.Nodes {
		if prevInfo == nil || n.Info.Objfile != prevInfo.Objfile || n.Info.File != prevInfo.File || n.Info.Name != prevInfo.Name {
			fmt.Fprintln(w)
			fmt.Fprintln(w, "ob="+callgrindName(objfiles, n.Info.Objfile))
			fmt.Fprintln(w, "fl="+callgrindName(files, n.Info.File))
			fmt.Fprintln(w, "fn="+callgrindName(names, n.Info.Name))
		}

		addr := callgrindAddress(prevInfo, n.Info.Address)
		sv, _ := measurement.Scale(n.FlatValue(), o.SampleUnit, o.OutputUnit)
		fmt.Fprintf(w, "%s %d %d\n", addr, n.Info.Lineno, int64(sv))

		// Print outgoing edges.
		for _, out := range n.Out.Sort() {
			c, _ := measurement.Scale(out.Weight, o.SampleUnit, o.OutputUnit)
			callee := out.Dest
			fmt.Fprintln(w, "cfl="+callgrindName(files, callee.Info.File))
			fmt.Fprintln(w, "cfn="+callgrindName(names, nodeNames[callee]))
			// pprof doesn't have a flat weight for a call, leave as 0.
			fmt.Fprintf(w, "calls=0 %s %d\n", callgrindAddress(prevInfo, callee.Info.Address), callee.Info.Lineno)
			// TODO: This address may be in the middle of a call
			// instruction. It would be best to find the beginning
			// of the instruction, but the tools seem to handle
			// this OK.
			fmt.Fprintf(w, "* * %d\n", int64(c))
		}

		prevInfo = &n.Info
	}

	return nil
}
1061712
func Print(a ...interface{}) (n int, errno error) {
	return fmt.Print(wrap(a, true)...)
}
237151
func (n *LevelLogger) Println(v ...interface{}) {
	if !n.Enabled() {
		return
	}
	n.mu.RLock()
	n.logger.Output(callDepth, fmt.Sprintln(v...))
	n.mu.RUnlock()
}
369142
func Print(format string, args ...interface{}) {
	if len(args) == 0 {
		fmt.Fprintln(OutputWriter, format)
		return
	}
	fmt.Fprintf(OutputWriter, format+"\n", args...)
}
368027
func printMethod(method *Methodx, out *os.File, serviceName string, methodName string, objectFuncToObject map[string]string) {

	actualResponses := filterResponses(method.Responses, methodName)
	// Generate Description
	if method.Description != "" {
		fmt.Fprintln(out, formatComment("", method.Description, method.Parameters))
	}
	fmt.Fprint(out, "func (obj *", serviceName, ") ", methodName, "(ctx context.Context")

	// Generate Parameters
	for _, param := range method.Parameters {
		fmt.Fprint(out, ", ", "", toParamName(param.Name), " ", getTypeName(param))
	}
	fmt.Fprint(out, ") ")

	// Generate Return Types
	if len(actualResponses) > 0 {
		fmt.Fprint(out, "(")
	}
	for _, response := range actualResponses {
		typeName := getTypeName(response)
		if typeName == "*ObjectInterface" {
			// Replace the generic ObjectInterface pointer with the right Remote Object API struct
			objectTypeName := objectFuncToObject[serviceName+"."+methodName]
			if objectTypeName == "" {
				panic("Unknown remote object type for " + serviceName + "." + methodName)
			}
			fmt.Fprint(out, "*"+objectTypeName, ", ")
		} else {
			fmt.Fprint(out, getTypeName(response), ", ")
		}

	}
	fmt.Fprint(out, "error")
	if len(actualResponses) > 0 {
		fmt.Fprint(out, ")")
	}

	// Generate Start of Function body
	fmt.Fprintln(out, " {")

	// Generate an anonymous result container struct
	var resultParamName string
	if len(method.Responses) > 0 {
		fmt.Fprintln(out, "\tresult := &struct {")
		for _, response := range method.Responses {
			fmt.Fprintln(out, "\t\t"+toPublicMemberName(response.Name), getTypeName(response)+"\t`json:\""+response.Name+"\"`")
		}
		fmt.Fprintln(out, "\t} {}")
		resultParamName = "result"
	} else {
		resultParamName = "nil"
	}

	// Generate the actual call down to the RPC machinery
	fmt.Fprint(out, "\terr := obj.rpc(ctx, \"", methodName, "\", ", resultParamName)
	for _, param := range method.Parameters {
		// Fill in the parameters in the parameter array
		fmt.Fprint(out, ", ", toParamName(param.Name))
	}
	fmt.Fprintln(out, ")")

	// If there is at least one Remote Object that will be created then check for nil and return early
	if atLeastOneObjectInterface(method) {
		fmt.Fprintln(out, "\tif err != nil {")
		fmt.Fprint(out, "\t\treturn ")
		for _, response := range actualResponses {
			fmt.Fprint(out, nilNameInEarlyReturnAfterError(response.Type)+", ")
		}
		fmt.Fprintln(out, "err")
		fmt.Fprintln(out, "\t}")
	}

	fmt.Fprint(out, getExtraCrossAssignmentLine(methodName))

	// Return the result including creating a new Remote Object if needed
	fmt.Fprint(out, "\treturn ")
	for _, response := range actualResponses {
		if getTypeName(response) == "*ObjectInterface" {
			objectAPITypeName := objectFuncToObject[serviceName+"."+methodName]
			fmt.Fprint(out, "&"+objectAPITypeName+"{obj.session.getRemoteObject(result."+response.Name[1:]+")}, ")
		} else {
			fmt.Fprint(out, "result."+toPublicMemberName(response.Name)+", ")
		}
	}
	fmt.Fprintln(out, "err ")
	fmt.Fprintln(out, "}")
	fmt.Fprintln(out, "")
}
1002721
func (l *Slog) Print(v ...interface{}) {
	l = l.copy()
	l.Log.di(fnLevelDi)
	l.Log.Message(fmt.Sprint(v...))
	l.commit()
}
844984
func (a *Writer) Print(args ...interface{}) (int, error) {
	return fmt.Fprint(a.w, args...)
}
624334
func Print(err error) string {
	return fmt.Sprintf("%v: %v\n", Code(err), err.Error())
}
1363895
func (p *Printer) Println(v interface{}) (int, error) {
	return p.print(v, true)
}
1329152
func DebugPrint(w io.Writer, node Node) error {
	p := debugPrinter{out: w}
	p.print(reflect.ValueOf(node))
	return p.err
}
883091
func (t *Tree) Print() {
	if t.Root == nil {
		fmt.Println("<nil>")
	}
	t.Root.print()
}
106332
func (logger *Logger) Print(args ...interface{}) {
	unsafeStd := (*unsafe.Pointer)(unsafe.Pointer(&logger.std))
	stdVal := (*lg.Logger)(atomic.LoadPointer(unsafeStd))
	if stdVal != nil {
		stdVal.Print(args...)
	}
}
183768
func Print(node Node) string {
	visitor := newPrintVisitor()
	node.Accept(visitor)
	return visitor.output()
}
893481
func (me *Logger) print(priority int, v ...interface{}) {
	if priority <= me.priority {
		me.setFullPrefix(priority)
		me.logger.Print(v...)
	}
}
667551
func (l *Logger) Printf(format string, args ...interface{}) {
	l.logf(l.app, logLevelNotice, format, false, args...)
}
522730
func (h *Histogram) Print(w io.Writer) {
	h.h.RLock()
	defer h.h.RUnlock()
	fmt.Fprintf(w, h.h.String())
}
1302512
func Print(foreground, background Color, v ...interface{}) (int, error) {
	return Fprint(os.Stdout, foreground, background, v...)
}