// addLabelNodes adds pseudo stack frames "label:value" to each Sample with // labels matching the supplied keys. // // rootKeys adds frames at the root of the callgraph (first key becomes new root). // leafKeys adds frames at the leaf of the callgraph (last key becomes new leaf). // // Returns whether there were matches found for the label keys. func addLabelNodes(p *profile.Profile, rootKeys, leafKeys []string, outputUnit string) (rootm, leafm bool) { … } // formatLabelValues returns all the string and numeric labels in Sample, with // the numeric labels formatted according to outputUnit. func formatLabelValues(s *profile.Sample, k string, outputUnit string) []string { … }