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

Function newSynthCode

internal/report/synth.go:13–22  ·  view source on GitHub ↗
(mappings []*profile.Mapping)

Source from the content-addressed store, hash-verified

11}
12
13func newSynthCode(mappings []*profile.Mapping) *synthCode {
14 // Find a larger address than any mapping.
15 s := &synthCode{next: 1}
16 for _, m := range mappings {
17 if s.next < m.Limit {
18 s.next = m.Limit
19 }
20 }
21 return s
22}
23
24// address returns the synthetic address for loc, creating one if needed.
25func (s *synthCode) address(loc *profile.Location) uint64 {

Callers 3

TestSynthAddressesFunction · 0.85
TestSynthAvoidsMappingFunction · 0.85
newSourcePrinterFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestSynthAddressesFunction · 0.68
TestSynthAvoidsMappingFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…