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

Method Open

internal/driver/fetch_test.go:165–177  ·  view source on GitHub ↗
(file string, start, limit, offset uint64, relocationSymbol string)

Source from the content-addressed store, hash-verified

163}
164
165func (o testObj) Open(file string, start, limit, offset uint64, relocationSymbol string) (plugin.ObjFile, error) {
166 switch file {
167 case "/alternate/architecture/binary":
168 return testFile{file, "abcde10001"}, nil
169 case "/usr/bin/binary":
170 return testFile{file, "fedcb10000"}, nil
171 case filepath.Join(o.home, "pprof/binaries/abcde10001/binary"):
172 return testFile{file, "abcde10001"}, nil
173 case filepath.Join(o.home, "pprof/binaries/fg/hij10001.debug"):
174 return testFile{file, "fghij10001"}, nil
175 }
176 return nil, fmt.Errorf("not found: %s", file)
177}
178func (testObj) Demangler(_ string) func(names []string) (map[string]string, error) {
179 return func(names []string) (map[string]string, error) { return nil, nil }
180}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected