(st stackTrace, si experimental.StackIterator)
| 382 | } |
| 383 | |
| 384 | func makeStackTrace(st stackTrace, si experimental.StackIterator) stackTrace { |
| 385 | st.fns = st.fns[:0] |
| 386 | st.pcs = st.pcs[:0] |
| 387 | |
| 388 | for si.Next() { |
| 389 | st.fns = append(st.fns, si.Function()) |
| 390 | st.pcs = append(st.pcs, si.ProgramCounter()) |
| 391 | } |
| 392 | st.key = maphash.Bytes(stackTraceHashSeed, st.bytes()) |
| 393 | return st |
| 394 | } |
| 395 | |
| 396 | func (st stackTrace) host() bool { |
| 397 | return len(st.fns) > 0 && st.fns[0].Definition().GoFunction() != nil |