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

Function encodeMessage

profile/proto.go:167–176  ·  view source on GitHub ↗
(b *buffer, tag int, m message)

Source from the content-addressed store, hash-verified

165}
166
167func encodeMessage(b *buffer, tag int, m message) {
168 n1 := len(b.data)
169 m.encode(b)
170 n2 := len(b.data)
171 encodeLength(b, tag, n2-n1)
172 n3 := len(b.data)
173 copy(b.tmp[:], b.data[n2:n3])
174 copy(b.data[n1+(n3-n2):], b.data[n1:n2])
175 copy(b.data[n1:], b.tmp[:n3-n2])
176}
177
178func unmarshal(data []byte, m message) (err error) {
179 b := buffer{data: data, typ: 2}

Callers 3

encodeMethod · 0.85
encodeMethod · 0.85
encodeMethod · 0.85

Calls 2

encodeLengthFunction · 0.85
encodeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…