(mappings []*profile.Mapping)
| 11 | } |
| 12 | |
| 13 | func 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. |
| 25 | func (s *synthCode) address(loc *profile.Location) uint64 { |
no outgoing calls
searching dependent graphs…