drd: Add support for C11 thrd_create()
[valgrind.git] / dhat / dh_test.js
blobee88e7b723257864d7044f388306de9a416dbd18
2 //--------------------------------------------------------------------*/
3 //--- DHAT: a Dynamic Heap Analysis Tool dh_test.js ---*/
4 //--------------------------------------------------------------------*/
6 /*
7 This file is part of DHAT, a Valgrind tool for profiling the
8 heap usage of programs.
10 Copyright (C) 2018 Mozilla Foundation
12 This program is free software; you can redistribute it and/or
13 modify it under the terms of the GNU General Public License as
14 published by the Free Software Foundation; either version 2 of the
15 License, or (at your option) any later version.
17 This program is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, see <http://www.gnu.org/licenses/>.
25 The GNU General Public License is contained in the file COPYING.
28 // We can't fully automate testing of a web app via the normal Valgrind
29 // regression testing. Instead we have this code, which is executed when
30 // dh_view.html is loaded with a "?test=1" parameter.
32 // Things tested by this file:
33 // - Tree building, with multiple sort metrics.
34 // - Text content of the displayed tree.
36 // Things not tested by this file:
37 // - Output from DHAT itself (unless that output is regenerated when necessary
38 // and copy-and-pasted in the "input" fields in this file).
39 // - Interactions with the "Load" button and "Sort metric" menu.
40 // - File loading and parsing.
41 // - Non-text content of the displayed tree (e.g. node colours, sortKey
42 // highlighting).
43 // - Tree interactions (collapsing and expanding of nodes).
45 "use strict";
47 // Test inputs are copied verbatim from DHAT output files, not as strings but
48 // as actual JavaScript code. This works because output files are JSON, and
49 // JSON is valid JavaScript.
51 // Expected outputs are paired with a sort metric, and copied verbatim from the
52 // DHAT viewer.
53 let tests = []
55 //---------------------------------------------------------------------------
56 // empty (corresponds to dhat/tests/empty.c)
57 //---------------------------------------------------------------------------
59 let empty = {
60 name: "empty",
61 input:
62 //---------------------------------------------------------------------------
63 {"dhatFileVersion":2
64 ,"mode":"heap","verb":"Allocated"
65 ,"bklt":true,"bkacc":true
66 ,"tu":"instrs","Mtu":"Minstr"
67 ,"tuth":500
68 ,"cmd":"./empty"
69 ,"pid":23431
70 ,"te":248602
71 ,"tg":0
72 ,"pps":
75 ,"ftbl":
76 ["[root]"
79 //---------------------------------------------------------------------------
81 outputs: [
83 label: "Total (bytes)",
84 expected:
85 //---------------------------------------------------------------------------
87 Invocation {
88 Mode: heap
89 Command: ./empty
90 PID: 23431
93 Times {
94 t-gmax: 0 instrs (0% of program duration)
95 t-end: 248,602 instrs
98 ─ PP 1/1 {
99 Total: 0 bytes (0%, 0/Minstr) in 0 blocks (0%, 0/Minstr), avg size 0 bytes, avg lifetime 0 instrs (0% of program duration)
100 At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
101 At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
102 Reads: 0 bytes (0%, 0/Minstr), 0/byte
103 Writes: 0 bytes (0%, 0/Minstr), 0/byte
104 Allocated at {
105 #0: [root]
109 PP significance threshold: total >= 0 bytes (0%)
111 //---------------------------------------------------------------------------
115 tests.push(empty);
117 //---------------------------------------------------------------------------
118 // single (corresponds to dhat/tests/single.c)
119 //---------------------------------------------------------------------------
121 let single = {
122 name: "single",
123 input:
124 //---------------------------------------------------------------------------
125 {"dhatFileVersion":2
126 ,"mode":"heap","verb":"Allocated"
127 ,"bklt":true,"bkacc":true
128 ,"tu":"instrs","Mtu":"Minstr"
129 ,"tuth":500
130 ,"cmd":"./single"
131 ,"pid":30563
132 ,"te":249824
133 ,"tg":242900
134 ,"pps":
135 [{"tb":16,"tbk":1,"tl":6924
136 ,"mb":16,"mbk":1
137 ,"gb":16,"gbk":1
138 ,"eb":16,"ebk":1
139 ,"rb":0,"wb":12
140 ,"acc":[-4,3,-12,0]
141 ,"fs":[1]
144 ,"ftbl":
145 ["[root]"
146 ,"0x10865B: main (single.cpp:4)"
149 //---------------------------------------------------------------------------
151 outputs: [
153 label: "Total (bytes)",
154 expected:
155 //---------------------------------------------------------------------------
157 Invocation {
158 Mode: heap
159 Command: ./single
160 PID: 30563
163 Times {
164 t-gmax: 242,900 instrs (97.23% of program duration)
165 t-end: 249,824 instrs
168 ─ PP 1/1 {
169 Total: 16 bytes (100%, 64.05/Minstr) in 1 blocks (100%, 4/Minstr), avg size 16 bytes, avg lifetime 6,924 instrs (2.77% of program duration)
170 At t-gmax: 16 bytes (100%) in 1 blocks (100%), avg size 16 bytes
171 At t-end: 16 bytes (100%) in 1 blocks (100%), avg size 16 bytes
172 Reads: 0 bytes (0%, 0/Minstr), 0/byte
173 Writes: 12 bytes (100%, 48.03/Minstr), 0.75/byte
174 Accesses: {
175 [ 0] 3 〃 〃 〃 - - - - - - - - - - - -
177 Allocated at {
178 #0: [root]
179 #1: 0x10865B: main (single.cpp:4)
183 PP significance threshold: total >= 0.16 bytes (1%)
185 //---------------------------------------------------------------------------
189 tests.push(single);
191 //---------------------------------------------------------------------------
192 // subseqs (a synthetic test for locations that are subsequences of other
193 // locations, which are rare but can happen in practice, esp. with recursion)
194 //---------------------------------------------------------------------------
196 let subseqs = {
197 name: "subseqs",
198 input:
199 //---------------------------------------------------------------------------
200 {"dhatFileVersion":2
201 ,"mode":"heap","verb":"Allocated"
202 ,"bklt":true,"bkacc":true
203 ,"tu":"instrs","Mtu":"Minstr"
204 ,"tuth":500
205 ,"cmd":"subseqs"
206 ,"pid":0
207 ,"te":20000
208 ,"tg":10000
209 ,"pps":
210 [{"tb":15,"tbk":1,"tl":1000
211 ,"mb":15,"mbk":1
212 ,"gb":15,"gbk":1
213 ,"eb":0,"ebk":0
214 ,"rb":0,"wb":0
215 ,"acc":[-15,0]
216 ,"fs":[1,2,3]
218 ,{"tb":14,"tbk":1,"tl":1000
219 ,"mb":14,"mbk":1
220 ,"gb":14,"gbk":1
221 ,"eb":0,"ebk":0
222 ,"rb":0,"wb":0
223 ,"acc":[-14,0]
224 ,"fs":[1,2,3,3]
226 ,{"tb":13,"tbk":1,"tl":1000
227 ,"mb":13,"mbk":1
228 ,"gb":13,"gbk":1
229 ,"eb":0,"ebk":0
230 ,"rb":0,"wb":0
231 ,"acc":[-13,0]
232 ,"fs":[1,2,3,3,3]
234 ,{"tb":12,"tbk":1,"tl":1000
235 ,"mb":12,"mbk":1
236 ,"gb":12,"gbk":1
237 ,"eb":0,"ebk":0
238 ,"rb":0,"wb":0
239 ,"acc":[-12,0]
240 ,"fs":[4,5,6,6,6]
242 ,{"tb":11,"tbk":1,"tl":1000
243 ,"mb":11,"mbk":1
244 ,"gb":11,"gbk":1
245 ,"eb":0,"ebk":0
246 ,"rb":0,"wb":0
247 ,"acc":[-11,0]
248 ,"fs":[4,5,6,6]
250 ,{"tb":10,"tbk":1,"tl":1000
251 ,"mb":10,"mbk":1
252 ,"gb":10,"gbk":1
253 ,"eb":0,"ebk":0
254 ,"rb":0,"wb":0
255 ,"acc":[-10,0]
256 ,"fs":[4,5,6]
258 ,{"tb":9,"tbk":1,"tl":1000
259 ,"mb":9,"mbk":1
260 ,"gb":9,"gbk":1
261 ,"eb":0,"ebk":0
262 ,"rb":0,"wb":0
263 ,"acc":[-9,0]
264 ,"fs":[7,8,9]
266 ,{"tb":8,"tbk":1,"tl":1000
267 ,"mb":8,"mbk":1
268 ,"gb":8,"gbk":1
269 ,"eb":0,"ebk":0
270 ,"rb":0,"wb":0
271 ,"acc":[-8,0]
272 ,"fs":[7,8,10]
274 ,{"tb":7,"tbk":1,"tl":1000
275 ,"mb":7,"mbk":1
276 ,"gb":7,"gbk":1
277 ,"eb":0,"ebk":0
278 ,"rb":0,"wb":0
279 ,"acc":[-7,0]
280 ,"fs":[7,8]
283 ,"ftbl":
284 ["[root]"
285 ,"a()"
286 ,"b()"
287 ,"c()"
288 ,"d()"
289 ,"e()"
290 ,"f()"
291 ,"g()"
292 ,"h()"
293 ,"i()"
294 ,"j()"
297 //---------------------------------------------------------------------------
299 outputs: [
301 label: "Total (bytes)",
302 expected:
303 //---------------------------------------------------------------------------
305 Invocation {
306 Mode: heap
307 Command: subseqs
308 PID: 0
311 Times {
312 t-gmax: 10,000 instrs (50% of program duration)
313 t-end: 20,000 instrs
316 ▼ PP 1/1 (3 children) {
317 Total: 99 bytes (100%, 4,950/Minstr) in 9 blocks (100%, 450/Minstr), avg size 11 bytes, avg lifetime 1,000 instrs (5% of program duration)
318 At t-gmax: 99 bytes (100%) in 9 blocks (100%), avg size 11 bytes
319 At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
320 Reads: 0 bytes (0%, 0/Minstr), 0/byte
321 Writes: 0 bytes (0%, 0/Minstr), 0/byte
322 Allocated at {
323 #0: [root]
326 ├─▼ PP 1.1/3 (2 children) {
327 │ Total: 42 bytes (42.42%, 2,100/Minstr) in 3 blocks (33.33%, 150/Minstr), avg size 14 bytes, avg lifetime 1,000 instrs (5% of program duration)
328 │ At t-gmax: 42 bytes (42.42%) in 3 blocks (33.33%), avg size 14 bytes
329 │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
330 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
331 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
332 │ Allocated at {
333 │ #1: a()
334 │ #2: b()
335 │ #3: c()
336 │ }
337 │ }
338 │ ├─▼ PP 1.1.1/2 (2 children) {
339 │ │ Total: 27 bytes (27.27%, 1,350/Minstr) in 2 blocks (22.22%, 100/Minstr), avg size 13.5 bytes, avg lifetime 1,000 instrs (5% of program duration)
340 │ │ At t-gmax: 27 bytes (27.27%) in 2 blocks (22.22%), avg size 13.5 bytes
341 │ │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
342 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
343 │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
344 │ │ Allocated at {
345 │ │ ^1: a()
346 │ │ ^2: b()
347 │ │ ^3: c()
348 │ │ #4: c()
349 │ │ }
350 │ │ }
351 │ │ ├── PP 1.1.1.1/2 {
352 │ │ │ Total: 14 bytes (14.14%, 700/Minstr) in 1 blocks (11.11%, 50/Minstr), avg size 14 bytes, avg lifetime 1,000 instrs (5% of program duration)
353 │ │ │ Max: 14 bytes in 1 blocks, avg size 14 bytes
354 │ │ │ At t-gmax: 14 bytes (14.14%) in 1 blocks (11.11%), avg size 14 bytes
355 │ │ │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
356 │ │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
357 │ │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
358 │ │ │ Accesses: {
359 │ │ │ [ 0] - - - - - - - - - - - - - -
360 │ │ │ }
361 │ │ │ Allocated at {
362 │ │ │ ^1: a()
363 │ │ │ ^2: b()
364 │ │ │ ^3: c()
365 │ │ │ ^4: c()
366 │ │ │ }
367 │ │ │ }
368 │ │ └── PP 1.1.1.2/2 {
369 │ │ Total: 13 bytes (13.13%, 650/Minstr) in 1 blocks (11.11%, 50/Minstr), avg size 13 bytes, avg lifetime 1,000 instrs (5% of program duration)
370 │ │ Max: 13 bytes in 1 blocks, avg size 13 bytes
371 │ │ At t-gmax: 13 bytes (13.13%) in 1 blocks (11.11%), avg size 13 bytes
372 │ │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
373 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
374 │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
375 │ │ Accesses: {
376 │ │ [ 0] - - - - - - - - - - - - -
377 │ │ }
378 │ │ Allocated at {
379 │ │ ^1: a()
380 │ │ ^2: b()
381 │ │ ^3: c()
382 │ │ ^4: c()
383 │ │ #5: c()
384 │ │ }
385 │ │ }
386 │ └── PP 1.1.2/2 {
387 │ Total: 15 bytes (15.15%, 750/Minstr) in 1 blocks (11.11%, 50/Minstr), avg size 15 bytes, avg lifetime 1,000 instrs (5% of program duration)
388 │ Max: 15 bytes in 1 blocks, avg size 15 bytes
389 │ At t-gmax: 15 bytes (15.15%) in 1 blocks (11.11%), avg size 15 bytes
390 │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
391 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
392 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
393 │ Accesses: {
394 │ [ 0] - - - - - - - - - - - - - - -
395 │ }
396 │ Allocated at {
397 │ ^1: a()
398 │ ^2: b()
399 │ ^3: c()
400 │ }
401 │ }
402 ├─▼ PP 1.2/3 (2 children) {
403 │ Total: 33 bytes (33.33%, 1,650/Minstr) in 3 blocks (33.33%, 150/Minstr), avg size 11 bytes, avg lifetime 1,000 instrs (5% of program duration)
404 │ At t-gmax: 33 bytes (33.33%) in 3 blocks (33.33%), avg size 11 bytes
405 │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
406 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
407 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
408 │ Allocated at {
409 │ #1: d()
410 │ #2: e()
411 │ #3: f()
412 │ }
413 │ }
414 │ ├─▼ PP 1.2.1/2 (2 children) {
415 │ │ Total: 23 bytes (23.23%, 1,150/Minstr) in 2 blocks (22.22%, 100/Minstr), avg size 11.5 bytes, avg lifetime 1,000 instrs (5% of program duration)
416 │ │ At t-gmax: 23 bytes (23.23%) in 2 blocks (22.22%), avg size 11.5 bytes
417 │ │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
418 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
419 │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
420 │ │ Allocated at {
421 │ │ ^1: d()
422 │ │ ^2: e()
423 │ │ ^3: f()
424 │ │ #4: f()
425 │ │ }
426 │ │ }
427 │ │ ├── PP 1.2.1.1/2 {
428 │ │ │ Total: 12 bytes (12.12%, 600/Minstr) in 1 blocks (11.11%, 50/Minstr), avg size 12 bytes, avg lifetime 1,000 instrs (5% of program duration)
429 │ │ │ Max: 12 bytes in 1 blocks, avg size 12 bytes
430 │ │ │ At t-gmax: 12 bytes (12.12%) in 1 blocks (11.11%), avg size 12 bytes
431 │ │ │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
432 │ │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
433 │ │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
434 │ │ │ Accesses: {
435 │ │ │ [ 0] - - - - - - - - - - - -
436 │ │ │ }
437 │ │ │ Allocated at {
438 │ │ │ ^1: d()
439 │ │ │ ^2: e()
440 │ │ │ ^3: f()
441 │ │ │ ^4: f()
442 │ │ │ #5: f()
443 │ │ │ }
444 │ │ │ }
445 │ │ └── PP 1.2.1.2/2 {
446 │ │ Total: 11 bytes (11.11%, 550/Minstr) in 1 blocks (11.11%, 50/Minstr), avg size 11 bytes, avg lifetime 1,000 instrs (5% of program duration)
447 │ │ Max: 11 bytes in 1 blocks, avg size 11 bytes
448 │ │ At t-gmax: 11 bytes (11.11%) in 1 blocks (11.11%), avg size 11 bytes
449 │ │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
450 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
451 │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
452 │ │ Accesses: {
453 │ │ [ 0] - - - - - - - - - - -
454 │ │ }
455 │ │ Allocated at {
456 │ │ ^1: d()
457 │ │ ^2: e()
458 │ │ ^3: f()
459 │ │ ^4: f()
460 │ │ }
461 │ │ }
462 │ └── PP 1.2.2/2 {
463 │ Total: 10 bytes (10.1%, 500/Minstr) in 1 blocks (11.11%, 50/Minstr), avg size 10 bytes, avg lifetime 1,000 instrs (5% of program duration)
464 │ Max: 10 bytes in 1 blocks, avg size 10 bytes
465 │ At t-gmax: 10 bytes (10.1%) in 1 blocks (11.11%), avg size 10 bytes
466 │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
467 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
468 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
469 │ Accesses: {
470 │ [ 0] - - - - - - - - - -
471 │ }
472 │ Allocated at {
473 │ ^1: d()
474 │ ^2: e()
475 │ ^3: f()
476 │ }
477 │ }
478 └─▼ PP 1.3/3 (3 children) {
479 Total: 24 bytes (24.24%, 1,200/Minstr) in 3 blocks (33.33%, 150/Minstr), avg size 8 bytes, avg lifetime 1,000 instrs (5% of program duration)
480 At t-gmax: 24 bytes (24.24%) in 3 blocks (33.33%), avg size 8 bytes
481 At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
482 Reads: 0 bytes (0%, 0/Minstr), 0/byte
483 Writes: 0 bytes (0%, 0/Minstr), 0/byte
484 Allocated at {
485 #1: g()
486 #2: h()
489 ├── PP 1.3.1/3 {
490 │ Total: 9 bytes (9.09%, 450/Minstr) in 1 blocks (11.11%, 50/Minstr), avg size 9 bytes, avg lifetime 1,000 instrs (5% of program duration)
491 │ Max: 9 bytes in 1 blocks, avg size 9 bytes
492 │ At t-gmax: 9 bytes (9.09%) in 1 blocks (11.11%), avg size 9 bytes
493 │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
494 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
495 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
496 │ Accesses: {
497 │ [ 0] - - - - - - - - -
498 │ }
499 │ Allocated at {
500 │ ^1: g()
501 │ ^2: h()
502 │ #3: i()
503 │ }
504 │ }
505 ├── PP 1.3.2/3 {
506 │ Total: 8 bytes (8.08%, 400/Minstr) in 1 blocks (11.11%, 50/Minstr), avg size 8 bytes, avg lifetime 1,000 instrs (5% of program duration)
507 │ Max: 8 bytes in 1 blocks, avg size 8 bytes
508 │ At t-gmax: 8 bytes (8.08%) in 1 blocks (11.11%), avg size 8 bytes
509 │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
510 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
511 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
512 │ Accesses: {
513 │ [ 0] - - - - - - - -
514 │ }
515 │ Allocated at {
516 │ ^1: g()
517 │ ^2: h()
518 │ #3: j()
519 │ }
520 │ }
521 └── PP 1.3.3/3 {
522 Total: 7 bytes (7.07%, 350/Minstr) in 1 blocks (11.11%, 50/Minstr), avg size 7 bytes, avg lifetime 1,000 instrs (5% of program duration)
523 Max: 7 bytes in 1 blocks, avg size 7 bytes
524 At t-gmax: 7 bytes (7.07%) in 1 blocks (11.11%), avg size 7 bytes
525 At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
526 Reads: 0 bytes (0%, 0/Minstr), 0/byte
527 Writes: 0 bytes (0%, 0/Minstr), 0/byte
528 Accesses: {
529 [ 0] - - - - - - -
531 Allocated at {
532 ^1: g()
533 ^2: h()
537 PP significance threshold: total >= 0.99 bytes (1%)
539 //---------------------------------------------------------------------------
543 tests.push(subseqs);
545 //---------------------------------------------------------------------------
546 // acc (corresponds to dhat/tests/acc.c)
547 //---------------------------------------------------------------------------
549 let acc = {
550 name: "acc",
551 input:
552 //---------------------------------------------------------------------------
553 {"dhatFileVersion":2
554 ,"mode":"heap","verb":"Allocated"
555 ,"bklt":true,"bkacc":true
556 ,"tu":"instrs","Mtu":"Minstr"
557 ,"tuth":500
558 ,"cmd":"./acc"
559 ,"pid":23513
560 ,"te":1337753
561 ,"tg":265120
562 ,"pps":
563 [{"tb":32,"tbk":1,"tl":4751
564 ,"mb":32,"mbk":1
565 ,"gb":0,"gbk":0
566 ,"eb":0,"ebk":0
567 ,"rb":0,"wb":496
568 ,"acc":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]
569 ,"fs":[1]
571 ,{"tb":20,"tbk":1,"tl":106
572 ,"mb":20,"mbk":1
573 ,"gb":0,"gbk":0
574 ,"eb":0,"ebk":0
575 ,"rb":4,"wb":48
576 ,"acc":[-4,2,-4,0,-4,1,-4,0,-4,10]
577 ,"fs":[2]
579 ,{"tb":33,"tbk":1,"tl":39
580 ,"mb":33,"mbk":1
581 ,"gb":0,"gbk":0
582 ,"eb":0,"ebk":0
583 ,"rb":0,"wb":1
584 ,"acc":[-32,0,1]
585 ,"fs":[3]
587 ,{"tb":1024,"tbk":1,"tl":15179
588 ,"mb":1024,"mbk":1
589 ,"gb":0,"gbk":0
590 ,"eb":0,"ebk":0
591 ,"rb":1024,"wb":1124
592 ,"acc":[-500,2,-100,3,-424,2]
593 ,"fs":[4]
595 ,{"tb":1025,"tbk":1,"tl":15415
596 ,"mb":1025,"mbk":1
597 ,"gb":1025,"gbk":1
598 ,"eb":0,"ebk":0
599 ,"rb":1025,"wb":1025
600 ,"fs":[5]
602 ,{"tb":100,"tbk":1,"tl":350084
603 ,"mb":100,"mbk":1
604 ,"gb":0,"gbk":0
605 ,"eb":0,"ebk":0
606 ,"rb":0,"wb":200000
607 ,"acc":[-4,50000,-96,0]
608 ,"fs":[6,7]
610 ,{"tb":100,"tbk":1,"tl":350072
611 ,"mb":100,"mbk":1
612 ,"gb":0,"gbk":0
613 ,"eb":0,"ebk":0
614 ,"rb":0,"wb":200000
615 ,"acc":[-4,50000,-96,0]
616 ,"fs":[6,8]
618 ,{"tb":100,"tbk":1,"tl":700084
619 ,"mb":100,"mbk":1
620 ,"gb":0,"gbk":0
621 ,"eb":0,"ebk":0
622 ,"rb":0,"wb":400000
623 ,"acc":[-4,65535,-96,0]
624 ,"fs":[9,10]
626 ,{"tb":100,"tbk":1,"tl":700072
627 ,"mb":100,"mbk":1
628 ,"gb":0,"gbk":0
629 ,"eb":0,"ebk":0
630 ,"rb":0,"wb":400000
631 ,"acc":[-4,65535,-96,0]
632 ,"fs":[9,11]
635 ,"ftbl":
636 ["[root]"
637 ,"0x10871F: main (acc.c:14)"
638 ,"0x108771: main (acc.c:23)"
639 ,"0x1087CB: main (acc.c:32)"
640 ,"0x1087F0: main (acc.c:37)"
641 ,"0x10886F: main (acc.c:47)"
642 ,"0x1086F1: m1 (acc.c:7)"
643 ,"0x1088C3: main (acc.c:54)"
644 ,"0x1088D1: main (acc.c:55)"
645 ,"0x10870B: m2 (acc.c:9)"
646 ,"0x108921: main (acc.c:64)"
647 ,"0x10892F: main (acc.c:65)"
650 //---------------------------------------------------------------------------
652 outputs: [
654 // All blocks are freed, which means all "At t-end" values are 0, so
655 // sorting by atTEndBytes results in no aggregate nodes, which is what we
656 // want here.
657 label: "At t-end (bytes)",
658 expected:
659 //---------------------------------------------------------------------------
661 Invocation {
662 Mode: heap
663 Command: ./acc
664 PID: 23513
667 Times {
668 t-gmax: 265,120 instrs (19.82% of program duration)
669 t-end: 1,337,753 instrs
672 ▼ PP 1/1 (7 children) {
673 Total: 2,534 bytes (100%, 1,894.22/Minstr) in 9 blocks (100%, 6.73/Minstr), avg size 281.56 bytes, avg lifetime 237,311.33 instrs (17.74% of program duration)
674 At t-gmax: 1,025 bytes (100%) in 1 blocks (100%), avg size 1,025 bytes
675 At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
676 Reads: 2,053 bytes (100%, 1,534.66/Minstr), 0.81/byte
677 Writes: 1,202,694 bytes (100%, 899,040.41/Minstr), 474.62/byte
678 Allocated at {
679 #0: [root]
682 ├── PP 1.1/7 {
683 │ Total: 1,025 bytes (40.45%, 766.21/Minstr) in 1 blocks (11.11%, 0.75/Minstr), avg size 1,025 bytes, avg lifetime 15,415 instrs (1.15% of program duration)
684 │ Max: 1,025 bytes in 1 blocks, avg size 1,025 bytes
685 │ At t-gmax: 1,025 bytes (100%) in 1 blocks (100%), avg size 1,025 bytes
686 │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
687 │ Reads: 1,025 bytes (49.93%, 766.21/Minstr), 1/byte
688 │ Writes: 1,025 bytes (0.09%, 766.21/Minstr), 1/byte
689 │ Allocated at {
690 │ #1: 0x10886F: main (acc.c:47)
691 │ }
692 │ }
693 ├── PP 1.2/7 {
694 │ Total: 1,024 bytes (40.41%, 765.46/Minstr) in 1 blocks (11.11%, 0.75/Minstr), avg size 1,024 bytes, avg lifetime 15,179 instrs (1.13% of program duration)
695 │ Max: 1,024 bytes in 1 blocks, avg size 1,024 bytes
696 │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
697 │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
698 │ Reads: 1,024 bytes (49.88%, 765.46/Minstr), 1/byte
699 │ Writes: 1,124 bytes (0.09%, 840.21/Minstr), 1.1/byte
700 │ Accesses: {
701 │ [ 0] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
702 │ [ 32] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
703 │ [ 64] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
704 │ [ 96] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
705 │ [128] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
706 │ [160] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
707 │ [192] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
708 │ [224] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
709 │ [256] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
710 │ [288] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
711 │ [320] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
712 │ [352] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
713 │ [384] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
714 │ [416] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
715 │ [448] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
716 │ [480] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 3 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
717 │ [512] 3 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
718 │ [544] 3 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
719 │ [576] 3 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 2 〃 〃 〃 〃 〃 〃 〃
720 │ [608] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
721 │ [640] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
722 │ [672] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
723 │ [704] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
724 │ [736] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
725 │ [768] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
726 │ [800] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
727 │ [832] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
728 │ [864] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
729 │ [896] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
730 │ [928] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
731 │ [960] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
732 │ [992] 2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
733 │ }
734 │ Allocated at {
735 │ #1: 0x1087F0: main (acc.c:37)
736 │ }
737 │ }
738 ├─▼ PP 1.3/7 (2 children) {
739 │ Total: 200 bytes (7.89%, 149.5/Minstr) in 2 blocks (22.22%, 1.5/Minstr), avg size 100 bytes, avg lifetime 350,078 instrs (26.17% of program duration)
740 │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
741 │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
742 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
743 │ Writes: 400,000 bytes (33.26%, 299,008.86/Minstr), 2,000/byte
744 │ Accesses: {
745 │ [ 0] 100000 〃 〃 〃 - - - - - - - - - - - - - - - - - - - - - - - - - - - -
746 │ [ 32] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
747 │ [ 64] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
748 │ [ 96] - - - -
749 │ }
750 │ Allocated at {
751 │ #1: 0x1086F1: m1 (acc.c:7)
752 │ }
753 │ }
754 │ ├── PP 1.3.1/2 {
755 │ │ Total: 100 bytes (3.95%, 74.75/Minstr) in 1 blocks (11.11%, 0.75/Minstr), avg size 100 bytes, avg lifetime 350,084 instrs (26.17% of program duration)
756 │ │ Max: 100 bytes in 1 blocks, avg size 100 bytes
757 │ │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
758 │ │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
759 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
760 │ │ Writes: 200,000 bytes (16.63%, 149,504.43/Minstr), 2,000/byte
761 │ │ Accesses: {
762 │ │ [ 0] 50000 〃 〃 〃 - - - - - - - - - - - - - - - - - - - - - - - - - - - -
763 │ │ [ 32] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
764 │ │ [ 64] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
765 │ │ [ 96] - - - -
766 │ │ }
767 │ │ Allocated at {
768 │ │ ^1: 0x1086F1: m1 (acc.c:7)
769 │ │ #2: 0x1088C3: main (acc.c:54)
770 │ │ }
771 │ │ }
772 │ └── PP 1.3.2/2 {
773 │ Total: 100 bytes (3.95%, 74.75/Minstr) in 1 blocks (11.11%, 0.75/Minstr), avg size 100 bytes, avg lifetime 350,072 instrs (26.17% of program duration)
774 │ Max: 100 bytes in 1 blocks, avg size 100 bytes
775 │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
776 │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
777 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
778 │ Writes: 200,000 bytes (16.63%, 149,504.43/Minstr), 2,000/byte
779 │ Accesses: {
780 │ [ 0] 50000 〃 〃 〃 - - - - - - - - - - - - - - - - - - - - - - - - - - - -
781 │ [ 32] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
782 │ [ 64] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
783 │ [ 96] - - - -
784 │ }
785 │ Allocated at {
786 │ ^1: 0x1086F1: m1 (acc.c:7)
787 │ #2: 0x1088D1: main (acc.c:55)
788 │ }
789 │ }
790 ├─▼ PP 1.4/7 (2 children) {
791 │ Total: 200 bytes (7.89%, 149.5/Minstr) in 2 blocks (22.22%, 1.5/Minstr), avg size 100 bytes, avg lifetime 700,078 instrs (52.33% of program duration)
792 │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
793 │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
794 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
795 │ Writes: 800,000 bytes (66.52%, 598,017.72/Minstr), 4,000/byte
796 │ Accesses: {
797 │ [ 0] ∞ 〃 〃 〃 - - - - - - - - - - - - - - - - - - - - - - - - - - - -
798 │ [ 32] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
799 │ [ 64] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
800 │ [ 96] - - - -
801 │ }
802 │ Allocated at {
803 │ #1: 0x10870B: m2 (acc.c:9)
804 │ }
805 │ }
806 │ ├── PP 1.4.1/2 {
807 │ │ Total: 100 bytes (3.95%, 74.75/Minstr) in 1 blocks (11.11%, 0.75/Minstr), avg size 100 bytes, avg lifetime 700,084 instrs (52.33% of program duration)
808 │ │ Max: 100 bytes in 1 blocks, avg size 100 bytes
809 │ │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
810 │ │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
811 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
812 │ │ Writes: 400,000 bytes (33.26%, 299,008.86/Minstr), 4,000/byte
813 │ │ Accesses: {
814 │ │ [ 0] ∞ 〃 〃 〃 - - - - - - - - - - - - - - - - - - - - - - - - - - - -
815 │ │ [ 32] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
816 │ │ [ 64] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
817 │ │ [ 96] - - - -
818 │ │ }
819 │ │ Allocated at {
820 │ │ ^1: 0x10870B: m2 (acc.c:9)
821 │ │ #2: 0x108921: main (acc.c:64)
822 │ │ }
823 │ │ }
824 │ └── PP 1.4.2/2 {
825 │ Total: 100 bytes (3.95%, 74.75/Minstr) in 1 blocks (11.11%, 0.75/Minstr), avg size 100 bytes, avg lifetime 700,072 instrs (52.33% of program duration)
826 │ Max: 100 bytes in 1 blocks, avg size 100 bytes
827 │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
828 │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
829 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
830 │ Writes: 400,000 bytes (33.26%, 299,008.86/Minstr), 4,000/byte
831 │ Accesses: {
832 │ [ 0] ∞ 〃 〃 〃 - - - - - - - - - - - - - - - - - - - - - - - - - - - -
833 │ [ 32] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
834 │ [ 64] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
835 │ [ 96] - - - -
836 │ }
837 │ Allocated at {
838 │ ^1: 0x10870B: m2 (acc.c:9)
839 │ #2: 0x10892F: main (acc.c:65)
840 │ }
841 │ }
842 ├── PP 1.5/7 {
843 │ Total: 33 bytes (1.3%, 24.67/Minstr) in 1 blocks (11.11%, 0.75/Minstr), avg size 33 bytes, avg lifetime 39 instrs (0% of program duration)
844 │ Max: 33 bytes in 1 blocks, avg size 33 bytes
845 │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
846 │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
847 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
848 │ Writes: 1 bytes (0%, 0.75/Minstr), 0.03/byte
849 │ Accesses: {
850 │ [ 0] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
851 │ [ 32] 1
852 │ }
853 │ Allocated at {
854 │ #1: 0x1087CB: main (acc.c:32)
855 │ }
856 │ }
857 ├── PP 1.6/7 {
858 │ Total: 32 bytes (1.26%, 23.92/Minstr) in 1 blocks (11.11%, 0.75/Minstr), avg size 32 bytes, avg lifetime 4,751 instrs (0.36% of program duration)
859 │ Max: 32 bytes in 1 blocks, avg size 32 bytes
860 │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
861 │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
862 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
863 │ Writes: 496 bytes (0.04%, 370.77/Minstr), 15.5/byte
864 │ Accesses: {
865 │ [ 0] - 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
866 │ }
867 │ Allocated at {
868 │ #1: 0x10871F: main (acc.c:14)
869 │ }
870 │ }
871 └── PP 1.7/7 {
872 Total: 20 bytes (0.79%, 14.95/Minstr) in 1 blocks (11.11%, 0.75/Minstr), avg size 20 bytes, avg lifetime 106 instrs (0.01% of program duration)
873 Max: 20 bytes in 1 blocks, avg size 20 bytes
874 At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
875 At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
876 Reads: 4 bytes (0.19%, 2.99/Minstr), 0.2/byte
877 Writes: 48 bytes (0%, 35.88/Minstr), 2.4/byte
878 Accesses: {
879 [ 0] 2 〃 〃 〃 - - - - 1 〃 〃 〃 - - - - 10 〃 〃 〃
881 Allocated at {
882 #1: 0x108771: main (acc.c:23)
886 PP significance threshold: at-t-end >= 0 bytes (0%)
888 //---------------------------------------------------------------------------
892 tests.push(acc);
894 //---------------------------------------------------------------------------
895 // big (corresponds to dhat/tests/big.c)
896 //---------------------------------------------------------------------------
898 let big = {
899 name: "big",
900 input:
901 //---------------------------------------------------------------------------
902 {"dhatFileVersion":2
903 ,"mode":"heap","verb":"Allocated"
904 ,"bklt":true,"bkacc":true
905 ,"tu":"instrs","Mtu":"Minstr"
906 ,"tuth":500
907 ,"cmd":"./big"
908 ,"pid":3902
909 ,"te":253354
910 ,"tg":245281
911 ,"pps":
912 [{"tb":706,"tbk":1,"tl":543
913 ,"mb":706,"mbk":1
914 ,"gb":706,"gbk":1
915 ,"eb":0,"ebk":0
916 ,"rb":0,"wb":0
917 ,"acc":[-706,0]
918 ,"fs":[1,2,3,4,5]
920 ,{"tb":5,"tbk":1,"tl":7972
921 ,"mb":5,"mbk":1
922 ,"gb":0,"gbk":0
923 ,"eb":5,"ebk":1
924 ,"rb":0,"wb":0
925 ,"acc":[-5,0]
926 ,"fs":[1,2,3,6,7]
928 ,{"tb":30,"tbk":1,"tl":7910
929 ,"mb":30,"mbk":1
930 ,"gb":0,"gbk":0
931 ,"eb":30,"ebk":1
932 ,"rb":0,"wb":0
933 ,"acc":[-30,0]
934 ,"fs":[1,2,8,9]
936 ,{"tb":20,"tbk":1,"tl":7857
937 ,"mb":20,"mbk":1
938 ,"gb":0,"gbk":0
939 ,"eb":20,"ebk":1
940 ,"rb":0,"wb":0
941 ,"acc":[-20,0]
942 ,"fs":[1,10,11]
944 ,{"tb":10,"tbk":1,"tl":7792
945 ,"mb":10,"mbk":1
946 ,"gb":0,"gbk":0
947 ,"eb":10,"ebk":1
948 ,"rb":0,"wb":0
949 ,"acc":[-10,0]
950 ,"fs":[1,12,13,14,15]
952 ,{"tb":60,"tbk":1,"tl":7709
953 ,"mb":60,"mbk":1
954 ,"gb":0,"gbk":0
955 ,"eb":60,"ebk":1
956 ,"rb":0,"wb":0
957 ,"acc":[-60,0]
958 ,"fs":[16,17,18,19,20,21,22]
960 ,{"tb":30,"tbk":1,"tl":7622
961 ,"mb":30,"mbk":1
962 ,"gb":0,"gbk":0
963 ,"eb":30,"ebk":1
964 ,"rb":0,"wb":0
965 ,"acc":[-30,0]
966 ,"fs":[16,17,18,23,24,25,26]
968 ,{"tb":20,"tbk":1,"tl":7528
969 ,"mb":20,"mbk":1
970 ,"gb":0,"gbk":0
971 ,"eb":20,"ebk":1
972 ,"rb":0,"wb":0
973 ,"acc":[-20,0]
974 ,"fs":[16,17,18,23,24,27,28,29]
976 ,{"tb":7,"tbk":1,"tl":7446
977 ,"mb":7,"mbk":1
978 ,"gb":0,"gbk":0
979 ,"eb":7,"ebk":1
980 ,"rb":0,"wb":0
981 ,"acc":[-7,0]
982 ,"fs":[16,17,18,30,31,32]
984 ,{"tb":3,"tbk":1,"tl":7375
985 ,"mb":3,"mbk":1
986 ,"gb":0,"gbk":0
987 ,"eb":3,"ebk":1
988 ,"rb":0,"wb":0
989 ,"acc":[-3,0]
990 ,"fs":[16,17,18,33,34]
992 ,{"tb":30,"tbk":1,"tl":7299
993 ,"mb":30,"mbk":1
994 ,"gb":0,"gbk":0
995 ,"eb":30,"ebk":1
996 ,"rb":0,"wb":0
997 ,"acc":[-30,0]
998 ,"fs":[35,36,37,38,39,40]
1000 ,{"tb":20,"tbk":1,"tl":7249
1001 ,"mb":20,"mbk":1
1002 ,"gb":0,"gbk":0
1003 ,"eb":20,"ebk":1
1004 ,"rb":0,"wb":0
1005 ,"acc":[-20,0]
1006 ,"fs":[41,42]
1008 ,{"tb":19,"tbk":1,"tl":7207
1009 ,"mb":19,"mbk":1
1010 ,"gb":0,"gbk":0
1011 ,"eb":19,"ebk":1
1012 ,"rb":0,"wb":0
1013 ,"acc":[-19,0]
1014 ,"fs":[43,44]
1016 ,{"tb":9,"tbk":1,"tl":7158
1017 ,"mb":9,"mbk":1
1018 ,"gb":0,"gbk":0
1019 ,"eb":9,"ebk":1
1020 ,"rb":0,"wb":0
1021 ,"acc":[-9,0]
1022 ,"fs":[45,46,47]
1024 ,{"tb":8,"tbk":1,"tl":7107
1025 ,"mb":8,"mbk":1
1026 ,"gb":0,"gbk":0
1027 ,"eb":8,"ebk":1
1028 ,"rb":0,"wb":0
1029 ,"acc":[-8,0]
1030 ,"fs":[45,48,49]
1032 ,{"tb":7,"tbk":1,"tl":7056
1033 ,"mb":7,"mbk":1
1034 ,"gb":0,"gbk":0
1035 ,"eb":7,"ebk":1
1036 ,"rb":0,"wb":0
1037 ,"acc":[-7,0]
1038 ,"fs":[45,50,51]
1040 ,{"tb":5,"tbk":1,"tl":7005
1041 ,"mb":5,"mbk":1
1042 ,"gb":0,"gbk":0
1043 ,"eb":5,"ebk":1
1044 ,"rb":0,"wb":0
1045 ,"acc":[-5,0]
1046 ,"fs":[45,52,53]
1048 ,{"tb":1,"tbk":1,"tl":6954
1049 ,"mb":1,"mbk":1
1050 ,"gb":0,"gbk":0
1051 ,"eb":1,"ebk":1
1052 ,"rb":0,"wb":0
1053 ,"acc":[0]
1054 ,"fs":[45,52,54]
1056 ,{"tb":10,"tbk":1,"tl":6917
1057 ,"mb":10,"mbk":1
1058 ,"gb":0,"gbk":0
1059 ,"eb":10,"ebk":1
1060 ,"rb":0,"wb":0
1061 ,"acc":[-10,0]
1062 ,"fs":[55]
1065 ,"ftbl":
1066 ["[root]"
1067 ,"0x1086A1: a (big.c:10)"
1068 ,"0x1086BB: b1 (big.c:11)"
1069 ,"0x1086D5: c1 (big.c:12)"
1070 ,"0x1086EF: d1 (big.c:13)"
1071 ,"0x108A43: main (big.c:38)"
1072 ,"0x108709: d2 (big.c:14)"
1073 ,"0x108A5D: main (big.c:41)"
1074 ,"0x108723: c2 (big.c:15)"
1075 ,"0x108A67: main (big.c:42)"
1076 ,"0x10873D: b2 (big.c:16)"
1077 ,"0x108A71: main (big.c:43)"
1078 ,"0x108757: b3 (big.c:17)"
1079 ,"0x108771: e (big.c:17)"
1080 ,"0x10878B: f (big.c:17)"
1081 ,"0x108A7B: main (big.c:44)"
1082 ,"0x1087A5: g (big.c:18)"
1083 ,"0x1087BF: h (big.c:18)"
1084 ,"0x1087D9: i (big.c:18)"
1085 ,"0x1087F3: j2 (big.c:19)"
1086 ,"0x10880D: k (big.c:19)"
1087 ,"0x108827: l (big.c:19)"
1088 ,"0x108A85: main (big.c:45)"
1089 ,"0x108841: j3 (big.c:20)"
1090 ,"0x10885B: m (big.c:20)"
1091 ,"0x108875: n1 (big.c:21)"
1092 ,"0x108A8F: main (big.c:46)"
1093 ,"0x10888F: n2 (big.c:22)"
1094 ,"0x1088A9: o (big.c:22)"
1095 ,"0x108A99: main (big.c:47)"
1096 ,"0x1088C3: p (big.c:23)"
1097 ,"0x1088DD: q (big.c:23)"
1098 ,"0x108AA3: main (big.c:48)"
1099 ,"0x1088F7: r (big.c:24)"
1100 ,"0x108AAD: main (big.c:49)"
1101 ,"0x108911: s1 (big.c:25)"
1102 ,"0x10892B: s2 (big.c:25)"
1103 ,"0x108945: s3 (big.c:25)"
1104 ,"0x10895F: s4 (big.c:25)"
1105 ,"0x108979: s5 (big.c:25)"
1106 ,"0x108AB7: main (big.c:50)"
1107 ,"0x108993: t (big.c:26)"
1108 ,"0x108AC1: main (big.c:51)"
1109 ,"0x1089AD: u (big.c:27)"
1110 ,"0x108ACB: main (big.c:52)"
1111 ,"0x1089C7: v (big.c:28)"
1112 ,"0x1089E1: w (big.c:29)"
1113 ,"0x108AD5: main (big.c:53)"
1114 ,"0x1089FB: x (big.c:30)"
1115 ,"0x108ADF: main (big.c:54)"
1116 ,"0x108A15: y (big.c:31)"
1117 ,"0x108AE9: main (big.c:55)"
1118 ,"0x108A2F: z (big.c:32)"
1119 ,"0x108AF3: main (big.c:56)"
1120 ,"0x108AFD: main (big.c:57)"
1121 ,"0x108B07: main (big.c:60)"
1124 //---------------------------------------------------------------------------
1126 outputs: [
1128 label: "Total (bytes)",
1129 expected:
1130 //---------------------------------------------------------------------------
1132 Invocation {
1133 Mode: heap
1134 Command: ./big
1135 PID: 3902
1138 Times {
1139 t-gmax: 245,281 instrs (96.81% of program duration)
1140 t-end: 253,354 instrs
1143 ▼ PP 1/1 (7 children) {
1144 Total: 1,000 bytes (100%, 3,947.05/Minstr) in 19 blocks (100%, 74.99/Minstr), avg size 52.63 bytes, avg lifetime 7,037.16 instrs (2.78% of program duration)
1145 At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1146 At t-end: 294 bytes (100%) in 18 blocks (100%), avg size 16.33 bytes
1147 Reads: 0 bytes (0%, 0/Minstr), 0/byte
1148 Writes: 0 bytes (0%, 0/Minstr), 0/byte
1149 Allocated at {
1150 #0: [root]
1153 ├─▼ PP 1.1/7 (3 children) {
1154 │ Total: 771 bytes (77.1%, 3,043.17/Minstr) in 5 blocks (26.32%, 19.74/Minstr), avg size 154.2 bytes, avg lifetime 6,414.8 instrs (2.53% of program duration)
1155 │ At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1156 │ At t-end: 65 bytes (22.11%) in 4 blocks (22.22%), avg size 16.25 bytes
1157 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1158 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1159 │ Allocated at {
1160 │ #1: 0x1086A1: a (big.c:10)
1161 │ }
1162 │ }
1163 │ ├─▼ PP 1.1.1/3 (2 children) {
1164 │ │ Total: 741 bytes (74.1%, 2,924.76/Minstr) in 3 blocks (15.79%, 11.84/Minstr), avg size 247 bytes, avg lifetime 5,475 instrs (2.16% of program duration)
1165 │ │ At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1166 │ │ At t-end: 35 bytes (11.9%) in 2 blocks (11.11%), avg size 17.5 bytes
1167 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1168 │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1169 │ │ Allocated at {
1170 │ │ ^1: 0x1086A1: a (big.c:10)
1171 │ │ #2: 0x1086BB: b1 (big.c:11)
1172 │ │ }
1173 │ │ }
1174 │ │ ├─▼ PP 1.1.1.1/2 (2 children) {
1175 │ │ │ Total: 711 bytes (71.1%, 2,806.35/Minstr) in 2 blocks (10.53%, 7.89/Minstr), avg size 355.5 bytes, avg lifetime 4,257.5 instrs (1.68% of program duration)
1176 │ │ │ At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1177 │ │ │ At t-end: 5 bytes (1.7%) in 1 blocks (5.56%), avg size 5 bytes
1178 │ │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1179 │ │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1180 │ │ │ Allocated at {
1181 │ │ │ ^1: 0x1086A1: a (big.c:10)
1182 │ │ │ ^2: 0x1086BB: b1 (big.c:11)
1183 │ │ │ #3: 0x1086D5: c1 (big.c:12)
1184 │ │ │ }
1185 │ │ │ }
1186 │ │ │ ├── PP 1.1.1.1.1/2 {
1187 │ │ │ │ Total: 706 bytes (70.6%, 2,786.61/Minstr) in 1 blocks (5.26%, 3.95/Minstr), avg size 706 bytes, avg lifetime 543 instrs (0.21% of program duration)
1188 │ │ │ │ Max: 706 bytes in 1 blocks, avg size 706 bytes
1189 │ │ │ │ At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1190 │ │ │ │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1191 │ │ │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1192 │ │ │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1193 │ │ │ │ Accesses: {
1194 │ │ │ │ [ 0] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1195 │ │ │ │ [ 32] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1196 │ │ │ │ [ 64] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1197 │ │ │ │ [ 96] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1198 │ │ │ │ [128] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1199 │ │ │ │ [160] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1200 │ │ │ │ [192] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1201 │ │ │ │ [224] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1202 │ │ │ │ [256] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1203 │ │ │ │ [288] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1204 │ │ │ │ [320] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1205 │ │ │ │ [352] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1206 │ │ │ │ [384] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1207 │ │ │ │ [416] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1208 │ │ │ │ [448] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1209 │ │ │ │ [480] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1210 │ │ │ │ [512] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1211 │ │ │ │ [544] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1212 │ │ │ │ [576] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1213 │ │ │ │ [608] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1214 │ │ │ │ [640] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1215 │ │ │ │ [672] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1216 │ │ │ │ [704] - -
1217 │ │ │ │ }
1218 │ │ │ │ Allocated at {
1219 │ │ │ │ ^1: 0x1086A1: a (big.c:10)
1220 │ │ │ │ ^2: 0x1086BB: b1 (big.c:11)
1221 │ │ │ │ ^3: 0x1086D5: c1 (big.c:12)
1222 │ │ │ │ #4: 0x1086EF: d1 (big.c:13)
1223 │ │ │ │ #5: 0x108A43: main (big.c:38)
1224 │ │ │ │ }
1225 │ │ │ │ }
1226 │ │ │ └── PP 1.1.1.1.2/2 {
1227 │ │ │ Total: 5 bytes (0.5%, 19.74/Minstr)
1228 │ │ │ Allocated at {
1229 │ │ │ [1 insignificant]
1230 │ │ │ }
1231 │ │ │ }
1232 │ │ └── PP 1.1.1.2/2 {
1233 │ │ Total: 30 bytes (3%, 118.41/Minstr) in 1 blocks (5.26%, 3.95/Minstr), avg size 30 bytes, avg lifetime 7,910 instrs (3.12% of program duration)
1234 │ │ Max: 30 bytes in 1 blocks, avg size 30 bytes
1235 │ │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1236 │ │ At t-end: 30 bytes (10.2%) in 1 blocks (5.56%), avg size 30 bytes
1237 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1238 │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1239 │ │ Accesses: {
1240 │ │ [ 0] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1241 │ │ }
1242 │ │ Allocated at {
1243 │ │ ^1: 0x1086A1: a (big.c:10)
1244 │ │ ^2: 0x1086BB: b1 (big.c:11)
1245 │ │ #3: 0x108723: c2 (big.c:15)
1246 │ │ #4: 0x108A67: main (big.c:42)
1247 │ │ }
1248 │ │ }
1249 │ ├── PP 1.1.2/3 {
1250 │ │ Total: 20 bytes (2%, 78.94/Minstr) in 1 blocks (5.26%, 3.95/Minstr), avg size 20 bytes, avg lifetime 7,857 instrs (3.1% of program duration)
1251 │ │ Max: 20 bytes in 1 blocks, avg size 20 bytes
1252 │ │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1253 │ │ At t-end: 20 bytes (6.8%) in 1 blocks (5.56%), avg size 20 bytes
1254 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1255 │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1256 │ │ Accesses: {
1257 │ │ [ 0] - - - - - - - - - - - - - - - - - - - -
1258 │ │ }
1259 │ │ Allocated at {
1260 │ │ ^1: 0x1086A1: a (big.c:10)
1261 │ │ #2: 0x10873D: b2 (big.c:16)
1262 │ │ #3: 0x108A71: main (big.c:43)
1263 │ │ }
1264 │ │ }
1265 │ └── PP 1.1.3/3 {
1266 │ Total: 10 bytes (1%, 39.47/Minstr) in 1 blocks (5.26%, 3.95/Minstr), avg size 10 bytes, avg lifetime 7,792 instrs (3.08% of program duration)
1267 │ Max: 10 bytes in 1 blocks, avg size 10 bytes
1268 │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1269 │ At t-end: 10 bytes (3.4%) in 1 blocks (5.56%), avg size 10 bytes
1270 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1271 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1272 │ Accesses: {
1273 │ [ 0] - - - - - - - - - -
1274 │ }
1275 │ Allocated at {
1276 │ ^1: 0x1086A1: a (big.c:10)
1277 │ #2: 0x108757: b3 (big.c:17)
1278 │ #3: 0x108771: e (big.c:17)
1279 │ #4: 0x10878B: f (big.c:17)
1280 │ #5: 0x108A7B: main (big.c:44)
1281 │ }
1282 │ }
1283 ├─▼ PP 1.2/7 (3 children) {
1284 │ Total: 120 bytes (12%, 473.65/Minstr) in 5 blocks (26.32%, 19.74/Minstr), avg size 24 bytes, avg lifetime 7,536 instrs (2.97% of program duration)
1285 │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1286 │ At t-end: 120 bytes (40.82%) in 5 blocks (27.78%), avg size 24 bytes
1287 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1288 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1289 │ Allocated at {
1290 │ #1: 0x1087A5: g (big.c:18)
1291 │ #2: 0x1087BF: h (big.c:18)
1292 │ #3: 0x1087D9: i (big.c:18)
1293 │ }
1294 │ }
1295 │ ├── PP 1.2.1/3 {
1296 │ │ Total: 60 bytes (6%, 236.82/Minstr) in 1 blocks (5.26%, 3.95/Minstr), avg size 60 bytes, avg lifetime 7,709 instrs (3.04% of program duration)
1297 │ │ Max: 60 bytes in 1 blocks, avg size 60 bytes
1298 │ │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1299 │ │ At t-end: 60 bytes (20.41%) in 1 blocks (5.56%), avg size 60 bytes
1300 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1301 │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1302 │ │ Accesses: {
1303 │ │ [ 0] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1304 │ │ [ 32] - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1305 │ │ }
1306 │ │ Allocated at {
1307 │ │ ^1: 0x1087A5: g (big.c:18)
1308 │ │ ^2: 0x1087BF: h (big.c:18)
1309 │ │ ^3: 0x1087D9: i (big.c:18)
1310 │ │ #4: 0x1087F3: j2 (big.c:19)
1311 │ │ #5: 0x10880D: k (big.c:19)
1312 │ │ #6: 0x108827: l (big.c:19)
1313 │ │ #7: 0x108A85: main (big.c:45)
1314 │ │ }
1315 │ │ }
1316 │ ├─▼ PP 1.2.2/3 (2 children) {
1317 │ │ Total: 50 bytes (5%, 197.35/Minstr) in 2 blocks (10.53%, 7.89/Minstr), avg size 25 bytes, avg lifetime 7,575 instrs (2.99% of program duration)
1318 │ │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1319 │ │ At t-end: 50 bytes (17.01%) in 2 blocks (11.11%), avg size 25 bytes
1320 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1321 │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1322 │ │ Allocated at {
1323 │ │ ^1: 0x1087A5: g (big.c:18)
1324 │ │ ^2: 0x1087BF: h (big.c:18)
1325 │ │ ^3: 0x1087D9: i (big.c:18)
1326 │ │ #4: 0x108841: j3 (big.c:20)
1327 │ │ #5: 0x10885B: m (big.c:20)
1328 │ │ }
1329 │ │ }
1330 │ │ ├── PP 1.2.2.1/2 {
1331 │ │ │ Total: 30 bytes (3%, 118.41/Minstr) in 1 blocks (5.26%, 3.95/Minstr), avg size 30 bytes, avg lifetime 7,622 instrs (3.01% of program duration)
1332 │ │ │ Max: 30 bytes in 1 blocks, avg size 30 bytes
1333 │ │ │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1334 │ │ │ At t-end: 30 bytes (10.2%) in 1 blocks (5.56%), avg size 30 bytes
1335 │ │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1336 │ │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1337 │ │ │ Accesses: {
1338 │ │ │ [ 0] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1339 │ │ │ }
1340 │ │ │ Allocated at {
1341 │ │ │ ^1: 0x1087A5: g (big.c:18)
1342 │ │ │ ^2: 0x1087BF: h (big.c:18)
1343 │ │ │ ^3: 0x1087D9: i (big.c:18)
1344 │ │ │ ^4: 0x108841: j3 (big.c:20)
1345 │ │ │ ^5: 0x10885B: m (big.c:20)
1346 │ │ │ #6: 0x108875: n1 (big.c:21)
1347 │ │ │ #7: 0x108A8F: main (big.c:46)
1348 │ │ │ }
1349 │ │ │ }
1350 │ │ └── PP 1.2.2.2/2 {
1351 │ │ Total: 20 bytes (2%, 78.94/Minstr) in 1 blocks (5.26%, 3.95/Minstr), avg size 20 bytes, avg lifetime 7,528 instrs (2.97% of program duration)
1352 │ │ Max: 20 bytes in 1 blocks, avg size 20 bytes
1353 │ │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1354 │ │ At t-end: 20 bytes (6.8%) in 1 blocks (5.56%), avg size 20 bytes
1355 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1356 │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1357 │ │ Accesses: {
1358 │ │ [ 0] - - - - - - - - - - - - - - - - - - - -
1359 │ │ }
1360 │ │ Allocated at {
1361 │ │ ^1: 0x1087A5: g (big.c:18)
1362 │ │ ^2: 0x1087BF: h (big.c:18)
1363 │ │ ^3: 0x1087D9: i (big.c:18)
1364 │ │ ^4: 0x108841: j3 (big.c:20)
1365 │ │ ^5: 0x10885B: m (big.c:20)
1366 │ │ #6: 0x10888F: n2 (big.c:22)
1367 │ │ #7: 0x1088A9: o (big.c:22)
1368 │ │ #8: 0x108A99: main (big.c:47)
1369 │ │ }
1370 │ │ }
1371 │ └── PP 1.2.3/3 {
1372 │ Total: 10 bytes (1%, 39.47/Minstr)
1373 │ Allocated at {
1374 │ [2 insignificant]
1375 │ }
1376 │ }
1377 ├── PP 1.3/7 {
1378 │ Total: 30 bytes (3%, 118.41/Minstr) in 1 blocks (5.26%, 3.95/Minstr), avg size 30 bytes, avg lifetime 7,299 instrs (2.88% of program duration)
1379 │ Max: 30 bytes in 1 blocks, avg size 30 bytes
1380 │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1381 │ At t-end: 30 bytes (10.2%) in 1 blocks (5.56%), avg size 30 bytes
1382 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1383 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1384 │ Accesses: {
1385 │ [ 0] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1386 │ }
1387 │ Allocated at {
1388 │ #1: 0x108911: s1 (big.c:25)
1389 │ #2: 0x10892B: s2 (big.c:25)
1390 │ #3: 0x108945: s3 (big.c:25)
1391 │ #4: 0x10895F: s4 (big.c:25)
1392 │ #5: 0x108979: s5 (big.c:25)
1393 │ #6: 0x108AB7: main (big.c:50)
1394 │ }
1395 │ }
1396 ├─▼ PP 1.4/7 (1 children) {
1397 │ Total: 30 bytes (3%, 118.41/Minstr) in 5 blocks (26.32%, 19.74/Minstr), avg size 6 bytes, avg lifetime 7,056 instrs (2.79% of program duration)
1398 │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1399 │ At t-end: 30 bytes (10.2%) in 5 blocks (27.78%), avg size 6 bytes
1400 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1401 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1402 │ Allocated at {
1403 │ #1: 0x1089C7: v (big.c:28)
1404 │ }
1405 │ }
1406 │ └── PP 1.4.1/1 {
1407 │ Total: 30 bytes (3%, 118.41/Minstr)
1408 │ Allocated at {
1409 │ [4 insignificant]
1410 │ }
1411 │ }
1412 ├── PP 1.5/7 {
1413 │ Total: 20 bytes (2%, 78.94/Minstr) in 1 blocks (5.26%, 3.95/Minstr), avg size 20 bytes, avg lifetime 7,249 instrs (2.86% of program duration)
1414 │ Max: 20 bytes in 1 blocks, avg size 20 bytes
1415 │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1416 │ At t-end: 20 bytes (6.8%) in 1 blocks (5.56%), avg size 20 bytes
1417 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1418 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1419 │ Accesses: {
1420 │ [ 0] - - - - - - - - - - - - - - - - - - - -
1421 │ }
1422 │ Allocated at {
1423 │ #1: 0x108993: t (big.c:26)
1424 │ #2: 0x108AC1: main (big.c:51)
1425 │ }
1426 │ }
1427 ├── PP 1.6/7 {
1428 │ Total: 19 bytes (1.9%, 74.99/Minstr) in 1 blocks (5.26%, 3.95/Minstr), avg size 19 bytes, avg lifetime 7,207 instrs (2.84% of program duration)
1429 │ Max: 19 bytes in 1 blocks, avg size 19 bytes
1430 │ At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1431 │ At t-end: 19 bytes (6.46%) in 1 blocks (5.56%), avg size 19 bytes
1432 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1433 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1434 │ Accesses: {
1435 │ [ 0] - - - - - - - - - - - - - - - - - - -
1436 │ }
1437 │ Allocated at {
1438 │ #1: 0x1089AD: u (big.c:27)
1439 │ #2: 0x108ACB: main (big.c:52)
1440 │ }
1441 │ }
1442 └── PP 1.7/7 {
1443 Total: 10 bytes (1%, 39.47/Minstr) in 1 blocks (5.26%, 3.95/Minstr), avg size 10 bytes, avg lifetime 6,917 instrs (2.73% of program duration)
1444 Max: 10 bytes in 1 blocks, avg size 10 bytes
1445 At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1446 At t-end: 10 bytes (3.4%) in 1 blocks (5.56%), avg size 10 bytes
1447 Reads: 0 bytes (0%, 0/Minstr), 0/byte
1448 Writes: 0 bytes (0%, 0/Minstr), 0/byte
1449 Accesses: {
1450 [ 0] - - - - - - - - - -
1452 Allocated at {
1453 #1: 0x108B07: main (big.c:60)
1457 PP significance threshold: total >= 10 bytes (1%)
1459 //---------------------------------------------------------------------------
1462 label: "Total (blocks), short-lived",
1463 expected:
1464 //---------------------------------------------------------------------------
1466 Invocation {
1467 Mode: heap
1468 Command: ./big
1469 PID: 3902
1472 Times {
1473 t-gmax: 245,281 instrs (96.81% of program duration)
1474 t-end: 253,354 instrs
1477 ▼ PP 1/1 (1 children) {
1478 Total: 19 blocks (100%, 74.99/Minstr), avg lifetime 7,037.16 instrs (2.78% of program duration)
1479 Allocated at {
1480 #0: [root]
1483 └── PP 1.1/1 {
1484 Total: 19 blocks (100%, 74.99/Minstr), avg lifetime 7,037.16 instrs (2.78% of program duration)
1485 Allocated at {
1486 [7 insignificant]
1490 PP significance threshold: (total >= 0.1 blocks (0.5%)) && (avg lifetime <= 500 instrs)
1492 //---------------------------------------------------------------------------
1495 label: "At t-gmax (bytes)",
1496 expected:
1497 //---------------------------------------------------------------------------
1499 Invocation {
1500 Mode: heap
1501 Command: ./big
1502 PID: 3902
1505 Times {
1506 t-gmax: 245,281 instrs (96.81% of program duration)
1507 t-end: 253,354 instrs
1510 ▼ PP 1/1 (2 children) {
1511 Total: 1,000 bytes (100%, 3,947.05/Minstr) in 19 blocks (100%, 74.99/Minstr), avg size 52.63 bytes, avg lifetime 7,037.16 instrs (2.78% of program duration)
1512 At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1513 At t-end: 294 bytes (100%) in 18 blocks (100%), avg size 16.33 bytes
1514 Reads: 0 bytes (0%, 0/Minstr), 0/byte
1515 Writes: 0 bytes (0%, 0/Minstr), 0/byte
1516 Allocated at {
1517 #0: [root]
1520 ├─▼ PP 1.1/2 (2 children) {
1521 │ Total: 771 bytes (77.1%, 3,043.17/Minstr) in 5 blocks (26.32%, 19.74/Minstr), avg size 154.2 bytes, avg lifetime 6,414.8 instrs (2.53% of program duration)
1522 │ At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1523 │ At t-end: 65 bytes (22.11%) in 4 blocks (22.22%), avg size 16.25 bytes
1524 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1525 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1526 │ Allocated at {
1527 │ #1: 0x1086A1: a (big.c:10)
1528 │ }
1529 │ }
1530 │ ├─▼ PP 1.1.1/2 (2 children) {
1531 │ │ Total: 741 bytes (74.1%, 2,924.76/Minstr) in 3 blocks (15.79%, 11.84/Minstr), avg size 247 bytes, avg lifetime 5,475 instrs (2.16% of program duration)
1532 │ │ At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1533 │ │ At t-end: 35 bytes (11.9%) in 2 blocks (11.11%), avg size 17.5 bytes
1534 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1535 │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1536 │ │ Allocated at {
1537 │ │ ^1: 0x1086A1: a (big.c:10)
1538 │ │ #2: 0x1086BB: b1 (big.c:11)
1539 │ │ }
1540 │ │ }
1541 │ │ ├─▼ PP 1.1.1.1/2 (2 children) {
1542 │ │ │ Total: 711 bytes (71.1%, 2,806.35/Minstr) in 2 blocks (10.53%, 7.89/Minstr), avg size 355.5 bytes, avg lifetime 4,257.5 instrs (1.68% of program duration)
1543 │ │ │ At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1544 │ │ │ At t-end: 5 bytes (1.7%) in 1 blocks (5.56%), avg size 5 bytes
1545 │ │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1546 │ │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1547 │ │ │ Allocated at {
1548 │ │ │ ^1: 0x1086A1: a (big.c:10)
1549 │ │ │ ^2: 0x1086BB: b1 (big.c:11)
1550 │ │ │ #3: 0x1086D5: c1 (big.c:12)
1551 │ │ │ }
1552 │ │ │ }
1553 │ │ │ ├── PP 1.1.1.1.1/2 {
1554 │ │ │ │ Total: 706 bytes (70.6%, 2,786.61/Minstr) in 1 blocks (5.26%, 3.95/Minstr), avg size 706 bytes, avg lifetime 543 instrs (0.21% of program duration)
1555 │ │ │ │ Max: 706 bytes in 1 blocks, avg size 706 bytes
1556 │ │ │ │ At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1557 │ │ │ │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1558 │ │ │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1559 │ │ │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1560 │ │ │ │ Accesses: {
1561 │ │ │ │ [ 0] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1562 │ │ │ │ [ 32] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1563 │ │ │ │ [ 64] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1564 │ │ │ │ [ 96] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1565 │ │ │ │ [128] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1566 │ │ │ │ [160] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1567 │ │ │ │ [192] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1568 │ │ │ │ [224] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1569 │ │ │ │ [256] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1570 │ │ │ │ [288] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1571 │ │ │ │ [320] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1572 │ │ │ │ [352] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1573 │ │ │ │ [384] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1574 │ │ │ │ [416] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1575 │ │ │ │ [448] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1576 │ │ │ │ [480] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1577 │ │ │ │ [512] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1578 │ │ │ │ [544] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1579 │ │ │ │ [576] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1580 │ │ │ │ [608] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1581 │ │ │ │ [640] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1582 │ │ │ │ [672] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1583 │ │ │ │ [704] - -
1584 │ │ │ │ }
1585 │ │ │ │ Allocated at {
1586 │ │ │ │ ^1: 0x1086A1: a (big.c:10)
1587 │ │ │ │ ^2: 0x1086BB: b1 (big.c:11)
1588 │ │ │ │ ^3: 0x1086D5: c1 (big.c:12)
1589 │ │ │ │ #4: 0x1086EF: d1 (big.c:13)
1590 │ │ │ │ #5: 0x108A43: main (big.c:38)
1591 │ │ │ │ }
1592 │ │ │ │ }
1593 │ │ │ └── PP 1.1.1.1.2/2 {
1594 │ │ │ At t-gmax: 0 bytes (0%)
1595 │ │ │ Allocated at {
1596 │ │ │ [1 insignificant]
1597 │ │ │ }
1598 │ │ │ }
1599 │ │ └── PP 1.1.1.2/2 {
1600 │ │ At t-gmax: 0 bytes (0%)
1601 │ │ Allocated at {
1602 │ │ [1 insignificant]
1603 │ │ }
1604 │ │ }
1605 │ └── PP 1.1.2/2 {
1606 │ At t-gmax: 0 bytes (0%)
1607 │ Allocated at {
1608 │ [2 insignificant]
1609 │ }
1610 │ }
1611 └── PP 1.2/2 {
1612 At t-gmax: 0 bytes (0%)
1613 Allocated at {
1614 [6 insignificant]
1618 PP significance threshold: at-t-gmax >= 7.06 bytes (1%)
1620 //---------------------------------------------------------------------------
1624 tests.push(big);
1626 //---------------------------------------------------------------------------
1627 // sig (corresponds to dhat/tests/sig.c)
1628 //---------------------------------------------------------------------------
1630 let sig = {
1631 name: "sig",
1632 input:
1633 //---------------------------------------------------------------------------
1634 {"dhatFileVersion":2
1635 ,"mode":"heap","verb":"Allocated"
1636 ,"bklt":true,"bkacc":true
1637 ,"tu":"instrs","Mtu":"Minstr"
1638 ,"tuth":500
1639 ,"cmd":"./sig"
1640 ,"pid":21476
1641 ,"te":1318783
1642 ,"tg":1311861
1643 ,"pps":
1644 [{"tb":11,"tbk":1,"tl":1075941
1645 ,"mb":11,"mbk":1
1646 ,"gb":11,"gbk":1
1647 ,"eb":11,"ebk":1
1648 ,"rb":11,"wb":16489
1649 ,"acc":[-11,1500]
1650 ,"fs":[1,2]
1652 ,{"tb":10,"tbk":1,"tl":880845
1653 ,"mb":10,"mbk":1
1654 ,"gb":10,"gbk":1
1655 ,"eb":10,"ebk":1
1656 ,"rb":10,"wb":14990
1657 ,"acc":[-10,1500]
1658 ,"fs":[1,3,4]
1660 ,{"tb":5,"tbk":1,"tl":702250
1661 ,"mb":5,"mbk":1
1662 ,"gb":5,"gbk":1
1663 ,"eb":5,"ebk":1
1664 ,"rb":5,"wb":7495
1665 ,"acc":[-5,1500]
1666 ,"fs":[1,5,6]
1668 ,{"tb":4,"tbk":1,"tl":606170
1669 ,"mb":4,"mbk":1
1670 ,"gb":4,"gbk":1
1671 ,"eb":4,"ebk":1
1672 ,"rb":4,"wb":5996
1673 ,"acc":[-4,1500]
1674 ,"fs":[1,5,7]
1676 ,{"tb":10,"tbk":1,"tl":510097
1677 ,"mb":10,"mbk":1
1678 ,"gb":10,"gbk":1
1679 ,"eb":10,"ebk":1
1680 ,"rb":10,"wb":14990
1681 ,"acc":[-10,1500]
1682 ,"fs":[8,9]
1684 ,{"tb":9,"tbk":1,"tl":331504
1685 ,"mb":9,"mbk":1
1686 ,"gb":9,"gbk":1
1687 ,"eb":9,"ebk":1
1688 ,"rb":9,"wb":13491
1689 ,"acc":[-9,1500]
1690 ,"fs":[8,10,11]
1692 ,{"tb":5,"tbk":1,"tl":169412
1693 ,"mb":5,"mbk":1
1694 ,"gb":5,"gbk":1
1695 ,"eb":5,"ebk":1
1696 ,"rb":0,"wb":0
1697 ,"acc":[-5,0]
1698 ,"fs":[8,12,13]
1700 ,{"tb":3,"tbk":1,"tl":169360
1701 ,"mb":3,"mbk":1
1702 ,"gb":3,"gbk":1
1703 ,"eb":3,"ebk":1
1704 ,"rb":0,"wb":0
1705 ,"acc":[-3,0]
1706 ,"fs":[8,12,14]
1708 ,{"tb":9,"tbk":1,"tl":169315
1709 ,"mb":9,"mbk":1
1710 ,"gb":9,"gbk":1
1711 ,"eb":9,"ebk":1
1712 ,"rb":9,"wb":13491
1713 ,"acc":[-9,1500]
1714 ,"fs":[15,16]
1716 ,{"tb":8,"tbk":1,"tl":7225
1717 ,"mb":8,"mbk":1
1718 ,"gb":8,"gbk":1
1719 ,"eb":8,"ebk":1
1720 ,"rb":0,"wb":0
1721 ,"acc":[-8,0]
1722 ,"fs":[15,17,18]
1724 ,{"tb":4,"tbk":1,"tl":7173
1725 ,"mb":4,"mbk":1
1726 ,"gb":4,"gbk":1
1727 ,"eb":4,"ebk":1
1728 ,"rb":0,"wb":0
1729 ,"acc":[-4,0]
1730 ,"fs":[15,19,20]
1732 ,{"tb":3,"tbk":1,"tl":7121
1733 ,"mb":3,"mbk":1
1734 ,"gb":3,"gbk":1
1735 ,"eb":3,"ebk":1
1736 ,"rb":0,"wb":0
1737 ,"acc":[-3,0]
1738 ,"fs":[15,19,21]
1740 ,{"tb":8,"tbk":1,"tl":7076
1741 ,"mb":8,"mbk":1
1742 ,"gb":8,"gbk":1
1743 ,"eb":8,"ebk":1
1744 ,"rb":0,"wb":0
1745 ,"acc":[-8,0]
1746 ,"fs":[22,23]
1748 ,{"tb":7,"tbk":1,"tl":7026
1749 ,"mb":7,"mbk":1
1750 ,"gb":7,"gbk":1
1751 ,"eb":7,"ebk":1
1752 ,"rb":0,"wb":0
1753 ,"acc":[-7,0]
1754 ,"fs":[22,24,25]
1756 ,{"tb":4,"tbk":1,"tl":6974
1757 ,"mb":4,"mbk":1
1758 ,"gb":4,"gbk":1
1759 ,"eb":4,"ebk":1
1760 ,"rb":0,"wb":0
1761 ,"acc":[-4,0]
1762 ,"fs":[22,26,27]
1764 ,{"tb":2,"tbk":1,"tl":6922
1765 ,"mb":2,"mbk":1
1766 ,"gb":2,"gbk":1
1767 ,"eb":2,"ebk":1
1768 ,"rb":0,"wb":0
1769 ,"acc":[-2,0]
1770 ,"fs":[22,26,28]
1773 ,"ftbl":
1774 ["[root]"
1775 ,"0x108681: am (sig.c:9)"
1776 ,"0x10883C: main (sig.c:57)"
1777 ,"0x10869B: a2 (sig.c:11)"
1778 ,"0x10885B: main (sig.c:58)"
1779 ,"0x1086B5: a3 (sig.c:12)"
1780 ,"0x10887A: main (sig.c:59)"
1781 ,"0x108899: main (sig.c:60)"
1782 ,"0x1086CF: bm (sig.c:15)"
1783 ,"0x1088B8: main (sig.c:62)"
1784 ,"0x1086E9: b2 (sig.c:17)"
1785 ,"0x1088D7: main (sig.c:63)"
1786 ,"0x108703: b3 (sig.c:18)"
1787 ,"0x1088F6: main (sig.c:64)"
1788 ,"0x108904: main (sig.c:65)"
1789 ,"0x10871D: cm (sig.c:21)"
1790 ,"0x108912: main (sig.c:67)"
1791 ,"0x108737: c2 (sig.c:23)"
1792 ,"0x108931: main (sig.c:68)"
1793 ,"0x108751: c3 (sig.c:24)"
1794 ,"0x10893F: main (sig.c:69)"
1795 ,"0x10894D: main (sig.c:70)"
1796 ,"0x10876B: dm (sig.c:27)"
1797 ,"0x10895B: main (sig.c:72)"
1798 ,"0x108785: d2 (sig.c:29)"
1799 ,"0x108969: main (sig.c:73)"
1800 ,"0x10879F: d3 (sig.c:30)"
1801 ,"0x108977: main (sig.c:74)"
1802 ,"0x108985: main (sig.c:75)"
1805 //---------------------------------------------------------------------------
1807 outputs: [
1809 label: "Total (bytes), zero reads or zero writes",
1810 expected:
1811 //---------------------------------------------------------------------------
1813 Invocation {
1814 Mode: heap
1815 Command: ./sig
1816 PID: 21476
1819 Times {
1820 t-gmax: 1,311,861 instrs (99.48% of program duration)
1821 t-end: 1,318,783 instrs
1824 ▼ PP 1/1 (4 children) {
1825 Total: 102 bytes (100%, 77.34/Minstr)
1826 Reads: 58 bytes (100%, 43.98/Minstr)
1827 Writes: 86,942 bytes (100%, 65,925.93/Minstr)
1828 Allocated at {
1829 #0: [root]
1832 ├── PP 1.1/4 {
1833 │ Total: 30 bytes (29.41%, 22.75/Minstr)
1834 │ Reads: 30 bytes (51.72%, 22.75/Minstr)
1835 │ Writes: 44,970 bytes (51.72%, 34,099.62/Minstr)
1836 │ Allocated at {
1837 │ [1 insignificant]
1838 │ }
1839 │ }
1840 ├─▼ PP 1.2/4 (2 children) {
1841 │ Total: 27 bytes (26.47%, 20.47/Minstr)
1842 │ Reads: 19 bytes (32.76%, 14.41/Minstr)
1843 │ Writes: 28,481 bytes (32.76%, 21,596.43/Minstr)
1844 │ Allocated at {
1845 │ #1: 0x1086CF: bm (sig.c:15)
1846 │ }
1847 │ }
1848 │ ├── PP 1.2.1/2 {
1849 │ │ Total: 19 bytes (18.63%, 14.41/Minstr)
1850 │ │ Reads: 19 bytes (32.76%, 14.41/Minstr)
1851 │ │ Writes: 28,481 bytes (32.76%, 21,596.43/Minstr)
1852 │ │ Allocated at {
1853 │ │ [2 insignificant]
1854 │ │ }
1855 │ │ }
1856 │ └─▼ PP 1.2.2/2 (2 children) {
1857 │ Total: 8 bytes (7.84%, 6.07/Minstr) in 2 blocks (12.5%, 1.52/Minstr), avg size 4 bytes, avg lifetime 169,386 instrs (12.84% of program duration)
1858 │ At t-gmax: 8 bytes (7.84%) in 2 blocks (12.5%), avg size 4 bytes
1859 │ At t-end: 8 bytes (7.84%) in 2 blocks (12.5%), avg size 4 bytes
1860 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1861 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1862 │ Allocated at {
1863 │ ^1: 0x1086CF: bm (sig.c:15)
1864 │ #2: 0x108703: b3 (sig.c:18)
1865 │ }
1866 │ }
1867 │ ├── PP 1.2.2.1/2 {
1868 │ │ Total: 5 bytes (4.9%, 3.79/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 5 bytes, avg lifetime 169,412 instrs (12.85% of program duration)
1869 │ │ Max: 5 bytes in 1 blocks, avg size 5 bytes
1870 │ │ At t-gmax: 5 bytes (4.9%) in 1 blocks (6.25%), avg size 5 bytes
1871 │ │ At t-end: 5 bytes (4.9%) in 1 blocks (6.25%), avg size 5 bytes
1872 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1873 │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1874 │ │ Accesses: {
1875 │ │ [ 0] - - - - -
1876 │ │ }
1877 │ │ Allocated at {
1878 │ │ ^1: 0x1086CF: bm (sig.c:15)
1879 │ │ ^2: 0x108703: b3 (sig.c:18)
1880 │ │ #3: 0x1088F6: main (sig.c:64)
1881 │ │ }
1882 │ │ }
1883 │ └── PP 1.2.2.2/2 {
1884 │ Total: 3 bytes (2.94%, 2.27/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 3 bytes, avg lifetime 169,360 instrs (12.84% of program duration)
1885 │ Max: 3 bytes in 1 blocks, avg size 3 bytes
1886 │ At t-gmax: 3 bytes (2.94%) in 1 blocks (6.25%), avg size 3 bytes
1887 │ At t-end: 3 bytes (2.94%) in 1 blocks (6.25%), avg size 3 bytes
1888 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1889 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1890 │ Accesses: {
1891 │ [ 0] - - -
1892 │ }
1893 │ Allocated at {
1894 │ ^1: 0x1086CF: bm (sig.c:15)
1895 │ ^2: 0x108703: b3 (sig.c:18)
1896 │ #3: 0x108904: main (sig.c:65)
1897 │ }
1898 │ }
1899 ├─▼ PP 1.3/4 (3 children) {
1900 │ Total: 24 bytes (23.53%, 18.2/Minstr)
1901 │ Reads: 9 bytes (15.52%, 6.82/Minstr)
1902 │ Writes: 13,491 bytes (15.52%, 10,229.89/Minstr)
1903 │ Allocated at {
1904 │ #1: 0x10871D: cm (sig.c:21)
1905 │ }
1906 │ }
1907 │ ├── PP 1.3.1/3 {
1908 │ │ Total: 9 bytes (8.82%, 6.82/Minstr)
1909 │ │ Reads: 9 bytes (15.52%, 6.82/Minstr)
1910 │ │ Writes: 13,491 bytes (15.52%, 10,229.89/Minstr)
1911 │ │ Allocated at {
1912 │ │ [1 insignificant]
1913 │ │ }
1914 │ │ }
1915 │ ├── PP 1.3.2/3 {
1916 │ │ Total: 8 bytes (7.84%, 6.07/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 8 bytes, avg lifetime 7,225 instrs (0.55% of program duration)
1917 │ │ Max: 8 bytes in 1 blocks, avg size 8 bytes
1918 │ │ At t-gmax: 8 bytes (7.84%) in 1 blocks (6.25%), avg size 8 bytes
1919 │ │ At t-end: 8 bytes (7.84%) in 1 blocks (6.25%), avg size 8 bytes
1920 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1921 │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1922 │ │ Accesses: {
1923 │ │ [ 0] - - - - - - - -
1924 │ │ }
1925 │ │ Allocated at {
1926 │ │ ^1: 0x10871D: cm (sig.c:21)
1927 │ │ #2: 0x108737: c2 (sig.c:23)
1928 │ │ #3: 0x108931: main (sig.c:68)
1929 │ │ }
1930 │ │ }
1931 │ └─▼ PP 1.3.3/3 (2 children) {
1932 │ Total: 7 bytes (6.86%, 5.31/Minstr) in 2 blocks (12.5%, 1.52/Minstr), avg size 3.5 bytes, avg lifetime 7,147 instrs (0.54% of program duration)
1933 │ At t-gmax: 7 bytes (6.86%) in 2 blocks (12.5%), avg size 3.5 bytes
1934 │ At t-end: 7 bytes (6.86%) in 2 blocks (12.5%), avg size 3.5 bytes
1935 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1936 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1937 │ Allocated at {
1938 │ ^1: 0x10871D: cm (sig.c:21)
1939 │ #2: 0x108751: c3 (sig.c:24)
1940 │ }
1941 │ }
1942 │ ├── PP 1.3.3.1/2 {
1943 │ │ Total: 4 bytes (3.92%, 3.03/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 4 bytes, avg lifetime 7,173 instrs (0.54% of program duration)
1944 │ │ Max: 4 bytes in 1 blocks, avg size 4 bytes
1945 │ │ At t-gmax: 4 bytes (3.92%) in 1 blocks (6.25%), avg size 4 bytes
1946 │ │ At t-end: 4 bytes (3.92%) in 1 blocks (6.25%), avg size 4 bytes
1947 │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1948 │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1949 │ │ Accesses: {
1950 │ │ [ 0] - - - -
1951 │ │ }
1952 │ │ Allocated at {
1953 │ │ ^1: 0x10871D: cm (sig.c:21)
1954 │ │ ^2: 0x108751: c3 (sig.c:24)
1955 │ │ #3: 0x10893F: main (sig.c:69)
1956 │ │ }
1957 │ │ }
1958 │ └── PP 1.3.3.2/2 {
1959 │ Total: 3 bytes (2.94%, 2.27/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 3 bytes, avg lifetime 7,121 instrs (0.54% of program duration)
1960 │ Max: 3 bytes in 1 blocks, avg size 3 bytes
1961 │ At t-gmax: 3 bytes (2.94%) in 1 blocks (6.25%), avg size 3 bytes
1962 │ At t-end: 3 bytes (2.94%) in 1 blocks (6.25%), avg size 3 bytes
1963 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1964 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1965 │ Accesses: {
1966 │ [ 0] - - -
1967 │ }
1968 │ Allocated at {
1969 │ ^1: 0x10871D: cm (sig.c:21)
1970 │ ^2: 0x108751: c3 (sig.c:24)
1971 │ #3: 0x10894D: main (sig.c:70)
1972 │ }
1973 │ }
1974 └─▼ PP 1.4/4 (3 children) {
1975 Total: 21 bytes (20.59%, 15.92/Minstr) in 4 blocks (25%, 3.03/Minstr), avg size 5.25 bytes, avg lifetime 6,999.5 instrs (0.53% of program duration)
1976 At t-gmax: 21 bytes (20.59%) in 4 blocks (25%), avg size 5.25 bytes
1977 At t-end: 21 bytes (20.59%) in 4 blocks (25%), avg size 5.25 bytes
1978 Reads: 0 bytes (0%, 0/Minstr), 0/byte
1979 Writes: 0 bytes (0%, 0/Minstr), 0/byte
1980 Allocated at {
1981 #1: 0x10876B: dm (sig.c:27)
1984 ├── PP 1.4.1/3 {
1985 │ Total: 8 bytes (7.84%, 6.07/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 8 bytes, avg lifetime 7,076 instrs (0.54% of program duration)
1986 │ Max: 8 bytes in 1 blocks, avg size 8 bytes
1987 │ At t-gmax: 8 bytes (7.84%) in 1 blocks (6.25%), avg size 8 bytes
1988 │ At t-end: 8 bytes (7.84%) in 1 blocks (6.25%), avg size 8 bytes
1989 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
1990 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
1991 │ Accesses: {
1992 │ [ 0] - - - - - - - -
1993 │ }
1994 │ Allocated at {
1995 │ ^1: 0x10876B: dm (sig.c:27)
1996 │ #2: 0x10895B: main (sig.c:72)
1997 │ }
1998 │ }
1999 ├── PP 1.4.2/3 {
2000 │ Total: 7 bytes (6.86%, 5.31/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 7 bytes, avg lifetime 7,026 instrs (0.53% of program duration)
2001 │ Max: 7 bytes in 1 blocks, avg size 7 bytes
2002 │ At t-gmax: 7 bytes (6.86%) in 1 blocks (6.25%), avg size 7 bytes
2003 │ At t-end: 7 bytes (6.86%) in 1 blocks (6.25%), avg size 7 bytes
2004 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
2005 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
2006 │ Accesses: {
2007 │ [ 0] - - - - - - -
2008 │ }
2009 │ Allocated at {
2010 │ ^1: 0x10876B: dm (sig.c:27)
2011 │ #2: 0x108785: d2 (sig.c:29)
2012 │ #3: 0x108969: main (sig.c:73)
2013 │ }
2014 │ }
2015 └─▼ PP 1.4.3/3 (2 children) {
2016 Total: 6 bytes (5.88%, 4.55/Minstr) in 2 blocks (12.5%, 1.52/Minstr), avg size 3 bytes, avg lifetime 6,948 instrs (0.53% of program duration)
2017 At t-gmax: 6 bytes (5.88%) in 2 blocks (12.5%), avg size 3 bytes
2018 At t-end: 6 bytes (5.88%) in 2 blocks (12.5%), avg size 3 bytes
2019 Reads: 0 bytes (0%, 0/Minstr), 0/byte
2020 Writes: 0 bytes (0%, 0/Minstr), 0/byte
2021 Allocated at {
2022 ^1: 0x10876B: dm (sig.c:27)
2023 #2: 0x10879F: d3 (sig.c:30)
2026 ├── PP 1.4.3.1/2 {
2027 │ Total: 4 bytes (3.92%, 3.03/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 4 bytes, avg lifetime 6,974 instrs (0.53% of program duration)
2028 │ Max: 4 bytes in 1 blocks, avg size 4 bytes
2029 │ At t-gmax: 4 bytes (3.92%) in 1 blocks (6.25%), avg size 4 bytes
2030 │ At t-end: 4 bytes (3.92%) in 1 blocks (6.25%), avg size 4 bytes
2031 │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
2032 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
2033 │ Accesses: {
2034 │ [ 0] - - - -
2035 │ }
2036 │ Allocated at {
2037 │ ^1: 0x10876B: dm (sig.c:27)
2038 │ ^2: 0x10879F: d3 (sig.c:30)
2039 │ #3: 0x108977: main (sig.c:74)
2040 │ }
2041 │ }
2042 └── PP 1.4.3.2/2 {
2043 Total: 2 bytes (1.96%, 1.52/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 2 bytes, avg lifetime 6,922 instrs (0.52% of program duration)
2044 Max: 2 bytes in 1 blocks, avg size 2 bytes
2045 At t-gmax: 2 bytes (1.96%) in 1 blocks (6.25%), avg size 2 bytes
2046 At t-end: 2 bytes (1.96%) in 1 blocks (6.25%), avg size 2 bytes
2047 Reads: 0 bytes (0%, 0/Minstr), 0/byte
2048 Writes: 0 bytes (0%, 0/Minstr), 0/byte
2049 Accesses: {
2050 [ 0] - -
2052 Allocated at {
2053 ^1: 0x10876B: dm (sig.c:27)
2054 ^2: 0x10879F: d3 (sig.c:30)
2055 #3: 0x108985: main (sig.c:75)
2059 PP significance threshold: (total >= 0.51 bytes (0.5%)) && ((reads == 0 bytes) || (writes == 0 bytes))
2061 //---------------------------------------------------------------------------
2064 label: "Total (blocks), low-access",
2065 expected:
2066 //---------------------------------------------------------------------------
2068 Invocation {
2069 Mode: heap
2070 Command: ./sig
2071 PID: 21476
2074 Times {
2075 t-gmax: 1,311,861 instrs (99.48% of program duration)
2076 t-end: 1,318,783 instrs
2079 ▼ PP 1/1 (2 children) {
2080 Total: 16 blocks (100%, 12.13/Minstr)
2081 Reads: 0.57/byte
2082 Writes: 852.37/byte
2083 Allocated at {
2084 #0: [root]
2087 ├── PP 1.1/2 {
2088 │ Total: 12 blocks (75%, 9.1/Minstr)
2089 │ Reads: 0.63/byte
2090 │ Writes: 941.68/byte
2091 │ Allocated at {
2092 │ [3 insignificant]
2093 │ }
2094 │ }
2095 └─▼ PP 1.2/2 (1 children) {
2096 Total: 24 bytes (23.53%, 18.2/Minstr) in 4 blocks (25%, 3.03/Minstr), avg size 6 bytes, avg lifetime 47,708.5 instrs (3.62% of program duration)
2097 At t-gmax: 24 bytes (23.53%) in 4 blocks (25%), avg size 6 bytes
2098 At t-end: 24 bytes (23.53%) in 4 blocks (25%), avg size 6 bytes
2099 Reads: 9 bytes (15.52%, 6.82/Minstr), 0.38/byte
2100 Writes: 13,491 bytes (15.52%, 10,229.89/Minstr), 562.13/byte
2101 Allocated at {
2102 #1: 0x10871D: cm (sig.c:21)
2105 └── PP 1.2.1/1 {
2106 Total: 4 blocks (25%, 3.03/Minstr)
2107 Reads: 0.38/byte
2108 Writes: 562.13/byte
2109 Allocated at {
2110 [3 insignificant]
2114 PP significance threshold: (total >= 0.08 blocks (0.5%)) && (reads != 0 bytes) && (writes != 0 bytes) && ((reads <= 0.4/byte) || (writes <= 0.4/byte))
2116 //---------------------------------------------------------------------------
2119 label: "Writes (bytes), high-access",
2120 expected:
2121 //---------------------------------------------------------------------------
2123 Invocation {
2124 Mode: heap
2125 Command: ./sig
2126 PID: 21476
2129 Times {
2130 t-gmax: 1,311,861 instrs (99.48% of program duration)
2131 t-end: 1,318,783 instrs
2134 ▼ PP 1/1 (4 children) {
2135 Writes: 86,942 bytes (100%, 65,925.93/Minstr), 852.37/byte
2136 Allocated at {
2137 #0: [root]
2140 ├─▼ PP 1.1/4 (3 children) {
2141 │ Total: 30 bytes (29.41%, 22.75/Minstr) in 4 blocks (25%, 3.03/Minstr), avg size 7.5 bytes, avg lifetime 816,301.5 instrs (61.9% of program duration)
2142 │ At t-gmax: 30 bytes (29.41%) in 4 blocks (25%), avg size 7.5 bytes
2143 │ At t-end: 30 bytes (29.41%) in 4 blocks (25%), avg size 7.5 bytes
2144 │ Reads: 30 bytes (51.72%, 22.75/Minstr), 1/byte
2145 │ Writes: 44,970 bytes (51.72%, 34,099.62/Minstr), 1,499/byte
2146 │ Allocated at {
2147 │ #1: 0x108681: am (sig.c:9)
2148 │ }
2149 │ }
2150 │ ├── PP 1.1.1/3 {
2151 │ │ Total: 11 bytes (10.78%, 8.34/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 11 bytes, avg lifetime 1,075,941 instrs (81.59% of program duration)
2152 │ │ Max: 11 bytes in 1 blocks, avg size 11 bytes
2153 │ │ At t-gmax: 11 bytes (10.78%) in 1 blocks (6.25%), avg size 11 bytes
2154 │ │ At t-end: 11 bytes (10.78%) in 1 blocks (6.25%), avg size 11 bytes
2155 │ │ Reads: 11 bytes (18.97%, 8.34/Minstr), 1/byte
2156 │ │ Writes: 16,489 bytes (18.97%, 12,503.19/Minstr), 1,499/byte
2157 │ │ Accesses: {
2158 │ │ [ 0] 1500 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃
2159 │ │ }
2160 │ │ Allocated at {
2161 │ │ ^1: 0x108681: am (sig.c:9)
2162 │ │ #2: 0x10883C: main (sig.c:57)
2163 │ │ }
2164 │ │ }
2165 │ ├── PP 1.1.2/3 {
2166 │ │ Total: 10 bytes (9.8%, 7.58/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 10 bytes, avg lifetime 880,845 instrs (66.79% of program duration)
2167 │ │ Max: 10 bytes in 1 blocks, avg size 10 bytes
2168 │ │ At t-gmax: 10 bytes (9.8%) in 1 blocks (6.25%), avg size 10 bytes
2169 │ │ At t-end: 10 bytes (9.8%) in 1 blocks (6.25%), avg size 10 bytes
2170 │ │ Reads: 10 bytes (17.24%, 7.58/Minstr), 1/byte
2171 │ │ Writes: 14,990 bytes (17.24%, 11,366.54/Minstr), 1,499/byte
2172 │ │ Accesses: {
2173 │ │ [ 0] 1500 〃 〃 〃 〃 〃 〃 〃 〃 〃
2174 │ │ }
2175 │ │ Allocated at {
2176 │ │ ^1: 0x108681: am (sig.c:9)
2177 │ │ #2: 0x10869B: a2 (sig.c:11)
2178 │ │ #3: 0x10885B: main (sig.c:58)
2179 │ │ }
2180 │ │ }
2181 │ └─▼ PP 1.1.3/3 (2 children) {
2182 │ Total: 9 bytes (8.82%, 6.82/Minstr) in 2 blocks (12.5%, 1.52/Minstr), avg size 4.5 bytes, avg lifetime 654,210 instrs (49.61% of program duration)
2183 │ At t-gmax: 9 bytes (8.82%) in 2 blocks (12.5%), avg size 4.5 bytes
2184 │ At t-end: 9 bytes (8.82%) in 2 blocks (12.5%), avg size 4.5 bytes
2185 │ Reads: 9 bytes (15.52%, 6.82/Minstr), 1/byte
2186 │ Writes: 13,491 bytes (15.52%, 10,229.89/Minstr), 1,499/byte
2187 │ Allocated at {
2188 │ ^1: 0x108681: am (sig.c:9)
2189 │ #2: 0x1086B5: a3 (sig.c:12)
2190 │ }
2191 │ }
2192 │ ├── PP 1.1.3.1/2 {
2193 │ │ Total: 5 bytes (4.9%, 3.79/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 5 bytes, avg lifetime 702,250 instrs (53.25% of program duration)
2194 │ │ Max: 5 bytes in 1 blocks, avg size 5 bytes
2195 │ │ At t-gmax: 5 bytes (4.9%) in 1 blocks (6.25%), avg size 5 bytes
2196 │ │ At t-end: 5 bytes (4.9%) in 1 blocks (6.25%), avg size 5 bytes
2197 │ │ Reads: 5 bytes (8.62%, 3.79/Minstr), 1/byte
2198 │ │ Writes: 7,495 bytes (8.62%, 5,683.27/Minstr), 1,499/byte
2199 │ │ Accesses: {
2200 │ │ [ 0] 1500 〃 〃 〃 〃
2201 │ │ }
2202 │ │ Allocated at {
2203 │ │ ^1: 0x108681: am (sig.c:9)
2204 │ │ ^2: 0x1086B5: a3 (sig.c:12)
2205 │ │ #3: 0x10887A: main (sig.c:59)
2206 │ │ }
2207 │ │ }
2208 │ └── PP 1.1.3.2/2 {
2209 │ Total: 4 bytes (3.92%, 3.03/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 4 bytes, avg lifetime 606,170 instrs (45.96% of program duration)
2210 │ Max: 4 bytes in 1 blocks, avg size 4 bytes
2211 │ At t-gmax: 4 bytes (3.92%) in 1 blocks (6.25%), avg size 4 bytes
2212 │ At t-end: 4 bytes (3.92%) in 1 blocks (6.25%), avg size 4 bytes
2213 │ Reads: 4 bytes (6.9%, 3.03/Minstr), 1/byte
2214 │ Writes: 5,996 bytes (6.9%, 4,546.62/Minstr), 1,499/byte
2215 │ Accesses: {
2216 │ [ 0] 1500 〃 〃 〃
2217 │ }
2218 │ Allocated at {
2219 │ ^1: 0x108681: am (sig.c:9)
2220 │ ^2: 0x1086B5: a3 (sig.c:12)
2221 │ #3: 0x108899: main (sig.c:60)
2222 │ }
2223 │ }
2224 ├─▼ PP 1.2/4 (3 children) {
2225 │ Total: 27 bytes (26.47%, 20.47/Minstr) in 4 blocks (25%, 3.03/Minstr), avg size 6.75 bytes, avg lifetime 295,093.25 instrs (22.38% of program duration)
2226 │ At t-gmax: 27 bytes (26.47%) in 4 blocks (25%), avg size 6.75 bytes
2227 │ At t-end: 27 bytes (26.47%) in 4 blocks (25%), avg size 6.75 bytes
2228 │ Reads: 19 bytes (32.76%, 14.41/Minstr), 0.7/byte
2229 │ Writes: 28,481 bytes (32.76%, 21,596.43/Minstr), 1,054.85/byte
2230 │ Allocated at {
2231 │ #1: 0x1086CF: bm (sig.c:15)
2232 │ }
2233 │ }
2234 │ ├── PP 1.2.1/3 {
2235 │ │ Total: 10 bytes (9.8%, 7.58/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 10 bytes, avg lifetime 510,097 instrs (38.68% of program duration)
2236 │ │ Max: 10 bytes in 1 blocks, avg size 10 bytes
2237 │ │ At t-gmax: 10 bytes (9.8%) in 1 blocks (6.25%), avg size 10 bytes
2238 │ │ At t-end: 10 bytes (9.8%) in 1 blocks (6.25%), avg size 10 bytes
2239 │ │ Reads: 10 bytes (17.24%, 7.58/Minstr), 1/byte
2240 │ │ Writes: 14,990 bytes (17.24%, 11,366.54/Minstr), 1,499/byte
2241 │ │ Accesses: {
2242 │ │ [ 0] 1500 〃 〃 〃 〃 〃 〃 〃 〃 〃
2243 │ │ }
2244 │ │ Allocated at {
2245 │ │ ^1: 0x1086CF: bm (sig.c:15)
2246 │ │ #2: 0x1088B8: main (sig.c:62)
2247 │ │ }
2248 │ │ }
2249 │ ├── PP 1.2.2/3 {
2250 │ │ Total: 9 bytes (8.82%, 6.82/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 9 bytes, avg lifetime 331,504 instrs (25.14% of program duration)
2251 │ │ Max: 9 bytes in 1 blocks, avg size 9 bytes
2252 │ │ At t-gmax: 9 bytes (8.82%) in 1 blocks (6.25%), avg size 9 bytes
2253 │ │ At t-end: 9 bytes (8.82%) in 1 blocks (6.25%), avg size 9 bytes
2254 │ │ Reads: 9 bytes (15.52%, 6.82/Minstr), 1/byte
2255 │ │ Writes: 13,491 bytes (15.52%, 10,229.89/Minstr), 1,499/byte
2256 │ │ Accesses: {
2257 │ │ [ 0] 1500 〃 〃 〃 〃 〃 〃 〃 〃
2258 │ │ }
2259 │ │ Allocated at {
2260 │ │ ^1: 0x1086CF: bm (sig.c:15)
2261 │ │ #2: 0x1086E9: b2 (sig.c:17)
2262 │ │ #3: 0x1088D7: main (sig.c:63)
2263 │ │ }
2264 │ │ }
2265 │ └── PP 1.2.3/3 {
2266 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
2267 │ Allocated at {
2268 │ [1 insignificant]
2269 │ }
2270 │ }
2271 ├─▼ PP 1.3/4 (2 children) {
2272 │ Writes: 13,491 bytes (15.52%, 10,229.89/Minstr), 562.13/byte
2273 │ Allocated at {
2274 │ #1: 0x10871D: cm (sig.c:21)
2275 │ }
2276 │ }
2277 │ ├── PP 1.3.1/2 {
2278 │ │ Total: 9 bytes (8.82%, 6.82/Minstr) in 1 blocks (6.25%, 0.76/Minstr), avg size 9 bytes, avg lifetime 169,315 instrs (12.84% of program duration)
2279 │ │ Max: 9 bytes in 1 blocks, avg size 9 bytes
2280 │ │ At t-gmax: 9 bytes (8.82%) in 1 blocks (6.25%), avg size 9 bytes
2281 │ │ At t-end: 9 bytes (8.82%) in 1 blocks (6.25%), avg size 9 bytes
2282 │ │ Reads: 9 bytes (15.52%, 6.82/Minstr), 1/byte
2283 │ │ Writes: 13,491 bytes (15.52%, 10,229.89/Minstr), 1,499/byte
2284 │ │ Accesses: {
2285 │ │ [ 0] 1500 〃 〃 〃 〃 〃 〃 〃 〃
2286 │ │ }
2287 │ │ Allocated at {
2288 │ │ ^1: 0x10871D: cm (sig.c:21)
2289 │ │ #2: 0x108912: main (sig.c:67)
2290 │ │ }
2291 │ │ }
2292 │ └── PP 1.3.2/2 {
2293 │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
2294 │ Allocated at {
2295 │ [2 insignificant]
2296 │ }
2297 │ }
2298 └── PP 1.4/4 {
2299 Writes: 0 bytes (0%, 0/Minstr), 0/byte
2300 Allocated at {
2301 [1 insignificant]
2305 PP significance threshold: (writes >= 434.71 bytes (0.5%)) && ((reads >= 1,000/byte) || (writes >= 1,000/byte))
2307 //---------------------------------------------------------------------------
2311 tests.push(sig);
2313 //---------------------------------------------------------------------------
2314 // sig2 (doesn't corresponds to a .c file)
2315 //---------------------------------------------------------------------------
2317 let sig2 = {
2318 name: "sig2",
2319 input:
2320 //---------------------------------------------------------------------------
2321 {"dhatFileVersion":2
2322 ,"mode":"heap","verb":"Allocated"
2323 ,"bklt":true,"bkacc":true
2324 ,"tu":"instrs","Mtu":"Minstr"
2325 ,"tuth":500
2326 ,"cmd":"subseqs"
2327 ,"pid":0
2328 ,"te":20000
2329 ,"tg":10000
2330 ,"pps":
2331 [{"tb":100,"tbk":1,"tl":1000
2332 ,"mb":100,"mbk":1
2333 ,"gb":100,"gbk":1
2334 ,"eb":0,"ebk":0
2335 ,"rb":0,"wb":0
2336 ,"acc":[-10,0]
2337 ,"fs":[1]
2339 ,{"tb":101,"tbk":1,"tl":1000
2340 ,"mb":101,"mbk":1
2341 ,"gb":101,"gbk":1
2342 ,"eb":0,"ebk":0
2343 ,"rb":0,"wb":0
2344 ,"acc":[-10,0]
2345 ,"fs":[2]
2347 ,{"tb":102,"tbk":1,"tl":1000
2348 ,"mb":102,"mbk":1
2349 ,"gb":102,"gbk":1
2350 ,"eb":0,"ebk":0
2351 ,"rb":0,"wb":0
2352 ,"acc":[-10,0]
2353 ,"fs":[3,4]
2355 ,{"tb":103,"tbk":1,"tl":1000
2356 ,"mb":103,"mbk":1
2357 ,"gb":103,"gbk":1
2358 ,"eb":0,"ebk":0
2359 ,"rb":0,"wb":0
2360 ,"acc":[-10,0]
2361 ,"fs":[3,5]
2363 ,{"tb":104,"tbk":1,"tl":1000
2364 ,"mb":104,"mbk":1
2365 ,"gb":104,"gbk":1
2366 ,"eb":0,"ebk":0
2367 ,"rb":0,"wb":0
2368 ,"acc":[-10,0]
2369 ,"fs":[3,6,7]
2371 ,{"tb":105,"tbk":1,"tl":1000
2372 ,"mb":105,"mbk":1
2373 ,"gb":105,"gbk":1
2374 ,"eb":0,"ebk":0
2375 ,"rb":0,"wb":0
2376 ,"acc":[-10,0]
2377 ,"fs":[3,6,8]
2379 ,{"tb":10,"tbk":1,"tl":1000
2380 ,"mb":10,"mbk":1
2381 ,"gb":10,"gbk":1
2382 ,"eb":0,"ebk":0
2383 ,"rb":0,"wb":0
2384 ,"acc":[-10,0]
2385 ,"fs":[3,6,9,10]
2387 ,{"tb":106,"tbk":1,"tl":1000
2388 ,"mb":106,"mbk":1
2389 ,"gb":106,"gbk":1
2390 ,"eb":0,"ebk":0
2391 ,"rb":0,"wb":0
2392 ,"acc":[-10,0]
2393 ,"fs":[3,6,9,11]
2395 ,{"tb":107,"tbk":1,"tl":1000
2396 ,"mb":107,"mbk":1
2397 ,"gb":107,"gbk":1
2398 ,"eb":0,"ebk":0
2399 ,"rb":0,"wb":0
2400 ,"acc":[-10,0]
2401 ,"fs":[3,6,9,12]
2404 ,"ftbl":
2405 ["[root]"
2406 ,"a1()"
2407 ,"a2()"
2408 ,"a3()"
2409 ,"b1()"
2410 ,"b2()"
2411 ,"b3()"
2412 ,"c1()"
2413 ,"c2()"
2414 ,"c3()"
2415 ,"d1()"
2416 ,"d2()"
2417 ,"d3()"
2420 //---------------------------------------------------------------------------
2422 outputs: [
2424 label: "Total (blocks), tiny",
2425 expected:
2426 //---------------------------------------------------------------------------
2428 Invocation {
2429 Mode: heap
2430 Command: subseqs
2431 PID: 0
2434 Times {
2435 t-gmax: 10,000 instrs (50% of program duration)
2436 t-end: 20,000 instrs
2439 ▼ PP 1/1 (2 children) {
2440 Total: 9 blocks (100%, 450/Minstr), avg size 93.11 bytes
2441 Allocated at {
2442 #0: [root]
2445 ├─▼ PP 1.1/2 (2 children) {
2446 │ Total: 7 blocks (77.78%, 350/Minstr), avg size 91 bytes
2447 │ Allocated at {
2448 │ #1: a3()
2449 │ }
2450 │ }
2451 │ ├─▼ PP 1.1.1/2 (2 children) {
2452 │ │ Total: 5 blocks (55.56%, 250/Minstr), avg size 86.4 bytes
2453 │ │ Allocated at {
2454 │ │ #2: b3()
2455 │ │ }
2456 │ │ }
2457 │ │ ├─▼ PP 1.1.1.1/2 (2 children) {
2458 │ │ │ Total: 3 blocks (33.33%, 150/Minstr), avg size 74.33 bytes
2459 │ │ │ Allocated at {
2460 │ │ │ #3: c3()
2461 │ │ │ }
2462 │ │ │ }
2463 │ │ │ ├── PP 1.1.1.1.1/2 {
2464 │ │ │ │ Total: 2 blocks (22.22%, 100/Minstr), avg size 106.5 bytes
2465 │ │ │ │ Allocated at {
2466 │ │ │ │ [2 insignificant]
2467 │ │ │ │ }
2468 │ │ │ │ }
2469 │ │ │ └── PP 1.1.1.1.2/2 {
2470 │ │ │ Total: 10 bytes (1.19%, 500/Minstr) in 1 blocks (11.11%, 50/Minstr), avg size 10 bytes, avg lifetime 1,000 instrs (5% of program duration)
2471 │ │ │ Max: 10 bytes in 1 blocks, avg size 10 bytes
2472 │ │ │ At t-gmax: 10 bytes (1.19%) in 1 blocks (11.11%), avg size 10 bytes
2473 │ │ │ At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
2474 │ │ │ Reads: 0 bytes (0%, 0/Minstr), 0/byte
2475 │ │ │ Writes: 0 bytes (0%, 0/Minstr), 0/byte
2476 │ │ │ Accesses: {
2477 │ │ │ [ 0] - - - - - - - - - -
2478 │ │ │ }
2479 │ │ │ Allocated at {
2480 │ │ │ ^1: a3()
2481 │ │ │ ^2: b3()
2482 │ │ │ ^3: c3()
2483 │ │ │ #4: d1()
2484 │ │ │ }
2485 │ │ │ }
2486 │ │ └── PP 1.1.1.2/2 {
2487 │ │ Total: 2 blocks (22.22%, 100/Minstr), avg size 104.5 bytes
2488 │ │ Allocated at {
2489 │ │ [2 insignificant]
2490 │ │ }
2491 │ │ }
2492 │ └── PP 1.1.2/2 {
2493 │ Total: 2 blocks (22.22%, 100/Minstr), avg size 102.5 bytes
2494 │ Allocated at {
2495 │ [2 insignificant]
2496 │ }
2497 │ }
2498 └── PP 1.2/2 {
2499 Total: 2 blocks (22.22%, 100/Minstr), avg size 100.5 bytes
2500 Allocated at {
2501 [2 insignificant]
2505 PP significance threshold: (total >= 0.05 blocks (0.5%)) && (avg size <= 16 bytes)
2507 //---------------------------------------------------------------------------
2511 tests.push(sig2);
2513 //---------------------------------------------------------------------------
2514 // copy (corresponds to dhat/tests/copy.c, with `pps` elements for copies
2515 // from system libs removed, but with no removal to `fbtl` elements)
2516 //---------------------------------------------------------------------------
2518 let copy = {
2519 name: "copy",
2520 input:
2521 //---------------------------------------------------------------------------
2522 {"dhatFileVersion":2
2523 ,"mode":"copy","verb":"Copied"
2524 ,"bklt":false,"bkacc":false
2525 ,"tu":"instrs","Mtu":"Minstr"
2526 ,"cmd":"./copy"
2527 ,"pid":8568
2528 ,"te":4033604
2529 ,"pps":
2530 [{"tb":100000,"tbk":100
2531 ,"fs":[19,20,21]
2533 ,{"tb":100000,"tbk":100
2534 ,"fs":[19,22,21]
2536 ,{"tb":100000,"tbk":100
2537 ,"fs":[19,23,21]
2539 ,{"tb":100000,"tbk":100
2540 ,"fs":[24,25,21]
2542 ,{"tb":100000,"tbk":100
2543 ,"fs":[19,26,21]
2545 ,{"tb":100000,"tbk":100
2546 ,"fs":[27,28,21]
2548 ,{"tb":100000,"tbk":100
2549 ,"fs":[29,30,21]
2551 ,{"tb":100000,"tbk":100
2552 ,"fs":[27,31,21]
2554 ,{"tb":100000,"tbk":100
2555 ,"fs":[32,33,21]
2557 ,{"tb":100000,"tbk":100
2558 ,"fs":[34,35,21]
2561 ,"ftbl":
2562 ["[root]"
2563 ,"0x4843690: mempcpy (vg_replace_strmem.c:1566)"
2564 ,"0x4008B4F: open_path (dl-load.c:1810)"
2565 ,"0x400A7A2: _dl_map_object (dl-load.c:2067)"
2566 ,"0x400F504: openaux (dl-deps.c:64)"
2567 ,"0x401DC19: _dl_catch_exception (dl-error-skeleton.c:208)"
2568 ,"0x400F952: _dl_map_object_deps (dl-deps.c:248)"
2569 ,"0x4004063: dl_main (rtld.c:1805)"
2570 ,"0x401CBAA: _dl_sysdep_start (dl-sysdep.c:252)"
2571 ,"0x400204B: _dl_start_final (rtld.c:449)"
2572 ,"0x400204B: _dl_start (rtld.c:539)"
2573 ,"0x4001107: ??? (in /lib/x86_64-linux-gnu/ld-2.31.so)"
2574 ,"0x4008BCC: open_path (dl-load.c:1818)"
2575 ,"0x4008BE2: open_path (dl-load.c:1818)"
2576 ,"0x400D4B4: _dl_new_object (dl-object.c:242)"
2577 ,"0x4006E96: _dl_map_object_from_fd (dl-load.c:997)"
2578 ,"0x400A61A: _dl_map_object (dl-load.c:2236)"
2579 ,"0x401486E: _dl_allocate_tls_init (dl-tls.c:507)"
2580 ,"0x400469D: dl_main (rtld.c:2292)"
2581 ,"0x4842524: memmove (vg_replace_strmem.c:1289)"
2582 ,"0x10930E: f (copy.c:40)"
2583 ,"0x1092C9: main (copy.c:31)"
2584 ,"0x109326: f (copy.c:41)"
2585 ,"0x10933E: f (copy.c:42)"
2586 ,"0x4843390: mempcpy (vg_replace_strmem.c:1562)"
2587 ,"0x109356: f (copy.c:43)"
2588 ,"0x10936E: f (copy.c:44)"
2589 ,"0x483EBB0: strcpy (vg_replace_strmem.c:523)"
2590 ,"0x109381: f (copy.c:45)"
2591 ,"0x483ECD7: strncpy (vg_replace_strmem.c:564)"
2592 ,"0x109399: f (copy.c:46)"
2593 ,"0x1093AC: f (copy.c:47)"
2594 ,"0x4842368: stpncpy (vg_replace_strmem.c:1219)"
2595 ,"0x1093C4: f (copy.c:48)"
2596 ,"0x4843DD2: wcscpy (vg_replace_strmem.c:2018)"
2597 ,"0x1093D7: f (copy.c:49)"
2600 //---------------------------------------------------------------------------
2602 outputs: [
2604 label: "Total (blocks)",
2605 expected:
2606 //---------------------------------------------------------------------------
2608 Invocation {
2609 Mode: copy
2610 Command: ./copy
2611 PID: 8568
2614 Times {
2615 t-end: 4,033,604 instrs
2618 ▼ PP 1/1 (6 children) {
2619 Total: 1,000,000 bytes (100%, 247,917.25/Minstr) in 1,000 blocks (100%, 247.92/Minstr), avg size 1,000 bytes
2620 Copied at {
2621 #0: [root]
2624 ├─▼ PP 1.1/6 (4 children) {
2625 │ Total: 400,000 bytes (40%, 99,166.9/Minstr) in 400 blocks (40%, 99.17/Minstr), avg size 1,000 bytes
2626 │ Copied at {
2627 │ #1: 0x4842524: memmove (vg_replace_strmem.c:1289)
2628 │ }
2629 │ }
2630 │ ├── PP 1.1.1/4 {
2631 │ │ Total: 100,000 bytes (10%, 24,791.72/Minstr) in 100 blocks (10%, 24.79/Minstr), avg size 1,000 bytes
2632 │ │ Copied at {
2633 │ │ ^1: 0x4842524: memmove (vg_replace_strmem.c:1289)
2634 │ │ #2: 0x10930E: f (copy.c:40)
2635 │ │ #3: 0x1092C9: main (copy.c:31)
2636 │ │ }
2637 │ │ }
2638 │ ├── PP 1.1.2/4 {
2639 │ │ Total: 100,000 bytes (10%, 24,791.72/Minstr) in 100 blocks (10%, 24.79/Minstr), avg size 1,000 bytes
2640 │ │ Copied at {
2641 │ │ ^1: 0x4842524: memmove (vg_replace_strmem.c:1289)
2642 │ │ #2: 0x109326: f (copy.c:41)
2643 │ │ #3: 0x1092C9: main (copy.c:31)
2644 │ │ }
2645 │ │ }
2646 │ ├── PP 1.1.3/4 {
2647 │ │ Total: 100,000 bytes (10%, 24,791.72/Minstr) in 100 blocks (10%, 24.79/Minstr), avg size 1,000 bytes
2648 │ │ Copied at {
2649 │ │ ^1: 0x4842524: memmove (vg_replace_strmem.c:1289)
2650 │ │ #2: 0x10933E: f (copy.c:42)
2651 │ │ #3: 0x1092C9: main (copy.c:31)
2652 │ │ }
2653 │ │ }
2654 │ └── PP 1.1.4/4 {
2655 │ Total: 100,000 bytes (10%, 24,791.72/Minstr) in 100 blocks (10%, 24.79/Minstr), avg size 1,000 bytes
2656 │ Copied at {
2657 │ ^1: 0x4842524: memmove (vg_replace_strmem.c:1289)
2658 │ #2: 0x10936E: f (copy.c:44)
2659 │ #3: 0x1092C9: main (copy.c:31)
2660 │ }
2661 │ }
2662 ├─▼ PP 1.2/6 (2 children) {
2663 │ Total: 200,000 bytes (20%, 49,583.45/Minstr) in 200 blocks (20%, 49.58/Minstr), avg size 1,000 bytes
2664 │ Copied at {
2665 │ #1: 0x483EBB0: strcpy (vg_replace_strmem.c:523)
2666 │ }
2667 │ }
2668 │ ├── PP 1.2.1/2 {
2669 │ │ Total: 100,000 bytes (10%, 24,791.72/Minstr) in 100 blocks (10%, 24.79/Minstr), avg size 1,000 bytes
2670 │ │ Copied at {
2671 │ │ ^1: 0x483EBB0: strcpy (vg_replace_strmem.c:523)
2672 │ │ #2: 0x109381: f (copy.c:45)
2673 │ │ #3: 0x1092C9: main (copy.c:31)
2674 │ │ }
2675 │ │ }
2676 │ └── PP 1.2.2/2 {
2677 │ Total: 100,000 bytes (10%, 24,791.72/Minstr) in 100 blocks (10%, 24.79/Minstr), avg size 1,000 bytes
2678 │ Copied at {
2679 │ ^1: 0x483EBB0: strcpy (vg_replace_strmem.c:523)
2680 │ #2: 0x1093AC: f (copy.c:47)
2681 │ #3: 0x1092C9: main (copy.c:31)
2682 │ }
2683 │ }
2684 ├── PP 1.3/6 {
2685 │ Total: 100,000 bytes (10%, 24,791.72/Minstr) in 100 blocks (10%, 24.79/Minstr), avg size 1,000 bytes
2686 │ Copied at {
2687 │ #1: 0x4843390: mempcpy (vg_replace_strmem.c:1562)
2688 │ #2: 0x109356: f (copy.c:43)
2689 │ #3: 0x1092C9: main (copy.c:31)
2690 │ }
2691 │ }
2692 ├── PP 1.4/6 {
2693 │ Total: 100,000 bytes (10%, 24,791.72/Minstr) in 100 blocks (10%, 24.79/Minstr), avg size 1,000 bytes
2694 │ Copied at {
2695 │ #1: 0x483ECD7: strncpy (vg_replace_strmem.c:564)
2696 │ #2: 0x109399: f (copy.c:46)
2697 │ #3: 0x1092C9: main (copy.c:31)
2698 │ }
2699 │ }
2700 ├── PP 1.5/6 {
2701 │ Total: 100,000 bytes (10%, 24,791.72/Minstr) in 100 blocks (10%, 24.79/Minstr), avg size 1,000 bytes
2702 │ Copied at {
2703 │ #1: 0x4842368: stpncpy (vg_replace_strmem.c:1219)
2704 │ #2: 0x1093C4: f (copy.c:48)
2705 │ #3: 0x1092C9: main (copy.c:31)
2706 │ }
2707 │ }
2708 └── PP 1.6/6 {
2709 Total: 100,000 bytes (10%, 24,791.72/Minstr) in 100 blocks (10%, 24.79/Minstr), avg size 1,000 bytes
2710 Copied at {
2711 #1: 0x4843DD2: wcscpy (vg_replace_strmem.c:2018)
2712 #2: 0x1093D7: f (copy.c:49)
2713 #3: 0x1092C9: main (copy.c:31)
2717 PP significance threshold: total >= 10 blocks (1%)
2719 //---------------------------------------------------------------------------
2723 tests.push(copy);
2725 //---------------------------------------------------------------------------
2726 // ad-hoc (corresponds to dhat/tests/ad-hoc.c)
2727 //---------------------------------------------------------------------------
2729 let ad_hoc = {
2730 name: "ad_hoc",
2731 input:
2732 //---------------------------------------------------------------------------
2733 {"dhatFileVersion":2
2734 ,"mode":"ad-hoc","verb":"Occurred"
2735 ,"bklt":false,"bkacc":false
2736 ,"bu":"unit","bsu":"units","bksu":"events"
2737 ,"tu":"instrs","Mtu":"Minstr"
2738 ,"cmd":"./ad-hoc"
2739 ,"pid":26995
2740 ,"te":150455
2741 ,"pps":
2742 [{"tb":30,"tbk":1
2743 ,"fs":[1,2,3]
2745 ,{"tb":20,"tbk":1
2746 ,"fs":[4,3]
2748 ,{"tb":30,"tbk":1
2749 ,"fs":[1,5,3]
2751 ,{"tb":10,"tbk":1
2752 ,"fs":[6]
2754 ,{"tb":30,"tbk":1
2755 ,"fs":[1,2,7]
2757 ,{"tb":20,"tbk":1
2758 ,"fs":[4,7]
2760 ,{"tb":30,"tbk":1
2761 ,"fs":[1,5,7]
2764 ,"ftbl":
2765 ["[root]"
2766 ,"0x1093A7: g (ad-hoc.c:4)"
2767 ,"0x1093C5: f (ad-hoc.c:8)"
2768 ,"0x109437: main (ad-hoc.c:14)"
2769 ,"0x109414: f (ad-hoc.c:9)"
2770 ,"0x109423: f (ad-hoc.c:10)"
2771 ,"0x109486: main (ad-hoc.c:15)"
2772 ,"0x109495: main (ad-hoc.c:16)"
2775 //---------------------------------------------------------------------------
2777 outputs: [
2779 label: "Total (events)",
2780 expected:
2781 //---------------------------------------------------------------------------
2783 Invocation {
2784 Mode: ad-hoc
2785 Command: ./ad-hoc
2786 PID: 26995
2789 Times {
2790 t-end: 150,455 instrs
2793 ▼ PP 1/1 (3 children) {
2794 Total: 170 units (100%, 1,129.91/Minstr) in 7 events (100%, 46.53/Minstr), avg size 24.29 units
2795 Occurred at {
2796 #0: [root]
2799 ├─▼ PP 1.1/3 (2 children) {
2800 │ Total: 120 units (70.59%, 797.58/Minstr) in 4 events (57.14%, 26.59/Minstr), avg size 30 units
2801 │ Occurred at {
2802 │ #1: 0x1093A7: g (ad-hoc.c:4)
2803 │ }
2804 │ }
2805 │ ├─▼ PP 1.1.1/2 (2 children) {
2806 │ │ Total: 60 units (35.29%, 398.79/Minstr) in 2 events (28.57%, 13.29/Minstr), avg size 30 units
2807 │ │ Occurred at {
2808 │ │ ^1: 0x1093A7: g (ad-hoc.c:4)
2809 │ │ #2: 0x1093C5: f (ad-hoc.c:8)
2810 │ │ }
2811 │ │ }
2812 │ │ ├── PP 1.1.1.1/2 {
2813 │ │ │ Total: 30 units (17.65%, 199.4/Minstr) in 1 events (14.29%, 6.65/Minstr), avg size 30 units
2814 │ │ │ Occurred at {
2815 │ │ │ ^1: 0x1093A7: g (ad-hoc.c:4)
2816 │ │ │ ^2: 0x1093C5: f (ad-hoc.c:8)
2817 │ │ │ #3: 0x109437: main (ad-hoc.c:14)
2818 │ │ │ }
2819 │ │ │ }
2820 │ │ └── PP 1.1.1.2/2 {
2821 │ │ Total: 30 units (17.65%, 199.4/Minstr) in 1 events (14.29%, 6.65/Minstr), avg size 30 units
2822 │ │ Occurred at {
2823 │ │ ^1: 0x1093A7: g (ad-hoc.c:4)
2824 │ │ ^2: 0x1093C5: f (ad-hoc.c:8)
2825 │ │ #3: 0x109495: main (ad-hoc.c:16)
2826 │ │ }
2827 │ │ }
2828 │ └─▼ PP 1.1.2/2 (2 children) {
2829 │ Total: 60 units (35.29%, 398.79/Minstr) in 2 events (28.57%, 13.29/Minstr), avg size 30 units
2830 │ Occurred at {
2831 │ ^1: 0x1093A7: g (ad-hoc.c:4)
2832 │ #2: 0x109423: f (ad-hoc.c:10)
2833 │ }
2834 │ }
2835 │ ├── PP 1.1.2.1/2 {
2836 │ │ Total: 30 units (17.65%, 199.4/Minstr) in 1 events (14.29%, 6.65/Minstr), avg size 30 units
2837 │ │ Occurred at {
2838 │ │ ^1: 0x1093A7: g (ad-hoc.c:4)
2839 │ │ ^2: 0x109423: f (ad-hoc.c:10)
2840 │ │ #3: 0x109437: main (ad-hoc.c:14)
2841 │ │ }
2842 │ │ }
2843 │ └── PP 1.1.2.2/2 {
2844 │ Total: 30 units (17.65%, 199.4/Minstr) in 1 events (14.29%, 6.65/Minstr), avg size 30 units
2845 │ Occurred at {
2846 │ ^1: 0x1093A7: g (ad-hoc.c:4)
2847 │ ^2: 0x109423: f (ad-hoc.c:10)
2848 │ #3: 0x109495: main (ad-hoc.c:16)
2849 │ }
2850 │ }
2851 ├─▼ PP 1.2/3 (2 children) {
2852 │ Total: 40 units (23.53%, 265.86/Minstr) in 2 events (28.57%, 13.29/Minstr), avg size 20 units
2853 │ Occurred at {
2854 │ #1: 0x109414: f (ad-hoc.c:9)
2855 │ }
2856 │ }
2857 │ ├── PP 1.2.1/2 {
2858 │ │ Total: 20 units (11.76%, 132.93/Minstr) in 1 events (14.29%, 6.65/Minstr), avg size 20 units
2859 │ │ Occurred at {
2860 │ │ ^1: 0x109414: f (ad-hoc.c:9)
2861 │ │ #2: 0x109437: main (ad-hoc.c:14)
2862 │ │ }
2863 │ │ }
2864 │ └── PP 1.2.2/2 {
2865 │ Total: 20 units (11.76%, 132.93/Minstr) in 1 events (14.29%, 6.65/Minstr), avg size 20 units
2866 │ Occurred at {
2867 │ ^1: 0x109414: f (ad-hoc.c:9)
2868 │ #2: 0x109495: main (ad-hoc.c:16)
2869 │ }
2870 │ }
2871 └── PP 1.3/3 {
2872 Total: 10 units (5.88%, 66.47/Minstr) in 1 events (14.29%, 6.65/Minstr), avg size 10 units
2873 Occurred at {
2874 #1: 0x109486: main (ad-hoc.c:15)
2878 PP significance threshold: total >= 0.07 events (1%)
2880 //---------------------------------------------------------------------------
2884 tests.push(ad_hoc);
2886 //---------------------------------------------------------------------------
2887 // rust-heap. Input came from this Rust program:
2889 // use dhat::{Dhat, DhatAlloc};
2890 // #[global_allocator]
2891 // static ALLOC: DhatAlloc = DhatAlloc;
2892 // fn main() {
2893 // let _dhat = Dhat::start_heap_profiling();
2894 // let _v: Vec<u8> = Vec::with_capacity(1000);
2895 // }
2896 //---------------------------------------------------------------------------
2898 let rust_heap = {
2899 name: "rust_heap",
2900 input:
2901 //---------------------------------------------------------------------------
2903 "dhatFileVersion": 2,
2904 "mode": "rust-heap",
2905 "verb": "Allocated",
2906 "bklt": true,
2907 "bkacc": false,
2908 "tu": "µs",
2909 "Mtu": "s",
2910 "tuth": 10,
2911 "cmd": "target/debug/dhatter",
2912 "pid": 85218,
2913 "tg": 174,
2914 "te": 201,
2915 "pps": [
2917 "tb": 1000,
2918 "tbk": 1,
2919 "tl": 16,
2920 "mb": 1000,
2921 "mbk": 1,
2922 "gb": 1000,
2923 "gbk": 1,
2924 "eb": 0,
2925 "ebk": 0,
2926 "fs": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
2929 "ftbl": [
2930 "[root]",
2931 "0x10e13fb2b: <alloc::alloc::Global as core::alloc::AllocRef>::alloc (alloc.rs:203:9)",
2932 "0x10e13cae4: alloc::raw_vec::RawVec<T,A>::allocate_in (raw_vec.rs:186:45)",
2933 "0x10e13d09d: alloc::raw_vec::RawVec<T,A>::with_capacity_in (raw_vec.rs:161:9)",
2934 "0x10e13c921: alloc::raw_vec::RawVec<T>::with_capacity (raw_vec.rs:92:9)",
2935 "0x10e13f40f: alloc::vec::Vec<T>::with_capacity (vec.rs:355:20)",
2936 "0x10e067a08: dhatter::main (main.rs:8:23)",
2937 "0x10e06794e: core::ops::function::FnOnce::call_once (function.rs:227:5)",
2938 "0x10e067801: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:137:18)",
2939 "0x10e0677d4: std::rt::lang_start::{{closure}} (rt.rs:66:18)",
2940 "0x10e17b220: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once (function.rs:259:13)",
2941 "0x10e17b220: std::panicking::try::do_call (panicking.rs:373:40)",
2942 "0x10e17b220: std::panicking::try (panicking.rs:337:19)",
2943 "0x10e17b220: std::panic::catch_unwind (panic.rs:379:14)",
2944 "0x10e17b220: std::rt::lang_start_internal (rt.rs:51:25)",
2945 "0x10e0677b1: std::rt::lang_start (rt.rs:65:5)",
2946 "0x10e067bb2: _main (???:0:0)"
2949 //---------------------------------------------------------------------------
2951 outputs: [
2953 label: "Total (blocks)",
2954 expected:
2955 //---------------------------------------------------------------------------
2957 Invocation {
2958 Mode: rust-heap
2959 Command: target/debug/dhatter
2960 PID: 85218
2963 Times {
2964 t-gmax: 174 µs (86.57% of program duration)
2965 t-end: 201 µs
2968 ─ PP 1/1 {
2969 Total: 1,000 bytes (100%, 4,975,124.38/s) in 1 blocks (100%, 4,975.12/s), avg size 1,000 bytes, avg lifetime 16 µs (7.96% of program duration)
2970 At t-gmax: 1,000 bytes (100%) in 1 blocks (100%), avg size 1,000 bytes
2971 At t-end: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
2972 Allocated at {
2973 #0: [root]
2974 #1: 0x10e13fb2b: <alloc::alloc::Global as core::alloc::AllocRef>::alloc (alloc.rs:203:9)
2975 #2: 0x10e13cae4: alloc::raw_vec::RawVec<T,A>::allocate_in (raw_vec.rs:186:45)
2976 #3: 0x10e13d09d: alloc::raw_vec::RawVec<T,A>::with_capacity_in (raw_vec.rs:161:9)
2977 #4: 0x10e13c921: alloc::raw_vec::RawVec<T>::with_capacity (raw_vec.rs:92:9)
2978 #5: 0x10e13f40f: alloc::vec::Vec<T>::with_capacity (vec.rs:355:20)
2979 #6: 0x10e067a08: dhatter::main (main.rs:8:23)
2980 #7: 0x10e06794e: core::ops::function::FnOnce::call_once (function.rs:227:5)
2981 #8: 0x10e067801: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:137:18)
2982 #9: 0x10e0677d4: std::rt::lang_start::{{closure}} (rt.rs:66:18)
2983 #10: 0x10e17b220: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once (function.rs:259:13)
2984 #11: 0x10e17b220: std::panicking::try::do_call (panicking.rs:373:40)
2985 #12: 0x10e17b220: std::panicking::try (panicking.rs:337:19)
2986 #13: 0x10e17b220: std::panic::catch_unwind (panic.rs:379:14)
2987 #14: 0x10e17b220: std::rt::lang_start_internal (rt.rs:51:25)
2988 #15: 0x10e0677b1: std::rt::lang_start (rt.rs:65:5)
2989 #16: 0x10e067bb2: _main (???:0:0)
2993 PP significance threshold: total >= 0.01 blocks (1%)
2995 //---------------------------------------------------------------------------
2999 tests.push(rust_heap);
3001 //---------------------------------------------------------------------------
3002 // Code
3003 //---------------------------------------------------------------------------
3005 function runTests() {
3006 let pre = appendElement(gTestingDiv, "pre");
3008 for (let [i, test] of tests.entries()) {
3009 let name = test.name;
3010 gData = test.input;
3012 for (let output of test.outputs) {
3013 // Set the sort metric.
3014 let label = output.label;
3015 let j = 0;
3016 let labelFound = false;
3017 for (let opt of gSelect.options) {
3018 if (gSelectData[opt.value].label() == label) {
3019 gSelect.selectedIndex = j;
3020 labelFound = true;
3021 break;
3023 j++;
3025 assert(labelFound, `test label not found in gSelectData: ${label}`);
3027 // Build and display the tree.
3028 tryFunc(() => {
3029 gFilename = "TEST MODE";
3030 buildTree();
3031 displayTree();
3034 // Compare actual text output against expected.
3035 let expected = output.expected;
3036 let actual = gMainDiv.textContent;
3038 let id = `Test ${i} - ${test.name} - ${label}`;
3040 if (expected !== actual) {
3041 // Test failed. Do a crude diff: find the line and column of the first
3042 // char that differs.
3043 let j = 0, line = 1, col = 1;
3044 while (expected[j] === actual[j]) {
3045 if (expected[j] === "\n") {
3046 line++;
3047 col = 1;
3048 } else {
3049 col++;
3051 j++;
3054 let s = `\
3055 FAIL - ${id}
3057 Expected length: ${expected.length}, actual length: ${actual.length}
3058 First differing char at ${line}:${col}
3060 EXPECTED OUTPUT
3064 // Print line numbers for the expected output, because it makes it much
3065 // easier to find the first differing char.
3066 for (let [n, line] of expected.split('\n').entries()) {
3067 s += `${(n + 1).toString().padStart(3)} ${line}\n`;
3070 s += ">>>";
3072 appendElementWithText(pre, "div", s);
3073 return; // stop on the first failure
3076 // Test passed.
3077 appendElementWithText(pre, "div", `PASS - ${id}`);
3081 clearMainDivWithText("All tests passed");
3084 runTests();