Debian Codegraph @

internal/driver/driver_test.go

raw symbols SCIP
1 // Copyright 2014 Google Inc. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 package driverscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/
16
17 import (
18 "bytesscip-go gomod github.com/golang/go/src go1.24.0 bytes/"
19 "flagscip-go gomod github.com/golang/go/src go1.24.0 flag/"
20 "fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/"
21 "netscip-go gomod github.com/golang/go/src go1.24.0 net/"
22 _ "net/http/pprofscip-go gomod github.com/golang/go/src go1.24.0 `net/http/pprof`/"
23 "osscip-go gomod github.com/golang/go/src go1.24.0 os/"
24 "reflectscip-go gomod github.com/golang/go/src go1.24.0 reflect/"
25 "regexpscip-go gomod github.com/golang/go/src go1.24.0 regexp/"
26 "runtimescip-go gomod github.com/golang/go/src go1.24.0 runtime/"
27 "strconvscip-go gomod github.com/golang/go/src go1.24.0 strconv/"
28 "stringsscip-go gomod github.com/golang/go/src go1.24.0 strings/"
29 "testingscip-go gomod github.com/golang/go/src go1.24.0 testing/"
30 "timescip-go gomod github.com/golang/go/src go1.24.0 time/"
31
32 "github.com/google/pprof/internal/pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/"
33 "github.com/google/pprof/internal/proftestscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/"
34 "github.com/google/pprof/internal/symbolzscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/symbolz`/"
35 "github.com/google/pprof/profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/"
36 )
37
38 var updateFlagscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/updateFlag. = flagscip-go gomod github.com/golang/go/src go1.24.0 flag/.Boolscip-go gomod github.com/golang/go/src go1.24.0 flag/Bool().("update", false, "Update the golden files")
39
40 func TestParsescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/TestParse().(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
41 // Override weblist command to collect output in buffer
42 pprofCommandsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/pprofCommands.["weblist"].postProcessscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/command#postProcess. = nil
43
44 // Our mockObjTool.Open will always return success, causing
45 // driver.locateBinaries to "find" the binaries below in a non-existent
46 // directory. As a workaround, point the search path to the fake
47 // directory containing out fake binaries.
48 savePath := osscip-go gomod github.com/golang/go/src go1.24.0 os/.Getenvscip-go gomod github.com/golang/go/src go1.24.0 os/Getenv().("PPROF_BINARY_PATH")
49 osscip-go gomod github.com/golang/go/src go1.24.0 os/.Setenvscip-go gomod github.com/golang/go/src go1.24.0 os/Setenv().("PPROF_BINARY_PATH", "/path/to")
50 defer osscip-go gomod github.com/golang/go/src go1.24.0 os/.Setenvscip-go gomod github.com/golang/go/src go1.24.0 os/Setenv().("PPROF_BINARY_PATH", savePath)
51 testcase := []struct {
52 flags, source string
53 }{
54 {"text,functions,flat", "cpu"},
55 {"text,functions,noinlines,flat", "cpu"},
56 {"text,filefunctions,noinlines,flat", "cpu"},
57 {"text,addresses,noinlines,flat", "cpu"},
58 {"tree,addresses,flat,nodecount=4", "cpusmall"},
59 {"text,functions,flat,nodecount=5,call_tree", "unknown"},
60 {"text,alloc_objects,flat", "heap_alloc"},
61 {"text,files,flat", "heap"},
62 {"text,files,flat,focus=[12]00,taghide=[X3]00", "heap"},
63 {"text,inuse_objects,flat", "heap"},
64 {"text,inuse_objects,flat,all_frames", "heap"},
65 {"text,lines,cum,hide=line[X3]0", "cpu"},
66 {"text,lines,cum,show=[12]00", "cpu"},
67 {"text,lines,cum,hide=line[X3]0,focus=[12]00", "cpu"},
68 {"topproto,lines,cum,hide=mangled[X3]0", "cpu"},
69 {"topproto,lines", "cpu"},
70 {"tree,lines,cum,focus=[24]00", "heap"},
71 {"tree,relative_percentages,cum,focus=[24]00", "heap"},
72 {"tree,lines,cum,show_from=line2", "cpu"},
73 {"callgrind", "cpu"},
74 {"callgrind,call_tree", "cpu"},
75 {"callgrind", "heap"},
76 {"dot,functions,flat", "cpu"},
77 {"dot,functions,flat,call_tree", "cpu"},
78 {"dot,lines,flat,focus=[12]00", "heap"},
79 {"dot,unit=minimum", "heap_sizetags"},
80 {"dot,addresses,flat,ignore=[X3]002,focus=[X1]000", "contention"},
81 {"dot,files,cum", "contention"},
82 {"comments,add_comment=some-comment", "cpu"},
83 {"comments", "heap"},
84 {"tags", "cpu"},
85 {"tags,tagignore=tag[13],tagfocus=key[12]", "cpu"},
86 {"tags", "heap"},
87 {"tags,unit=bytes", "heap"},
88 {"traces", "cpu"},
89 {"traces,addresses", "cpu"},
90 {"traces", "heap_tags"},
91 {"dot,alloc_space,flat,focus=[234]00", "heap_alloc"},
92 {"dot,alloc_space,flat,tagshow=[2]00", "heap_alloc"},
93 {"dot,alloc_space,flat,hide=line.*1?23?", "heap_alloc"},
94 {"dot,inuse_space,flat,tagfocus=1mb:2gb", "heap"},
95 {"dot,inuse_space,flat,tagfocus=30kb:,tagignore=1mb:2mb", "heap"},
96 {"disasm=line[13],addresses,flat", "cpu"},
97 {"peek=line.*01", "cpu"},
98 {"weblist=line(1000|3000)$,addresses,flat", "cpu"},
99 {"tags,tagfocus=400kb:", "heap_request"},
100 {"tags,tagfocus=+400kb:", "heap_request"},
101 {"tags,relative_percentages,tagfocus=400kb:", "heap_request"},
102 {"dot", "long_name_funcs"},
103 {"text", "long_name_funcs"},
104 }
105
106 baseConfig := currentConfigscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/currentConfig().()
107 defer setCurrentConfigscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/setCurrentConfig().(baseConfig)
108 for _, tc := range testcase {
109 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().(tc.flags+":"+tc.source, func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
110 // Reset config before processing
111 setCurrentConfigscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/setCurrentConfig().(baseConfig)
112
113 testUI := &proftestscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/.TestUIscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/TestUI#{Tscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/TestUI#T.: t, AllowRxscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/TestUI#AllowRx.: "Generating report in|Ignoring local file|expression matched no samples|Interpreted .* as range, not regexp"}
114
115 f := baseFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/baseFlags().()
116 f.argsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#args. = []string{tc.source}
117
118 flags := stringsscip-go gomod github.com/golang/go/src go1.24.0 strings/.Splitscip-go gomod github.com/golang/go/src go1.24.0 strings/Split().(tc.flags, ",")
119
120 // Encode profile into a protobuf and decode it again.
121 protoTempFile, err := osscip-go gomod github.com/golang/go/src go1.24.0 os/.CreateTempscip-go gomod github.com/golang/go/src go1.24.0 os/CreateTemp().("", "profile_proto")
122 if err != nil {
123 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("cannot create tempfile: %v", err)
124 }
125 defer osscip-go gomod github.com/golang/go/src go1.24.0 os/.Removescip-go gomod github.com/golang/go/src go1.24.0 os/Remove().(protoTempFile.Namescip-go gomod github.com/golang/go/src go1.24.0 os/File#Name().())
126 defer protoTempFile.Closescip-go gomod github.com/golang/go/src go1.24.0 os/File#Close().()
127 f.stringsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#strings.["output"] = protoTempFile.Namescip-go gomod github.com/golang/go/src go1.24.0 os/File#Name().()
128
129 if flags[0] == "topproto" {
130 f.boolsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#bools.["proto"] = false
131 f.boolsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#bools.["topproto"] = true
132 f.boolsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#bools.["addresses"] = true
133 }
134
135 // First pprof invocation to save the profile into a profile.proto.
136 // Pass in flag set hen setting defaults, because otherwise default
137 // transport will try to add flags to the default flag set.
138 o1 := setDefaultsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/setDefaults().(&pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Optionsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Options#{Flagsetscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Options#Flagset.: f})
139 o1.Fetchscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Options#Fetch. = testFetcherscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFetcher#{}
140 o1.Symscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Options#Sym. = testSymbolizerscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolizer#{}
141 o1.UIscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Options#UI. = testUI
142 if err := PProfscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/PProf().(o1); err != nil {
143 t.Fatalfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Fatalf().("%s %q: %v", tc.source, tc.flags, err)
144 }
145 // Reset config after the proto invocation
146 setCurrentConfigscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/setCurrentConfig().(baseConfig)
147
148 // Read the profile from the encoded protobuf
149 outputTempFile, err := osscip-go gomod github.com/golang/go/src go1.24.0 os/.CreateTempscip-go gomod github.com/golang/go/src go1.24.0 os/CreateTemp().("", "profile_output")
150 if err != nil {
151 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("cannot create tempfile: %v", err)
152 }
153 defer osscip-go gomod github.com/golang/go/src go1.24.0 os/.Removescip-go gomod github.com/golang/go/src go1.24.0 os/Remove().(outputTempFile.Namescip-go gomod github.com/golang/go/src go1.24.0 os/File#Name().())
154 defer outputTempFile.Closescip-go gomod github.com/golang/go/src go1.24.0 os/File#Close().()
155
156 f = baseFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/baseFlags().()
157 f.stringsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#strings.["output"] = outputTempFile.Namescip-go gomod github.com/golang/go/src go1.24.0 os/File#Name().()
158 f.argsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#args. = []string{protoTempFile.Namescip-go gomod github.com/golang/go/src go1.24.0 os/File#Name().()}
159
160 delete(f.boolsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#bools., "proto")
161 addFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/addFlags().(&f, flags)
162 solution := solutionFilenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/solutionFilename().(tc.source, &f)
163 // Apply the flags for the second pprof run, and identify name of
164 // the file containing expected results
165 if flags[0] == "topproto" {
166 addFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/addFlags().(&f, flags)
167 solution = solutionFilenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/solutionFilename().(tc.source, &f)
168 delete(f.boolsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#bools., "topproto")
169 f.boolsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#bools.["text"] = true
170 }
171
172 // Second pprof invocation to read the profile from profile.proto
173 // and generate a report.
174 // Pass in flag set hen setting defaults, because otherwise default
175 // transport will try to add flags to the default flag set.
176 o2 := setDefaultsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/setDefaults().(&pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Optionsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Options#{Flagsetscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Options#Flagset.: f})
177 o2.Symscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Options#Sym. = testSymbolizeDemanglerscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolizeDemangler#{}
178 o2.Objscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Options#Obj. = new(mockObjToolscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockObjTool#)
179 o2.UIscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Options#UI. = testUI
180
181 if err := PProfscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/PProf().(o2); err != nil {
182 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("%s: %v", tc.source, err)
183 }
184 b, err := osscip-go gomod github.com/golang/go/src go1.24.0 os/.ReadFilescip-go gomod github.com/golang/go/src go1.24.0 os/ReadFile().(outputTempFile.Namescip-go gomod github.com/golang/go/src go1.24.0 os/File#Name().())
185 if err != nil {
186 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("Failed to read profile %s: %v", outputTempFile.Namescip-go gomod github.com/golang/go/src go1.24.0 os/File#Name().(), err)
187 }
188
189 // Read data file with expected solution
190 solution = "testdata/" + solution
191 sbuf, err := osscip-go gomod github.com/golang/go/src go1.24.0 os/.ReadFilescip-go gomod github.com/golang/go/src go1.24.0 os/ReadFile().(solution)
192 if err != nil {
193 t.Fatalfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Fatalf().("reading solution file %s: %v", solution, err)
194 }
195 if runtimescip-go gomod github.com/golang/go/src go1.24.0 runtime/.GOOSscip-go gomod github.com/golang/go/src go1.24.0 runtime/GOOS. == "windows" {
196 if flags[0] == "dot" {
197 // The .dot test has the paths inside strings, so \ must be escaped.
198 sbuf = bytesscip-go gomod github.com/golang/go/src go1.24.0 bytes/.ReplaceAllscip-go gomod github.com/golang/go/src go1.24.0 bytes/ReplaceAll().(sbuf, []byte("testdata/"), []byte(`testdata\\`))
199 sbuf = bytesscip-go gomod github.com/golang/go/src go1.24.0 bytes/.ReplaceAllscip-go gomod github.com/golang/go/src go1.24.0 bytes/ReplaceAll().(sbuf, []byte("/path/to/"), []byte(`\\path\\to\\`))
200 } else {
201 sbuf = bytesscip-go gomod github.com/golang/go/src go1.24.0 bytes/.ReplaceAllscip-go gomod github.com/golang/go/src go1.24.0 bytes/ReplaceAll().(sbuf, []byte("testdata/"), []byte(`testdata\`))
202 sbuf = bytesscip-go gomod github.com/golang/go/src go1.24.0 bytes/.ReplaceAllscip-go gomod github.com/golang/go/src go1.24.0 bytes/ReplaceAll().(sbuf, []byte("/path/to/"), []byte(`\path\to\`))
203 }
204 }
205
206 if flags[0] == "svg" {
207 b = removeScriptsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/removeScripts().(b)
208 sbuf = removeScriptsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/removeScripts().(sbuf)
209 }
210
211 if string(b) != string(sbuf) {
212 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("diff %s %s", solution, tc.source)
213 d, err := proftestscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/.Diffscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/Diff().(sbuf, b)
214 if err != nil {
215 t.Fatalfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Fatalf().("diff %s %v", solution, err)
216 }
217 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("%s\n%s\n", solution, d)
218 if *updateFlagscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/updateFlag. {
219 err := osscip-go gomod github.com/golang/go/src go1.24.0 os/.WriteFilescip-go gomod github.com/golang/go/src go1.24.0 os/WriteFile().(solution, b, 0644)
220 if err != nil {
221 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("failed to update the solution file %q: %v", solution, err)
222 }
223 }
224 }
225 })
226 }
227 }
228
229 // removeScripts removes <script > .. </script> pairs from its input
230 func removeScriptsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/removeScripts().(in []byte) []byte {
231 beginMarker := []byte("<script")
232 endMarker := []byte("</script>")
233
234 if begin := bytesscip-go gomod github.com/golang/go/src go1.24.0 bytes/.Indexscip-go gomod github.com/golang/go/src go1.24.0 bytes/Index().(in, beginMarker); begin > 0 {
235 if end := bytesscip-go gomod github.com/golang/go/src go1.24.0 bytes/.Indexscip-go gomod github.com/golang/go/src go1.24.0 bytes/Index().(in[begin:], endMarker); end > 0 {
236 in = append(in[:begin], removeScriptsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/removeScripts().(in[begin+end+len(endMarker):])...)
237 }
238 }
239 return in
240 }
241
242 // addFlags parses flag descriptions and adds them to the testFlags
243 func addFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/addFlags().(f *testFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#, flags []string) {
244 for _, flag := range flags {
245 fields := stringsscip-go gomod github.com/golang/go/src go1.24.0 strings/.SplitNscip-go gomod github.com/golang/go/src go1.24.0 strings/SplitN().(flag, "=", 2)
246 switch len(fields) {
247 case 1:
248 f.boolsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#bools.[fields[0]] = true
249 case 2:
250 if i, err := strconvscip-go gomod github.com/golang/go/src go1.24.0 strconv/.Atoiscip-go gomod github.com/golang/go/src go1.24.0 strconv/Atoi().(fields[1]); err == nil {
251 f.intsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#ints.[fields[0]] = i
252 } else {
253 f.stringsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#strings.[fields[0]] = fields[1]
254 }
255 }
256 }
257 }
258
259 func testSourceURLscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSourceURL().(port int) string {
260 return fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Sprintf().("http://%s/", netscip-go gomod github.com/golang/go/src go1.24.0 net/.JoinHostPortscip-go gomod github.com/golang/go/src go1.24.0 net/JoinHostPort().(testSourceAddressscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSourceAddress., strconvscip-go gomod github.com/golang/go/src go1.24.0 strconv/.Itoascip-go gomod github.com/golang/go/src go1.24.0 strconv/Itoa().(port)))
261 }
262
263 // solutionFilename returns the name of the solution file for the test
264 func solutionFilenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/solutionFilename().(source string, f *testFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#) string {
265 name := []string{"pprof", stringsscip-go gomod github.com/golang/go/src go1.24.0 strings/.TrimPrefixscip-go gomod github.com/golang/go/src go1.24.0 strings/TrimPrefix().(source, testSourceURLscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSourceURL().(8000))}
266 name = addStringscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/addString().(name, f, []string{"flat", "cum"})
267 name = addStringscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/addString().(name, f, []string{"functions", "filefunctions", "files", "lines", "addresses"})
268 name = addStringscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/addString().(name, f, []string{"noinlines"})
269 name = addStringscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/addString().(name, f, []string{"inuse_space", "inuse_objects", "alloc_space", "alloc_objects"})
270 name = addStringscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/addString().(name, f, []string{"relative_percentages"})
271 name = addStringscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/addString().(name, f, []string{"seconds"})
272 name = addStringscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/addString().(name, f, []string{"call_tree"})
273 name = addStringscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/addString().(name, f, []string{"text", "tree", "callgrind", "dot", "svg", "tags", "dot", "traces", "disasm", "peek", "weblist", "topproto", "comments"})
274 name = addStringscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/addString().(name, f, []string{"all_frames"})
275 if f.stringsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#strings.["focus"] != "" || f.stringsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#strings.["tagfocus"] != "" {
276 name = append(name, "focus")
277 }
278 if f.stringsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#strings.["ignore"] != "" || f.stringsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#strings.["tagignore"] != "" {
279 name = append(name, "ignore")
280 }
281 if f.stringsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#strings.["show_from"] != "" {
282 name = append(name, "show_from")
283 }
284 name = addStringscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/addString().(name, f, []string{"hide", "show"})
285 if f.stringsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#strings.["unit"] != "minimum" {
286 name = addStringscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/addString().(name, f, []string{"unit"})
287 }
288 return stringsscip-go gomod github.com/golang/go/src go1.24.0 strings/.Joinscip-go gomod github.com/golang/go/src go1.24.0 strings/Join().(name, ".")
289 }
290
291 func addStringscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/addString().(name []string, f *testFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#, components []string) []string {
292 for _, c := range components {
293 if f.boolsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#bools.[c] || f.stringsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#strings.[c] != "" || f.intsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#ints.[c] != 0 {
294 return append(name, c)
295 }
296 }
297 return name
298 }
299
300 // testFlags implements the plugin.FlagSet interface.
301 type testFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags# struct {
302 boolsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#bools. map[string]bool
303 intsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#ints. map[string]int
304 floatsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#floats. map[string]float64
305 stringsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#strings. map[string]string
306 argsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#args. []string
307 stringListsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#stringLists. map[string][]string
308 }
309
310 func (testFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#) ExtraUsagescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#ExtraUsage().() string { return "" }
311
312 func (testFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#) AddExtraUsagescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#AddExtraUsage().(eu string) {}
313
314 func (f testFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#) Boolscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#Bool().(s string, d bool, c string) *bool {
315 if b, ok := f.boolsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#bools.[s]; ok {
316 return &b
317 }
318 return &d
319 }
320
321 func (f testFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#) Intscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#Int().(s string, d int, c string) *int {
322 if i, ok := f.intsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#ints.[s]; ok {
323 return &i
324 }
325 return &d
326 }
327
328 func (f testFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#) Float64scip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#Float64().(s string, d float64, c string) *float64 {
329 if g, ok := f.floatsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#floats.[s]; ok {
330 return &g
331 }
332 return &d
333 }
334
335 func (f testFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#) Stringscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#String().(s, d, c string) *string {
336 if t, ok := f.stringsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#strings.[s]; ok {
337 return &t
338 }
339 return &d
340 }
341
342 func (f testFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#) StringListscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#StringList().(s, d, c string) *[]*string {
343 if t, ok := f.stringListsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#stringLists.[s]; ok {
344 // convert slice of strings to slice of string pointers before returning.
345 tp := make([]*string, len(t))
346 for i, v := range t {
347 tp[i] = &v
348 }
349 return &tp
350 }
351 return &[]*string{}
352 }
353
354 func (f testFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#) Parsescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#Parse().(func()) []string {
355 return f.argsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#args.
356 }
357
358 func baseFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/baseFlags().() testFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags# {
359 return testFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#{
360 boolsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#bools.: map[string]bool{
361 "proto": true,
362 "trim": true,
363 "compact_labels": true,
364 },
365 intsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#ints.: map[string]int{
366 "nodecount": 20,
367 },
368 floatsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#floats.: map[string]float64{
369 "nodefraction": 0.05,
370 "edgefraction": 0.01,
371 "divide_by": 1.0,
372 },
373 stringsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#strings.: map[string]string{
374 "unit": "minimum",
375 },
376 }
377 }
378
379 const testStartscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testStart. = 0x1000
380 const testOffsetscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testOffset. = 0x5000
381
382 type testFetcherscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFetcher# struct{}
383
384 func (testFetcherscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFetcher#) Fetchscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFetcher#Fetch().(s string, d, t timescip-go gomod github.com/golang/go/src go1.24.0 time/.Durationscip-go gomod github.com/golang/go/src go1.24.0 time/Duration#) (*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#, string, error) {
385 var p *profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#
386 switch s {
387 case "cpu", "unknown":
388 p = cpuProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/cpuProfile().()
389 case "cpusmall":
390 p = cpuProfileSmallscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/cpuProfileSmall().()
391 case "heap":
392 p = heapProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/heapProfile().()
393 case "heap_alloc":
394 p = heapProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/heapProfile().()
395 p.SampleTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#SampleType. = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.ValueTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#{
396 {Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "alloc_objects", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "count"},
397 {Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "alloc_space", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "bytes"},
398 }
399 case "heap_request":
400 p = heapProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/heapProfile().()
401 for _, s := range p.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Sample. {
402 s.NumLabelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#NumLabel.["request"] = s.NumLabelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#NumLabel.["bytes"]
403 }
404 case "heap_sizetags":
405 p = heapProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/heapProfile().()
406 tags := []int64{2, 4, 8, 16, 32, 64, 128, 256}
407 for _, s := range p.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Sample. {
408 numValues := append(s.NumLabelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#NumLabel.["bytes"], tags...)
409 s.NumLabelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#NumLabel.["bytes"] = numValues
410 }
411 case "heap_tags":
412 p = heapProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/heapProfile().()
413 for i := 0; i < len(p.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Sample.); i += 2 {
414 s := p.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Sample.[i]
415 if s.Labelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Label. == nil {
416 s.Labelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Label. = make(map[string][]string)
417 }
418 s.NumLabelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#NumLabel.["request"] = s.NumLabelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#NumLabel.["bytes"]
419 s.Labelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Label.["key1"] = []string{"tag"}
420 }
421 case "contention":
422 p = contentionProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/contentionProfile().()
423 case "symbolz":
424 p = symzProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/symzProfile().()
425 case "long_name_funcs":
426 p = longNameFuncsProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/longNameFuncsProfile().()
427 default:
428 return nil, "", fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Errorfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Errorf().("unexpected source: %s", s)
429 }
430 return p, testSourceURLscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSourceURL().(8000) + s, nil
431 }
432
433 type testSymbolizerscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolizer# struct{}
434
435 func (testSymbolizerscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolizer#) Symbolizescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolizer#Symbolize().(_ string, _ pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.MappingSourcesscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/MappingSources#, _ *profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#) error {
436 return nil
437 }
438
439 type testSymbolizeDemanglerscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolizeDemangler# struct{}
440
441 func (testSymbolizeDemanglerscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolizeDemangler#) Symbolizescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolizeDemangler#Symbolize().(_ string, _ pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.MappingSourcesscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/MappingSources#, p *profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#) error {
442 for _, fn := range p.Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Function. {
443 if fn.Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name. == "" || fn.SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName. == fn.Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name. {
444 fn.Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name. = fakeDemanglerscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/fakeDemangler().(fn.SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.)
445 }
446 }
447 return nil
448 }
449
450 func testFetchSymbolsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFetchSymbols().(source, post string) ([]byte, error) {
451 var buf bytesscip-go gomod github.com/golang/go/src go1.24.0 bytes/.Bufferscip-go gomod github.com/golang/go/src go1.24.0 bytes/Buffer#
452
453 switch source {
454 case testSourceURLscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSourceURL().(8000) + "symbolz":
455 for _, address := range stringsscip-go gomod github.com/golang/go/src go1.24.0 strings/.Splitscip-go gomod github.com/golang/go/src go1.24.0 strings/Split().(post, "+") {
456 a, _ := strconvscip-go gomod github.com/golang/go/src go1.24.0 strconv/.ParseIntscip-go gomod github.com/golang/go/src go1.24.0 strconv/ParseInt().(address, 0, 64)
457 fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Fprintf().(&buf, "%v\t", address)
458 if a-testStartscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testStart. > testOffsetscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testOffset. {
459 fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Fprintf().(&buf, "wrong_source_%v_", address)
460 continue
461 }
462 fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Fprintf().(&buf, "%#x\n", a-testStartscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testStart.)
463 }
464 return buf.Bytesscip-go gomod github.com/golang/go/src go1.24.0 bytes/Buffer#Bytes().(), nil
465 case testSourceURLscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSourceURL().(8001) + "symbolz":
466 for _, address := range stringsscip-go gomod github.com/golang/go/src go1.24.0 strings/.Splitscip-go gomod github.com/golang/go/src go1.24.0 strings/Split().(post, "+") {
467 a, _ := strconvscip-go gomod github.com/golang/go/src go1.24.0 strconv/.ParseIntscip-go gomod github.com/golang/go/src go1.24.0 strconv/ParseInt().(address, 0, 64)
468 fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Fprintf().(&buf, "%v\t", address)
469 if a-testStartscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testStart. < testOffsetscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testOffset. {
470 fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Fprintf().(&buf, "wrong_source_%v_", address)
471 continue
472 }
473 fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Fprintf().(&buf, "%#x\n", a-testStartscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testStart.-testOffsetscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testOffset.)
474 }
475 return buf.Bytesscip-go gomod github.com/golang/go/src go1.24.0 bytes/Buffer#Bytes().(), nil
476 default:
477 return nil, fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Errorfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Errorf().("unexpected source: %s", source)
478 }
479 }
480
481 type testSymbolzSymbolizerscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolzSymbolizer# struct{}
482
483 func (testSymbolzSymbolizerscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolzSymbolizer#) Symbolizescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolzSymbolizer#Symbolize().(variables string, sources pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.MappingSourcesscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/MappingSources#, p *profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#) error {
484 return symbolzscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/symbolz`/.Symbolizescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/symbolz`/Symbolize().(p, false, sources, testFetchSymbolsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFetchSymbols()., nil)
485 }
486
487 func fakeDemanglerscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/fakeDemangler().(name string) string {
488 switch name {
489 case "mangled1000":
490 return "line1000"
491 case "mangled2000":
492 return "line2000"
493 case "mangled2001":
494 return "line2001"
495 case "mangled3000":
496 return "line3000"
497 case "mangled3001":
498 return "line3001"
499 case "mangled3002":
500 return "line3002"
501 case "mangledNEW":
502 return "operator new"
503 case "mangledMALLOC":
504 return "malloc"
505 default:
506 return name
507 }
508 }
509
510 // longNameFuncsProfile returns a profile with function names which should be
511 // shortened in graph and flame views.
512 func longNameFuncsProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/longNameFuncsProfile().() *profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile# {
513 var longNameFuncsM = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#{
514 {
515 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#ID.: 1,
516 Startscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#Start.: 0x1000,
517 Limitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#Limit.: 0x4000,
518 Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#File.: "/path/to/testbinary",
519 HasFunctionsscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasFunctions.: true,
520 HasFilenamesscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasFilenames.: true,
521 HasLineNumbersscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasLineNumbers.: true,
522 HasInlineFramesscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasInlineFrames.: true,
523 },
524 }
525
526 var longNameFuncsF = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#{
527 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 1, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "path/to/package1.object.function1", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "path/to/package1.object.function1", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "path/to/package1.go"},
528 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 2, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "(anonymous namespace)::Bar::Foo", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "(anonymous namespace)::Bar::Foo", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "a/long/path/to/package2.cc"},
529 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 3, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "java.bar.foo.FooBar.run(java.lang.Runnable)", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "java.bar.foo.FooBar.run(java.lang.Runnable)", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "FooBar.java"},
530 }
531
532 var longNameFuncsL = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{
533 {
534 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 1000,
535 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: longNameFuncsM[0],
536 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x1000,
537 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
538 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: longNameFuncsF[0], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 1},
539 },
540 },
541 {
542 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 2000,
543 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: longNameFuncsM[0],
544 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x2000,
545 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
546 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: longNameFuncsF[1], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 4},
547 },
548 },
549 {
550 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 3000,
551 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: longNameFuncsM[0],
552 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x3000,
553 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
554 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: longNameFuncsF[2], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 9},
555 },
556 },
557 }
558
559 return &profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#{
560 PeriodTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#PeriodType.: &profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.ValueTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#{Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "cpu", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "milliseconds"},
561 Periodscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Period.: 1,
562 DurationNanosscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#DurationNanos.: 10e9,
563 SampleTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#SampleType.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.ValueTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#{
564 {Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "samples", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "count"},
565 {Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "cpu", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "milliseconds"},
566 },
567 Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Sample.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#{
568 {
569 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{longNameFuncsL[0], longNameFuncsL[1], longNameFuncsL[2]},
570 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{1000, 1000},
571 },
572 {
573 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{longNameFuncsL[0], longNameFuncsL[1]},
574 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{100, 100},
575 },
576 {
577 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{longNameFuncsL[2]},
578 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{10, 10},
579 },
580 },
581 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Location.: longNameFuncsL,
582 Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Function.: longNameFuncsF,
583 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Mapping.: longNameFuncsM,
584 }
585 }
586
587 func cpuProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/cpuProfile().() *profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile# {
588 var cpuM = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#{
589 {
590 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#ID.: 1,
591 Startscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#Start.: 0x1000,
592 Limitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#Limit.: 0x4000,
593 Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#File.: "/path/to/testbinary",
594 HasFunctionsscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasFunctions.: true,
595 HasFilenamesscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasFilenames.: true,
596 HasLineNumbersscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasLineNumbers.: true,
597 HasInlineFramesscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasInlineFrames.: true,
598 },
599 }
600
601 var cpuF = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#{
602 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 1, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled1000", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled1000", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file1000.src"},
603 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 2, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled2000", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled2000", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file2000.src"},
604 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 3, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled2001", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled2001", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file2000.src"},
605 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 4, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled3000", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled3000", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file3000.src"},
606 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 5, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled3001", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled3001", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file3000.src"},
607 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 6, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled3002", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled3002", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file3000.src"},
608 }
609
610 var cpuL = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{
611 {
612 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 1000,
613 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: cpuM[0],
614 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x1000,
615 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
616 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: cpuF[0], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 1},
617 },
618 },
619 {
620 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 2000,
621 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: cpuM[0],
622 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x2000,
623 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
624 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: cpuF[2], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 9},
625 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: cpuF[1], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 4},
626 },
627 },
628 {
629 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 3000,
630 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: cpuM[0],
631 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x3000,
632 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
633 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: cpuF[5], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 2},
634 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: cpuF[4], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 5},
635 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: cpuF[3], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 6},
636 },
637 },
638 {
639 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 3001,
640 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: cpuM[0],
641 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x3001,
642 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
643 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: cpuF[4], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 8},
644 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: cpuF[3], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 9},
645 },
646 },
647 {
648 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 3002,
649 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: cpuM[0],
650 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x3002,
651 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
652 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: cpuF[5], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 5},
653 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: cpuF[3], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 9},
654 },
655 },
656 }
657
658 return &profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#{
659 PeriodTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#PeriodType.: &profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.ValueTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#{Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "cpu", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "milliseconds"},
660 Periodscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Period.: 1,
661 DurationNanosscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#DurationNanos.: 10e9,
662 SampleTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#SampleType.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.ValueTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#{
663 {Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "samples", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "count"},
664 {Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "cpu", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "milliseconds"},
665 },
666 Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Sample.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#{
667 {
668 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{cpuL[0], cpuL[1], cpuL[2]},
669 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{1000, 1000},
670 Labelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Label.: map[string][]string{
671 "key1": {"tag1"},
672 "key2": {"tag1"},
673 },
674 },
675 {
676 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{cpuL[0], cpuL[3]},
677 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{100, 100},
678 Labelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Label.: map[string][]string{
679 "key1": {"tag2"},
680 "key3": {"tag2"},
681 },
682 },
683 {
684 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{cpuL[1], cpuL[4]},
685 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{10, 10},
686 Labelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Label.: map[string][]string{
687 "key1": {"tag3"},
688 "key2": {"tag2"},
689 },
690 },
691 {
692 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{cpuL[2]},
693 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{10, 10},
694 Labelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Label.: map[string][]string{
695 "key1": {"tag4"},
696 "key2": {"tag1"},
697 },
698 },
699 },
700 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Location.: cpuL,
701 Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Function.: cpuF,
702 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Mapping.: cpuM,
703 }
704 }
705
706 func cpuProfileSmallscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/cpuProfileSmall().() *profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile# {
707 var cpuM = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#{
708 {
709 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#ID.: 1,
710 Startscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#Start.: 0x1000,
711 Limitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#Limit.: 0x4000,
712 Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#File.: "/path/to/testbinary",
713 HasFunctionsscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasFunctions.: true,
714 HasFilenamesscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasFilenames.: true,
715 HasLineNumbersscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasLineNumbers.: true,
716 HasInlineFramesscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasInlineFrames.: true,
717 },
718 }
719
720 var cpuL = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{
721 {
722 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 1000,
723 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: cpuM[0],
724 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x1000,
725 },
726 {
727 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 2000,
728 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: cpuM[0],
729 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x2000,
730 },
731 {
732 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 3000,
733 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: cpuM[0],
734 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x3000,
735 },
736 {
737 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 4000,
738 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: cpuM[0],
739 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x4000,
740 },
741 {
742 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 5000,
743 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: cpuM[0],
744 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x5000,
745 },
746 }
747
748 return &profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#{
749 PeriodTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#PeriodType.: &profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.ValueTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#{Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "cpu", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "milliseconds"},
750 Periodscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Period.: 1,
751 DurationNanosscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#DurationNanos.: 10e9,
752 SampleTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#SampleType.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.ValueTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#{
753 {Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "samples", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "count"},
754 {Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "cpu", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "milliseconds"},
755 },
756 Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Sample.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#{
757 {
758 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{cpuL[0], cpuL[1], cpuL[2]},
759 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{1000, 1000},
760 },
761 {
762 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{cpuL[3], cpuL[1], cpuL[4]},
763 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{1000, 1000},
764 },
765 {
766 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{cpuL[2]},
767 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{1000, 1000},
768 },
769 {
770 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{cpuL[4]},
771 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{1000, 1000},
772 },
773 },
774 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Location.: cpuL,
775 Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Function.: nil,
776 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Mapping.: cpuM,
777 }
778 }
779
780 func heapProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/heapProfile().() *profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile# {
781 var heapM = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#{
782 {
783 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#ID.: 1,
784 BuildIDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#BuildID.: "buildid",
785 Startscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#Start.: 0x1000,
786 Limitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#Limit.: 0x4000,
787 HasFunctionsscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasFunctions.: true,
788 HasFilenamesscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasFilenames.: true,
789 HasLineNumbersscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasLineNumbers.: true,
790 HasInlineFramesscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasInlineFrames.: true,
791 },
792 }
793
794 var heapF = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#{
795 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 1, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "pruneme", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "pruneme", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "prune.h"},
796 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 2, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled1000", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled1000", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file1000.src"},
797 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 3, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled2000", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled2000", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file2000.src"},
798 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 4, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled2001", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled2001", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file2000.src"},
799 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 5, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled3000", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled3000", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file3000.src"},
800 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 6, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled3001", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled3001", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file3000.src"},
801 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 7, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled3002", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled3002", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file3000.src"},
802 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 8, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangledMALLOC", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangledMALLOC", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "malloc.h"},
803 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 9, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangledNEW", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangledNEW", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "new.h"},
804 }
805
806 var heapL = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{
807 {
808 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 1000,
809 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: heapM[0],
810 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x1000,
811 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
812 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[0], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 100},
813 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[7], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 100},
814 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[1], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 1},
815 },
816 },
817 {
818 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 2000,
819 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: heapM[0],
820 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x2000,
821 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
822 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[8], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 100},
823 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[3], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 2},
824 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[2], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 3},
825 },
826 },
827 {
828 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 3000,
829 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: heapM[0],
830 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x3000,
831 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
832 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[8], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 100},
833 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[6], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 3},
834 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[5], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 2},
835 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[4], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 4},
836 },
837 },
838 {
839 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 3001,
840 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: heapM[0],
841 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x3001,
842 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
843 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[0], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 100},
844 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[8], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 100},
845 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[5], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 2},
846 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[4], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 4},
847 },
848 },
849 {
850 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 3002,
851 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: heapM[0],
852 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x3002,
853 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
854 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[6], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 3},
855 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: heapF[4], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 4},
856 },
857 },
858 }
859
860 return &profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#{
861 Commentsscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Comments.: []string{"comment", "#hidden comment"},
862 PeriodTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#PeriodType.: &profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.ValueTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#{Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "allocations", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "bytes"},
863 Periodscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Period.: 524288,
864 SampleTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#SampleType.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.ValueTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#{
865 {Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "inuse_objects", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "count"},
866 {Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "inuse_space", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "bytes"},
867 },
868 Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Sample.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#{
869 {
870 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{heapL[0], heapL[1], heapL[2]},
871 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{10, 1024000},
872 NumLabelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#NumLabel.: map[string][]int64{"bytes": {102400}},
873 },
874 {
875 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{heapL[0], heapL[3]},
876 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{20, 4096000},
877 NumLabelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#NumLabel.: map[string][]int64{"bytes": {204800}},
878 },
879 {
880 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{heapL[1], heapL[4]},
881 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{40, 65536000},
882 NumLabelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#NumLabel.: map[string][]int64{"bytes": {1638400}},
883 },
884 {
885 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{heapL[2]},
886 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{80, 32768000},
887 NumLabelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#NumLabel.: map[string][]int64{"bytes": {409600}},
888 },
889 },
890 DropFramesscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#DropFrames.: ".*operator new.*|malloc",
891 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Location.: heapL,
892 Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Function.: heapF,
893 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Mapping.: heapM,
894 }
895 }
896
897 func contentionProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/contentionProfile().() *profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile# {
898 var contentionM = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#{
899 {
900 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#ID.: 1,
901 BuildIDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#BuildID.: "buildid-contention",
902 Startscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#Start.: 0x1000,
903 Limitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#Limit.: 0x4000,
904 HasFunctionsscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasFunctions.: true,
905 HasFilenamesscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasFilenames.: true,
906 HasLineNumbersscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasLineNumbers.: true,
907 HasInlineFramesscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#HasInlineFrames.: true,
908 },
909 }
910
911 var contentionF = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#{
912 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 1, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled1000", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled1000", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file1000.src"},
913 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 2, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled2000", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled2000", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file2000.src"},
914 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 3, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled2001", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled2001", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file2000.src"},
915 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 4, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled3000", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled3000", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file3000.src"},
916 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 5, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled3001", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled3001", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file3000.src"},
917 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#ID.: 6, Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name.: "mangled3002", SystemNamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#SystemName.: "mangled3002", Filenamescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Filename.: "testdata/file3000.src"},
918 }
919
920 var contentionL = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{
921 {
922 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 1000,
923 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: contentionM[0],
924 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x1000,
925 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
926 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: contentionF[0], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 1},
927 },
928 },
929 {
930 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 2000,
931 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: contentionM[0],
932 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x2000,
933 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
934 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: contentionF[2], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 2},
935 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: contentionF[1], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 3},
936 },
937 },
938 {
939 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 3000,
940 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: contentionM[0],
941 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x3000,
942 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
943 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: contentionF[5], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 2},
944 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: contentionF[4], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 3},
945 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: contentionF[3], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 5},
946 },
947 },
948 {
949 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 3001,
950 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: contentionM[0],
951 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x3001,
952 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
953 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: contentionF[4], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 3},
954 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: contentionF[3], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 5},
955 },
956 },
957 {
958 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 3002,
959 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: contentionM[0],
960 Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: 0x3002,
961 Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.: []profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#{
962 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: contentionF[5], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 4},
963 {Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function.: contentionF[3], Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Line.: 3},
964 },
965 },
966 }
967
968 return &profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#{
969 PeriodTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#PeriodType.: &profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.ValueTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#{Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "contentions", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "count"},
970 Periodscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Period.: 524288,
971 SampleTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#SampleType.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.ValueTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#{
972 {Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "contentions", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "count"},
973 {Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "delay", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "nanoseconds"},
974 },
975 Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Sample.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#{
976 {
977 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{contentionL[0], contentionL[1], contentionL[2]},
978 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{10, 10240000},
979 },
980 {
981 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{contentionL[0], contentionL[3]},
982 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{20, 40960000},
983 },
984 {
985 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{contentionL[1], contentionL[4]},
986 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{40, 65536000},
987 },
988 {
989 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{contentionL[2]},
990 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{80, 32768000},
991 },
992 },
993 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Location.: contentionL,
994 Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Function.: contentionF,
995 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Mapping.: contentionM,
996 Commentsscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Comments.: []string{"Comment #1", "Comment #2"},
997 }
998 }
999
1000 func symzProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/symzProfile().() *profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile# {
1001 var symzM = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#{
1002 {
1003 IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#ID.: 1,
1004 Startscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#Start.: testStartscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testStart.,
1005 Limitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#Limit.: 0x4000,
1006 Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#File.: "/path/to/testbinary",
1007 },
1008 }
1009
1010 var symzL = []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{
1011 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 1, Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: symzM[0], Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: testStartscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testStart.},
1012 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 2, Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: symzM[0], Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: testStartscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testStart. + 0x1000},
1013 {IDscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#ID.: 3, Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping.: symzM[0], Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address.: testStartscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testStart. + 0x2000},
1014 }
1015
1016 return &profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#{
1017 PeriodTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#PeriodType.: &profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.ValueTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#{Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "cpu", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "milliseconds"},
1018 Periodscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Period.: 1,
1019 DurationNanosscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#DurationNanos.: 10e9,
1020 SampleTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#SampleType.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.ValueTypescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#{
1021 {Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "samples", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "count"},
1022 {Typescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Type.: "cpu", Unitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/ValueType#Unit.: "milliseconds"},
1023 },
1024 Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Sample.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#{
1025 {
1026 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Location.: []*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#{symzL[0], symzL[1], symzL[2]},
1027 Valuescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Value.: []int64{1, 1},
1028 },
1029 },
1030 Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Location.: symzL,
1031 Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Mapping.: symzM,
1032 }
1033 }
1034
1035 func largeProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/largeProfile().(tb testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.TBscip-go gomod github.com/golang/go/src go1.24.0 testing/TB#) *profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile# {
1036 tb.Helperscip-go gomod github.com/golang/go/src go1.24.0 testing/TB#Helper().()
1037 input := proftestscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/.LargeProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/LargeProfile().(tb)
1038 prof, err := profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Parsescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Parse().(bytesscip-go gomod github.com/golang/go/src go1.24.0 bytes/.NewBufferscip-go gomod github.com/golang/go/src go1.24.0 bytes/NewBuffer().(input))
1039 if err != nil {
1040 tb.Fatalscip-go gomod github.com/golang/go/src go1.24.0 testing/TB#Fatal().(err)
1041 }
1042 return prof
1043 }
1044
1045 var autoCompleteTestsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/autoCompleteTests. = []struct {
1046 inscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/autoCompleteTests:in. string
1047 outscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/autoCompleteTests:out. string
1048 }{
1049 {"", ""},
1050 {"xyz", "xyz"}, // no match
1051 {"dis", "disasm"}, // single match
1052 {"t", "t"}, // many matches
1053 {"top abc", "top abc"}, // no function name match
1054 {"top mangledM", "top mangledMALLOC"}, // single function name match
1055 {"top cmd mangledM", "top cmd mangledMALLOC"},
1056 {"top mangled", "top mangled"}, // many function name matches
1057 {"cmd mangledM", "cmd mangledM"}, // invalid command
1058 {"top mangledM cmd", "top mangledM cmd"}, // cursor misplaced
1059 {"top edMA", "top mangledMALLOC"}, // single infix function name match
1060 {"top -mangledM", "top -mangledMALLOC"}, // ignore sign handled
1061 {"lin", "lines"}, // single variable match
1062 {"EdGeF", "edgefraction"}, // single capitalized match
1063 {"help dis", "help disasm"}, // help command match
1064 {"help relative_perc", "help relative_percentages"}, // help variable match
1065 {"help coMpa", "help compact_labels"}, // help variable capitalized match
1066 }
1067
1068 func TestAutoCompletescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/TestAutoComplete().(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
1069 complete := newCompleterscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/newCompleter().(functionNamesscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/functionNames().(heapProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/heapProfile().()))
1070
1071 for _, test := range autoCompleteTestsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/autoCompleteTests. {
1072 if out := complete(test.inscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/autoCompleteTests:in.); out != test.outscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/autoCompleteTests:out. {
1073 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("autoComplete(%s) = %s; want %s", test.inscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/autoCompleteTests:in., out, test.outscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/autoCompleteTests:out.)
1074 }
1075 }
1076 }
1077
1078 func TestTagFilterscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/TestTagFilter().(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
1079 var tagFilterTests = []struct {
1080 desc, value string
1081 tags map[string][]string
1082 want bool
1083 }{
1084 {
1085 "1 key with 1 matching value",
1086 "tag2",
1087 map[string][]string{"value1": {"tag1", "tag2"}},
1088 true,
1089 },
1090 {
1091 "1 key with no matching values",
1092 "tag3",
1093 map[string][]string{"value1": {"tag1", "tag2"}},
1094 false,
1095 },
1096 {
1097 "two keys, each with value matching different one value in list",
1098 "tag1,tag3",
1099 map[string][]string{"value1": {"tag1", "tag2"}, "value2": {"tag3"}},
1100 true,
1101 },
1102 {"two keys, all value matching different regex value in list",
1103 "t..[12],t..3",
1104 map[string][]string{"value1": {"tag1", "tag2"}, "value2": {"tag3"}},
1105 true,
1106 },
1107 {
1108 "one key, not all values in list matched",
1109 "tag2,tag3",
1110 map[string][]string{"value1": {"tag1", "tag2"}},
1111 false,
1112 },
1113 {
1114 "key specified, list of tags where all tags in list matched",
1115 "key1=tag1,tag2",
1116 map[string][]string{"key1": {"tag1", "tag2"}},
1117 true,
1118 },
1119 {"key specified, list of tag values where not all are matched",
1120 "key1=tag1,tag2",
1121 map[string][]string{"key1": {"tag1"}},
1122 true,
1123 },
1124 {
1125 "key included for regex matching, list of values where all values in list matched",
1126 "key1:tag1,tag2",
1127 map[string][]string{"key1": {"tag1", "tag2"}},
1128 true,
1129 },
1130 {
1131 "key included for regex matching, list of values where not only second value matched",
1132 "key1:tag1,tag2",
1133 map[string][]string{"key1": {"tag2"}},
1134 false,
1135 },
1136 {
1137 "key included for regex matching, list of values where not only first value matched",
1138 "key1:tag1,tag2",
1139 map[string][]string{"key1": {"tag1"}},
1140 false,
1141 },
1142 }
1143 for _, test := range tagFilterTests {
1144 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().(test.desc, func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
1145 filter, err := compileTagFilterscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/compileTagFilter().(test.desc, test.value, nil, &proftestscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/.TestUIscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/TestUI#{Tscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/TestUI#T.: t}, nil)
1146 if err != nil {
1147 t.Fatalfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Fatalf().("tagFilter %s:%v", test.desc, err)
1148 }
1149 s := profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#{
1150 Labelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#Label.: test.tags,
1151 }
1152 if got := filter(&s); got != test.want {
1153 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("tagFilter %s: got %v, want %v", test.desc, got, test.want)
1154 }
1155 })
1156 }
1157 }
1158
1159 func TestIdentifyNumLabelUnitsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/TestIdentifyNumLabelUnits().(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
1160 var tagFilterTests = []struct {
1161 desc string
1162 tagVals []map[string][]int64
1163 tagUnits []map[string][]string
1164 wantUnits map[string]string
1165 allowedRx string
1166 wantIgnoreErrCount int
1167 }{
1168 {
1169 "Multiple keys, no units for all keys",
1170 []map[string][]int64{{"keyA": {131072}, "keyB": {128}}},
1171 []map[string][]string{{"keyA": {}, "keyB": {""}}},
1172 map[string]string{"keyA": "keyA", "keyB": "keyB"},
1173 "",
1174 0,
1175 },
1176 {
1177 "Multiple keys, different units for each key",
1178 []map[string][]int64{{"keyA": {131072}, "keyB": {128}}},
1179 []map[string][]string{{"keyA": {"bytes"}, "keyB": {"kilobytes"}}},
1180 map[string]string{"keyA": "bytes", "keyB": "kilobytes"},
1181 "",
1182 0,
1183 },
1184 {
1185 "Multiple keys with multiple values, different units for each key",
1186 []map[string][]int64{{"keyC": {131072, 1}, "keyD": {128, 252}}},
1187 []map[string][]string{{"keyC": {"bytes", "bytes"}, "keyD": {"kilobytes", "kilobytes"}}},
1188 map[string]string{"keyC": "bytes", "keyD": "kilobytes"},
1189 "",
1190 0,
1191 },
1192 {
1193 "Multiple keys with multiple values, some units missing",
1194 []map[string][]int64{{"key1": {131072, 1}, "A": {128, 252}, "key3": {128}, "key4": {1}}, {"key3": {128}, "key4": {1}}},
1195 []map[string][]string{{"key1": {"", "bytes"}, "A": {"kilobytes", ""}, "key3": {""}, "key4": {"hour"}}, {"key3": {"seconds"}, "key4": {""}}},
1196 map[string]string{"key1": "bytes", "A": "kilobytes", "key3": "seconds", "key4": "hour"},
1197 "",
1198 0,
1199 },
1200 {
1201 "One key with three units in same sample",
1202 []map[string][]int64{{"key": {8, 8, 16}}},
1203 []map[string][]string{{"key": {"bytes", "megabytes", "kilobytes"}}},
1204 map[string]string{"key": "bytes"},
1205 `(For tag key used unit bytes, also encountered unit\(s\) kilobytes, megabytes)`,
1206 1,
1207 },
1208 {
1209 "One key with four units in same sample",
1210 []map[string][]int64{{"key": {8, 8, 16, 32}}},
1211 []map[string][]string{{"key": {"bytes", "kilobytes", "a", "megabytes"}}},
1212 map[string]string{"key": "bytes"},
1213 `(For tag key used unit bytes, also encountered unit\(s\) a, kilobytes, megabytes)`,
1214 1,
1215 },
1216 {
1217 "One key with two units in same sample",
1218 []map[string][]int64{{"key": {8, 8}}},
1219 []map[string][]string{{"key": {"bytes", "seconds"}}},
1220 map[string]string{"key": "bytes"},
1221 `(For tag key used unit bytes, also encountered unit\(s\) seconds)`,
1222 1,
1223 },
1224 {
1225 "One key with different units in different samples",
1226 []map[string][]int64{{"key1": {8}}, {"key1": {8}}, {"key1": {8}}},
1227 []map[string][]string{{"key1": {"bytes"}}, {"key1": {"kilobytes"}}, {"key1": {"megabytes"}}},
1228 map[string]string{"key1": "bytes"},
1229 `(For tag key1 used unit bytes, also encountered unit\(s\) kilobytes, megabytes)`,
1230 1,
1231 },
1232 {
1233 "Key alignment, unit not specified",
1234 []map[string][]int64{{"alignment": {8}}},
1235 []map[string][]string{nil},
1236 map[string]string{"alignment": "bytes"},
1237 "",
1238 0,
1239 },
1240 {
1241 "Key request, unit not specified",
1242 []map[string][]int64{{"request": {8}}, {"request": {8, 8}}},
1243 []map[string][]string{nil, nil},
1244 map[string]string{"request": "bytes"},
1245 "",
1246 0,
1247 },
1248 {
1249 "Check units not over-written for keys with default units",
1250 []map[string][]int64{{
1251 "alignment": {8},
1252 "request": {8},
1253 "bytes": {8},
1254 }},
1255 []map[string][]string{{
1256 "alignment": {"seconds"},
1257 "request": {"minutes"},
1258 "bytes": {"hours"},
1259 }},
1260 map[string]string{
1261 "alignment": "seconds",
1262 "request": "minutes",
1263 "bytes": "hours",
1264 },
1265 "",
1266 0,
1267 },
1268 }
1269 for _, test := range tagFilterTests {
1270 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().(test.desc, func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
1271 p := profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#{Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Sample.: make([]*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#, len(test.tagVals))}
1272 for i, numLabel := range test.tagVals {
1273 s := profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#{
1274 NumLabelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#NumLabel.: numLabel,
1275 NumUnitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#NumUnit.: test.tagUnits[i],
1276 }
1277 p.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Sample.[i] = &s
1278 }
1279 testUI := &proftestscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/.TestUIscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/TestUI#{Tscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/TestUI#T.: t, AllowRxscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/TestUI#AllowRx.: test.allowedRx}
1280 units := identifyNumLabelUnitsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/identifyNumLabelUnits().(&p, testUI)
1281 if !reflectscip-go gomod github.com/golang/go/src go1.24.0 reflect/.DeepEqualscip-go gomod github.com/golang/go/src go1.24.0 reflect/DeepEqual().(test.wantUnits, units) {
1282 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("got %v units, want %v", units, test.wantUnits)
1283 }
1284 if got, want := testUI.NumAllowRxMatchesscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/TestUI#NumAllowRxMatches., test.wantIgnoreErrCount; want != got {
1285 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("got %d errors logged, want %d errors logged", got, want)
1286 }
1287 })
1288 }
1289 }
1290
1291 func TestNumericTagFilterscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/TestNumericTagFilter().(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
1292 var tagFilterTests = []struct {
1293 desc, value string
1294 tags map[string][]int64
1295 identifiedUnits map[string]string
1296 want bool
1297 }{
1298 {
1299 "Match when unit conversion required",
1300 "128kb",
1301 map[string][]int64{"key1": {131072}, "key2": {128}},
1302 map[string]string{"key1": "bytes", "key2": "kilobytes"},
1303 true,
1304 },
1305 {
1306 "Match only when values equal after unit conversion",
1307 "512kb",
1308 map[string][]int64{"key1": {512}, "key2": {128}},
1309 map[string]string{"key1": "bytes", "key2": "kilobytes"},
1310 false,
1311 },
1312 {
1313 "Match when values and units initially equal",
1314 "10bytes",
1315 map[string][]int64{"key1": {10}, "key2": {128}},
1316 map[string]string{"key1": "bytes", "key2": "kilobytes"},
1317 true,
1318 },
1319 {
1320 "Match range without lower bound, no unit conversion required",
1321 ":10bytes",
1322 map[string][]int64{"key1": {8}},
1323 map[string]string{"key1": "bytes"},
1324 true,
1325 },
1326 {
1327 "Match range without lower bound, unit conversion required",
1328 ":10kb",
1329 map[string][]int64{"key1": {8}},
1330 map[string]string{"key1": "bytes"},
1331 true,
1332 },
1333 {
1334 "Match range without upper bound, unit conversion required",
1335 "10b:",
1336 map[string][]int64{"key1": {8}},
1337 map[string]string{"key1": "kilobytes"},
1338 true,
1339 },
1340 {
1341 "Match range without upper bound, no unit conversion required",
1342 "10b:",
1343 map[string][]int64{"key1": {12}},
1344 map[string]string{"key1": "bytes"},
1345 true,
1346 },
1347 {
1348 "Don't match range without upper bound, no unit conversion required",
1349 "10b:",
1350 map[string][]int64{"key1": {8}},
1351 map[string]string{"key1": "bytes"},
1352 false,
1353 },
1354 {
1355 "Multiple keys with different units, don't match range without upper bound",
1356 "10kb:",
1357 map[string][]int64{"key1": {8}},
1358 map[string]string{"key1": "bytes", "key2": "kilobytes"},
1359 false,
1360 },
1361 {
1362 "Match range without upper bound, unit conversion required",
1363 "10b:",
1364 map[string][]int64{"key1": {8}},
1365 map[string]string{"key1": "kilobytes"},
1366 true,
1367 },
1368 {
1369 "Don't match range without lower bound, no unit conversion required",
1370 ":10b",
1371 map[string][]int64{"key1": {12}},
1372 map[string]string{"key1": "bytes"},
1373 false,
1374 },
1375 {
1376 "Match specific key, key present, one of two values match",
1377 "bytes=5b",
1378 map[string][]int64{"bytes": {10, 5}},
1379 map[string]string{"bytes": "bytes"},
1380 true,
1381 },
1382 {
1383 "Match specific key, key present and value matches",
1384 "bytes=1024b",
1385 map[string][]int64{"bytes": {1024}},
1386 map[string]string{"bytes": "kilobytes"},
1387 false,
1388 },
1389 {
1390 "Match specific key, matching key present and value matches, also non-matching key",
1391 "bytes=1024b",
1392 map[string][]int64{"bytes": {1024}, "key2": {5}},
1393 map[string]string{"bytes": "bytes", "key2": "bytes"},
1394 true,
1395 },
1396 {
1397 "Match specific key and range of values, value matches",
1398 "bytes=512b:1024b",
1399 map[string][]int64{"bytes": {780}},
1400 map[string]string{"bytes": "bytes"},
1401 true,
1402 },
1403 {
1404 "Match specific key and range of values, value too large",
1405 "key1=1kb:2kb",
1406 map[string][]int64{"key1": {4096}},
1407 map[string]string{"key1": "bytes"},
1408 false,
1409 },
1410 {
1411 "Match specific key and range of values, value too small",
1412 "key1=1kb:2kb",
1413 map[string][]int64{"key1": {256}},
1414 map[string]string{"key1": "bytes"},
1415 false,
1416 },
1417 {
1418 "Match specific key and value, unit conversion required",
1419 "bytes=1024b",
1420 map[string][]int64{"bytes": {1}},
1421 map[string]string{"bytes": "kilobytes"},
1422 true,
1423 },
1424 {
1425 "Match specific key and value, key does not appear",
1426 "key2=256bytes",
1427 map[string][]int64{"key1": {256}},
1428 map[string]string{"key1": "bytes"},
1429 false,
1430 },
1431 {
1432 "Match negative key and range of values, value matches",
1433 "bytes=-512b:-128b",
1434 map[string][]int64{"bytes": {-256}},
1435 map[string]string{"bytes": "bytes"},
1436 true,
1437 },
1438 {
1439 "Match negative key and range of values, value outside range",
1440 "bytes=-512b:-128b",
1441 map[string][]int64{"bytes": {-2048}},
1442 map[string]string{"bytes": "bytes"},
1443 false,
1444 },
1445 {
1446 "Match exact value, unitless tag",
1447 "pid=123",
1448 map[string][]int64{"pid": {123}},
1449 nil,
1450 true,
1451 },
1452 {
1453 "Match range, unitless tag",
1454 "pid=123:123",
1455 map[string][]int64{"pid": {123}},
1456 nil,
1457 true,
1458 },
1459 {
1460 "Don't match range, unitless tag",
1461 "pid=124:124",
1462 map[string][]int64{"pid": {123}},
1463 nil,
1464 false,
1465 },
1466 {
1467 "Match range without upper bound, unitless tag",
1468 "pid=100:",
1469 map[string][]int64{"pid": {123}},
1470 nil,
1471 true,
1472 },
1473 {
1474 "Don't match range without upper bound, unitless tag",
1475 "pid=200:",
1476 map[string][]int64{"pid": {123}},
1477 nil,
1478 false,
1479 },
1480 {
1481 "Match range without lower bound, unitless tag",
1482 "pid=:200",
1483 map[string][]int64{"pid": {123}},
1484 nil,
1485 true,
1486 },
1487 {
1488 "Don't match range without lower bound, unitless tag",
1489 "pid=:100",
1490 map[string][]int64{"pid": {123}},
1491 nil,
1492 false,
1493 },
1494 }
1495 for _, test := range tagFilterTests {
1496 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().(test.desc, func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
1497 wantErrMsg := stringsscip-go gomod github.com/golang/go/src go1.24.0 strings/.Joinscip-go gomod github.com/golang/go/src go1.24.0 strings/Join().([]string{"(", test.desc, ":Interpreted '", test.value[stringsscip-go gomod github.com/golang/go/src go1.24.0 strings/.Indexscip-go gomod github.com/golang/go/src go1.24.0 strings/Index().(test.value, "=")+1:], "' as range, not regexp", ")"}, "")
1498 filter, err := compileTagFilterscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/compileTagFilter().(test.desc, test.value, test.identifiedUnits, &proftestscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/.TestUIscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/TestUI#{Tscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/TestUI#T.: t,
1499 AllowRxscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/TestUI#AllowRx.: wantErrMsg}, nil)
1500 if err != nil {
1501 t.Fatalfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Fatalf().("%v", err)
1502 }
1503 s := profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#{
1504 NumLabelscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Sample#NumLabel.: test.tags,
1505 }
1506 if got := filter(&s); got != test.want {
1507 t.Fatalfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Fatalf().("got %v, want %v", got, test.want)
1508 }
1509 })
1510 }
1511 }
1512
1513 // TestOptionsHaveHelp tests that a help message is supplied for every
1514 // selectable option.
1515 func TestOptionsHaveHelpscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/TestOptionsHaveHelp().(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
1516 for _, f := range configFieldsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/configFields. {
1517 // Check all choices if this is a group, else check f.name.
1518 names := f.choicesscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/configField#choices.
1519 if len(names) == 0 {
1520 names = []string{f.namescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/configField#name.}
1521 }
1522 for _, name := range names {
1523 if _, ok := configHelpscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/configHelp.[name]; !ok {
1524 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("missing help message for %q", name)
1525 }
1526 }
1527 }
1528 }
1529
1530 type testSymbolzMergeFetcherscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolzMergeFetcher# struct{}
1531
1532 func (testSymbolzMergeFetcherscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolzMergeFetcher#) Fetchscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolzMergeFetcher#Fetch().(s string, d, t timescip-go gomod github.com/golang/go/src go1.24.0 time/.Durationscip-go gomod github.com/golang/go/src go1.24.0 time/Duration#) (*profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#, string, error) {
1533 var p *profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#
1534 switch s {
1535 case testSourceURLscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSourceURL().(8000) + "symbolz":
1536 p = symzProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/symzProfile().()
1537 case testSourceURLscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSourceURL().(8001) + "symbolz":
1538 p = symzProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/symzProfile().()
1539 p.Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Mapping.[0].Startscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#Start. += testOffsetscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testOffset.
1540 p.Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Mapping.[0].Limitscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#Limit. += testOffsetscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testOffset.
1541 for i := range p.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Location. {
1542 p.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Location.[i].Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address. += testOffsetscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testOffset.
1543 }
1544 default:
1545 return nil, "", fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Errorfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Errorf().("unexpected source: %s", s)
1546 }
1547 return p, s, nil
1548 }
1549
1550 func TestSymbolzAfterMergescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/TestSymbolzAfterMerge().(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
1551 baseConfig := currentConfigscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/currentConfig().()
1552 defer setCurrentConfigscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/setCurrentConfig().(baseConfig)
1553
1554 f := baseFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/baseFlags().()
1555 f.argsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testFlags#args. = []string{
1556 testSourceURLscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSourceURL().(8000) + "symbolz",
1557 testSourceURLscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSourceURL().(8001) + "symbolz",
1558 }
1559
1560 o := setDefaultsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/setDefaults().(nil)
1561 o.Flagsetscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Options#Flagset. = f
1562 o.Objscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Options#Obj. = new(mockObjToolscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockObjTool#)
1563 src, cmd, err := parseFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/parseFlags().(o)
1564 if err != nil {
1565 t.Fatalfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Fatalf().("parseFlags: %v", err)
1566 }
1567
1568 if len(cmd) != 1 || cmd[0] != "proto" {
1569 t.Fatalfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Fatalf().("parseFlags returned command %v, want [proto]", cmd)
1570 }
1571
1572 o.Fetchscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Options#Fetch. = testSymbolzMergeFetcherscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolzMergeFetcher#{}
1573 o.Symscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Options#Sym. = testSymbolzSymbolizerscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/testSymbolzSymbolizer#{}
1574 p, err := fetchProfilesscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/fetchProfiles().(src, o)
1575 if err != nil {
1576 t.Fatalfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Fatalf().("fetchProfiles: %v", err)
1577 }
1578 if len(p.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Location.) != 3 {
1579 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("Got %d locations after merge, want %d", len(p.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Location.), 3)
1580 }
1581 for i, l := range p.Locationscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Location. {
1582 if len(l.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.) != 1 {
1583 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("Number of lines for symbolz %#x in iteration %d, got %d, want %d", l.Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address., i, len(l.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.), 1)
1584 continue
1585 }
1586 address := l.Addressscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Address. - l.Mappingscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Mapping..Startscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Mapping#Start.
1587 if got, want := l.Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Location#Line.[0].Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Line#Function..Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Function#Name., fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Sprintf().("%#x", address); got != want {
1588 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("symbolz %#x, got %s, want %s", address, got, want)
1589 }
1590 }
1591 }
1592
1593 func TestProfileCopierscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/TestProfileCopier().(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
1594 type testCase struct {
1595 name string
1596 prof *profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/.Profilescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#
1597 }
1598 for _, c := range []testCase{
1599 {"cpu", cpuProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/cpuProfile().()},
1600 {"heap", heapProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/heapProfile().()},
1601 {"contention", contentionProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/contentionProfile().()},
1602 {"symbolz", symzProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/symzProfile().()},
1603 {"long_name_funcs", longNameFuncsProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/longNameFuncsProfile().()},
1604 {"large", largeProfilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/largeProfile().(t)},
1605 } {
1606 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().(c.name, func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
1607 copier := makeProfileCopierscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/makeProfileCopier().(c.prof)
1608
1609 // Muck with one copy to check that fresh copies are unaffected
1610 tmp := copier.newCopyscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/profileCopier#newCopy().()
1611 tmp.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Sample. = tmp.Samplescip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#Sample.[:0]
1612
1613 // Get new copy and check it is same as the original.
1614 want := c.prof.Stringscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#String().()
1615 got := copier.newCopyscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/profileCopier#newCopy().().Stringscip-go gomod github.com/google/pprof . `github.com/google/pprof/profile`/Profile#String().()
1616 if got != want {
1617 t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("New copy is not same as original profile")
1618 diff, err := proftestscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/.Diffscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/proftest`/Diff().([]byte(want), []byte(got))
1619 if err != nil {
1620 t.Fatalfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Fatalf().("Diff: %v", err)
1621 }
1622 t.Logfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Logf().("Diff:\n%s\n", string(diff))
1623 }
1624 })
1625 }
1626 }
1627
1628 type mockObjToolscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockObjTool# struct{}
1629
1630 func (*mockObjToolscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockObjTool#) Openscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockObjTool#Open().(file string, start, limit, offset uint64, relocationSymbol string) (pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.ObjFilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/ObjFile#, error) {
1631 return &mockFilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#{file, "abcdef", 0}, nil
1632 }
1633
1634 func (m *mockObjToolscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockObjTool#) Disasmscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockObjTool#Disasm().(file string, start, end uint64, intelSyntax bool) ([]pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Instscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#, error) {
1635 const fn1 = "line1000"
1636 const fn3 = "line3000"
1637 const file1 = "testdata/file1000.src"
1638 const file3 = "testdata/file3000.src"
1639 data := []pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Instscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#{
1640 {Addrscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Addr.: 0x1000, Textscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Text.: "instruction one", Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Function.: fn1, Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#File.: file1, Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Line.: 1},
1641 {Addrscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Addr.: 0x1001, Textscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Text.: "instruction two", Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Function.: fn1, Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#File.: file1, Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Line.: 1},
1642 {Addrscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Addr.: 0x1002, Textscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Text.: "instruction three", Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Function.: fn1, Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#File.: file1, Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Line.: 2},
1643 {Addrscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Addr.: 0x1003, Textscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Text.: "instruction four", Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Function.: fn1, Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#File.: file1, Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Line.: 1},
1644 {Addrscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Addr.: 0x3000, Textscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Text.: "instruction one", Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Function.: fn3, Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#File.: file3},
1645 {Addrscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Addr.: 0x3001, Textscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Text.: "instruction two", Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Function.: fn3, Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#File.: file3},
1646 {Addrscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Addr.: 0x3002, Textscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Text.: "instruction three", Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Function.: fn3, Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#File.: file3},
1647 {Addrscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Addr.: 0x3003, Textscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Text.: "instruction four", Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Function.: fn3, Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#File.: file3},
1648 {Addrscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Addr.: 0x3004, Textscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Text.: "instruction five", Functionscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Function.: fn3, Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#File.: file3},
1649 }
1650 var result []pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Instscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#
1651 for _, inst := range data {
1652 if inst.Addrscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Addr. >= start && inst.Addrscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Inst#Addr. <= end {
1653 result = append(result, inst)
1654 }
1655 }
1656 return result, nil
1657 }
1658
1659 type mockFilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile# struct {
1660 namescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#name., buildIDscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#buildID. string
1661 basescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#base. uint64
1662 }
1663
1664 // Name returns the underlyinf file name, if available
1665 func (m *mockFilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#) Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#Name().() string {
1666 return m.namescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#name.
1667 }
1668
1669 // ObjAddr returns the objdump address corresponding to a runtime address.
1670 func (m *mockFilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#) ObjAddrscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#ObjAddr().(addr uint64) (uint64, error) {
1671 return addr - m.basescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#base., nil
1672 }
1673
1674 // BuildID returns the GNU build ID of the file, or an empty string.
1675 func (m *mockFilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#) BuildIDscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#BuildID().() string {
1676 return m.buildIDscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#buildID.
1677 }
1678
1679 // SourceLine reports the source line information for a given
1680 // address in the file. Due to inlining, the source line information
1681 // is in general a list of positions representing a call stack,
1682 // with the leaf function first.
1683 func (*mockFilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#) SourceLinescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#SourceLine().(addr uint64) ([]pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Framescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Frame#, error) {
1684 // Return enough data to support the SourceLine() calls needed for
1685 // weblist on cpuProfile() contents.
1686 frame := func(fn, file string, num int) pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Framescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Frame# {
1687 // Reuse the same num for line number and column number.
1688 return pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Framescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Frame#{Funcscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Frame#Func.: fn, Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Frame#File.: file, Linescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Frame#Line.: num, Columnscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Frame#Column.: num}
1689 }
1690 switch addr {
1691 case 0x1000:
1692 return []pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Framescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Frame#{
1693 frame("mangled1000", "testdata/file1000.src", 1),
1694 }, nil
1695 case 0x1001:
1696 return []pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Framescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Frame#{
1697 frame("mangled1000", "testdata/file1000.src", 1),
1698 }, nil
1699 case 0x1002:
1700 return []pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Framescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Frame#{
1701 frame("mangled1000", "testdata/file1000.src", 2),
1702 }, nil
1703 case 0x1003:
1704 return []pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Framescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Frame#{
1705 frame("mangled1000", "testdata/file1000.src", 1),
1706 }, nil
1707 case 0x2000:
1708 return []pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Framescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Frame#{
1709 frame("mangled2001", "testdata/file2000.src", 9),
1710 frame("mangled2000", "testdata/file2000.src", 4),
1711 }, nil
1712 case 0x3000:
1713 return []pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Framescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Frame#{
1714 frame("mangled3002", "testdata/file3000.src", 2),
1715 frame("mangled3001", "testdata/file3000.src", 5),
1716 frame("mangled3000", "testdata/file3000.src", 6),
1717 }, nil
1718 case 0x3001:
1719 return []pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Framescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Frame#{
1720 frame("mangled3001", "testdata/file3000.src", 8),
1721 frame("mangled3000", "testdata/file3000.src", 9),
1722 }, nil
1723 case 0x3002:
1724 return []pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Framescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Frame#{
1725 frame("mangled3002", "testdata/file3000.src", 5),
1726 frame("mangled3000", "testdata/file3000.src", 9),
1727 }, nil
1728 }
1729
1730 return nil, nil
1731 }
1732
1733 // Symbols returns a list of symbols in the object file.
1734 // If r is not nil, Symbols restricts the list to symbols
1735 // with names matching the regular expression.
1736 // If addr is not zero, Symbols restricts the list to symbols
1737 // containing that address.
1738 func (m *mockFilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#) Symbolsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#Symbols().(r *regexpscip-go gomod github.com/golang/go/src go1.24.0 regexp/.Regexpscip-go gomod github.com/golang/go/src go1.24.0 regexp/Regexp#, addr uint64) ([]*pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Symscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Sym#, error) {
1739 switch r.Stringscip-go gomod github.com/golang/go/src go1.24.0 regexp/Regexp#String().() {
1740 case "line[13]":
1741 return []*pluginscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/.Symscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Sym#{
1742 {
1743 Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Sym#Name.: []string{"line1000"}, Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Sym#File.: m.namescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#name.,
1744 Startscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Sym#Start.: 0x1000, Endscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Sym#End.: 0x1003,
1745 },
1746 {
1747 Namescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Sym#Name.: []string{"line3000"}, Filescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Sym#File.: m.namescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#name.,
1748 Startscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Sym#Start.: 0x3000, Endscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/plugin`/Sym#End.: 0x3004,
1749 },
1750 }, nil
1751 }
1752 return nil, fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Errorfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Errorf().("unimplemented")
1753 }
1754
1755 // Close closes the file, releasing associated resources.
1756 func (*mockFilescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#) Closescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/mockFile#Close().() error {
1757 return nil
1758 }