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

Function encodeInt64s

profile/proto.go:115–133  ·  view source on GitHub ↗
(b *buffer, tag int, x []int64)

Source from the content-addressed store, hash-verified

113}
114
115func encodeInt64s(b *buffer, tag int, x []int64) {
116 if len(x) > 2 {
117 // Use packed encoding
118 n1 := len(b.data)
119 for _, u := range x {
120 encodeVarint(b, uint64(u))
121 }
122 n2 := len(b.data)
123 encodeLength(b, tag, n2-n1)
124 n3 := len(b.data)
125 copy(b.tmp[:], b.data[n2:n3])
126 copy(b.data[n1+(n3-n2):], b.data[n1:n2])
127 copy(b.data[n1:], b.tmp[:n3-n2])
128 return
129 }
130 for _, u := range x {
131 encodeInt64(b, tag, u)
132 }
133}
134
135func encodeInt64Opt(b *buffer, tag int, x int64) {
136 if x == 0 {

Callers 2

encodeMethod · 0.85
encodeMethod · 0.85

Calls 3

encodeVarintFunction · 0.85
encodeLengthFunction · 0.85
encodeInt64Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…