MCPcopy Create free account
hub / github.com/google/pprof / parseLegacy

Function parseLegacy

profile/profile.go:213–234  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

211var errConcatProfile = fmt.Errorf("concatenated profiles detected")
212
213func parseLegacy(data []byte) (*Profile, error) {
214 parsers := []func([]byte) (*Profile, error){
215 parseCPU,
216 parseHeap,
217 parseGoCount, // goroutine, threadcreate
218 parseThread,
219 parseContention,
220 parseJavaProfile,
221 }
222
223 for _, parser := range parsers {
224 p, err := parser(data)
225 if err == nil {
226 p.addLegacyFrameInfo()
227 return p, nil
228 }
229 if err != errUnrecognized {
230 return nil, err
231 }
232 }
233 return nil, errUnrecognized
234}
235
236// ParseUncompressed parses an uncompressed protobuf into a profile.
237func ParseUncompressed(data []byte) (*Profile, error) {

Callers 1

ParseDataFunction · 0.85

Calls 1

addLegacyFrameInfoMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…