Bug 418702 - ARMv8.1 Paired register compare-and-swap instructions are not supported.
[valgrind.git] / dhat / dh_test.js
blobeb238de7eb2509a9c2627fe72db90e1bbbd73498
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":1
64 ,"cmd":"./empty"
65 ,"pid":23431
66 ,"mi":0,"ei":248602
67 ,"aps":
68  [
69  ]
70 ,"ftbl":
71  ["[root]"
72  ]
74 //---------------------------------------------------------------------------
75   ,
76   outputs: [
77     {
78       label: "Total (bytes)",
79       expected:
80 //---------------------------------------------------------------------------
82 Invocation {
83   Command: ./empty
84   PID:     23431
87 Times {
88   t-gmax: 0 instrs (0% of program duration)
89   t-end:  248,602 instrs
92 ─ AP 1/1 {
93     Total:     0 bytes (0%, 0/Minstr) in 0 blocks (0%, 0/Minstr), avg size 0 bytes, avg lifetime 0 instrs (0% of program duration)
94     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
95     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
96     Reads:     0 bytes (0%, 0/Minstr), 0/byte
97     Writes:    0 bytes (0%, 0/Minstr), 0/byte
98     Allocated at {
99       #0: [root]
100     }
101   }
103 AP significance threshold: total >= 0 bytes (0%)
105 //---------------------------------------------------------------------------
106     }
107   ]
109 tests.push(empty);
111 //---------------------------------------------------------------------------
112 // single (corresponds to dhat/tests/single.c)
113 //---------------------------------------------------------------------------
115 let single = {
116   name: "single",
117   input:
118 //---------------------------------------------------------------------------
119 {"dhatFileVersion":1
120 ,"cmd":"./single"
121 ,"pid":30563
122 ,"mi":242900,"ei":249824
123 ,"aps":
124  [{"tb":16,"tbk":1,"tli":6924
125   ,"mb":16,"mbk":1
126   ,"gb":16,"gbk":1
127   ,"fb":16,"fbk":1
128   ,"rb":0,"wb":12
129   ,"acc":[-4,3,-12,0]
130   ,"fs":[1]
131   }
133 ,"ftbl":
134  ["[root]"
135  ,"0x10865B: main (single.cpp:4)"
138 //---------------------------------------------------------------------------
139   ,
140   outputs: [
141     {
142       label: "Total (bytes)",
143       expected:
144 //---------------------------------------------------------------------------
146 Invocation {
147   Command: ./single
148   PID:     30563
151 Times {
152   t-gmax: 242,900 instrs (97.23% of program duration)
153   t-end:  249,824 instrs
156 ─ AP 1/1 {
157     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)
158     At t-gmax: 16 bytes (100%) in 1 blocks (100%), avg size 16 bytes
159     At t-end:  16 bytes (100%) in 1 blocks (100%), avg size 16 bytes
160     Reads:     0 bytes (0%, 0/Minstr), 0/byte
161     Writes:    12 bytes (100%, 48.03/Minstr), 0.75/byte
162     Accesses: {
163       [  0]  3 〃 〃 〃 - - - - - - - - - - - - 
164     }
165     Allocated at {
166       #0: [root]
167       #1: 0x10865B: main (single.cpp:4)
168     }
169   }
171 AP significance threshold: total >= 0.16 bytes (1%)
173 //---------------------------------------------------------------------------
174     }
175   ]
177 tests.push(single);
179 //---------------------------------------------------------------------------
180 // subseqs (a synthetic test for locations that are subsequences of other
181 // locations, which are rare but can happen in practice, esp. with recursion)
182 //---------------------------------------------------------------------------
184 let subseqs = {
185   name: "subseqs",
186   input:
187 //---------------------------------------------------------------------------
188 {"dhatFileVersion":1
189 ,"cmd":"subseqs"
190 ,"pid":0
191 ,"mi":10000,"ei":20000
192 ,"aps":
193  [{"tb":15,"tbk":1,"tli":1000
194   ,"mb":15,"mbk":1
195   ,"gb":15,"gbk":1
196   ,"fb":0,"fbk":0
197   ,"rb":0,"wb":0
198   ,"acc":[-15,0]
199   ,"fs":[1,2,3]
200   }
201  ,{"tb":14,"tbk":1,"tli":1000
202   ,"mb":14,"mbk":1
203   ,"gb":14,"gbk":1
204   ,"fb":0,"fbk":0
205   ,"rb":0,"wb":0
206   ,"acc":[-14,0]
207   ,"fs":[1,2,3,3]
208   }
209  ,{"tb":13,"tbk":1,"tli":1000
210   ,"mb":13,"mbk":1
211   ,"gb":13,"gbk":1
212   ,"fb":0,"fbk":0
213   ,"rb":0,"wb":0
214   ,"acc":[-13,0]
215   ,"fs":[1,2,3,3,3]
216   }
217  ,{"tb":12,"tbk":1,"tli":1000
218   ,"mb":12,"mbk":1
219   ,"gb":12,"gbk":1
220   ,"fb":0,"fbk":0
221   ,"rb":0,"wb":0
222   ,"acc":[-12,0]
223   ,"fs":[4,5,6,6,6]
224   }
225  ,{"tb":11,"tbk":1,"tli":1000
226   ,"mb":11,"mbk":1
227   ,"gb":11,"gbk":1
228   ,"fb":0,"fbk":0
229   ,"rb":0,"wb":0
230   ,"acc":[-11,0]
231   ,"fs":[4,5,6,6]
232   }
233  ,{"tb":10,"tbk":1,"tli":1000
234   ,"mb":10,"mbk":1
235   ,"gb":10,"gbk":1
236   ,"fb":0,"fbk":0
237   ,"rb":0,"wb":0
238   ,"acc":[-10,0]
239   ,"fs":[4,5,6]
240   }
241  ,{"tb":9,"tbk":1,"tli":1000
242   ,"mb":9,"mbk":1
243   ,"gb":9,"gbk":1
244   ,"fb":0,"fbk":0
245   ,"rb":0,"wb":0
246   ,"acc":[-9,0]
247   ,"fs":[7,8,9]
248   }
249  ,{"tb":8,"tbk":1,"tli":1000
250   ,"mb":8,"mbk":1
251   ,"gb":8,"gbk":1
252   ,"fb":0,"fbk":0
253   ,"rb":0,"wb":0
254   ,"acc":[-8,0]
255   ,"fs":[7,8,10]
256   }
257  ,{"tb":7,"tbk":1,"tli":1000
258   ,"mb":7,"mbk":1
259   ,"gb":7,"gbk":1
260   ,"fb":0,"fbk":0
261   ,"rb":0,"wb":0
262   ,"acc":[-7,0]
263   ,"fs":[7,8]
264   }
266 ,"ftbl":
267  ["[root]"
268  ,"a()"
269  ,"b()"
270  ,"c()"
271  ,"d()"
272  ,"e()"
273  ,"f()"
274  ,"g()"
275  ,"h()"
276  ,"i()"
277  ,"j()"
280 //---------------------------------------------------------------------------
281   ,
282   outputs: [
283     {
284       label: "Total (bytes)",
285       expected:
286 //---------------------------------------------------------------------------
288 Invocation {
289   Command: subseqs
290   PID:     0
293 Times {
294   t-gmax: 10,000 instrs (50% of program duration)
295   t-end:  20,000 instrs
298 ▼ AP 1/1 (3 children) {
299     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)
300     At t-gmax: 99 bytes (100%) in 9 blocks (100%), avg size 11 bytes
301     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
302     Reads:     0 bytes (0%, 0/Minstr), 0/byte
303     Writes:    0 bytes (0%, 0/Minstr), 0/byte
304     Allocated at {
305       #0: [root]
306     }
307   }
308   ├─▼ AP 1.1/3 (2 children) {
309   │     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)
310   │     At t-gmax: 42 bytes (42.42%) in 3 blocks (33.33%), avg size 14 bytes
311   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
312   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
313   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
314   │     Allocated at {
315   │       #1: a()
316   │       #2: b()
317   │       #3: c()
318   │     }
319   │   }
320   │   ├─▼ AP 1.1.1/2 (2 children) {
321   │   │     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)
322   │   │     At t-gmax: 27 bytes (27.27%) in 2 blocks (22.22%), avg size 13.5 bytes
323   │   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
324   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
325   │   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
326   │   │     Allocated at {
327   │   │       ^1: a()
328   │   │       ^2: b()
329   │   │       ^3: c()
330   │   │       #4: c()
331   │   │     }
332   │   │   }
333   │   │   ├── AP 1.1.1.1/2 {
334   │   │   │     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)
335   │   │   │     Max:       14 bytes in 1 blocks, avg size 14 bytes
336   │   │   │     At t-gmax: 14 bytes (14.14%) in 1 blocks (11.11%), avg size 14 bytes
337   │   │   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
338   │   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
339   │   │   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
340   │   │   │     Accesses: {
341   │   │   │       [  0]  - - - - - - - - - - - - - - 
342   │   │   │     }
343   │   │   │     Allocated at {
344   │   │   │       ^1: a()
345   │   │   │       ^2: b()
346   │   │   │       ^3: c()
347   │   │   │       ^4: c()
348   │   │   │     }
349   │   │   │   }
350   │   │   └── AP 1.1.1.2/2 {
351   │   │         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)
352   │   │         Max:       13 bytes in 1 blocks, avg size 13 bytes
353   │   │         At t-gmax: 13 bytes (13.13%) in 1 blocks (11.11%), avg size 13 bytes
354   │   │         At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
355   │   │         Reads:     0 bytes (0%, 0/Minstr), 0/byte
356   │   │         Writes:    0 bytes (0%, 0/Minstr), 0/byte
357   │   │         Accesses: {
358   │   │           [  0]  - - - - - - - - - - - - - 
359   │   │         }
360   │   │         Allocated at {
361   │   │           ^1: a()
362   │   │           ^2: b()
363   │   │           ^3: c()
364   │   │           ^4: c()
365   │   │           #5: c()
366   │   │         }
367   │   │       }
368   │   └── AP 1.1.2/2 {
369   │         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)
370   │         Max:       15 bytes in 1 blocks, avg size 15 bytes
371   │         At t-gmax: 15 bytes (15.15%) in 1 blocks (11.11%), avg size 15 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   │         }
383   │       }
384   ├─▼ AP 1.2/3 (2 children) {
385   │     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)
386   │     At t-gmax: 33 bytes (33.33%) in 3 blocks (33.33%), avg size 11 bytes
387   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
388   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
389   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
390   │     Allocated at {
391   │       #1: d()
392   │       #2: e()
393   │       #3: f()
394   │     }
395   │   }
396   │   ├─▼ AP 1.2.1/2 (2 children) {
397   │   │     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)
398   │   │     At t-gmax: 23 bytes (23.23%) in 2 blocks (22.22%), avg size 11.5 bytes
399   │   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
400   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
401   │   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
402   │   │     Allocated at {
403   │   │       ^1: d()
404   │   │       ^2: e()
405   │   │       ^3: f()
406   │   │       #4: f()
407   │   │     }
408   │   │   }
409   │   │   ├── AP 1.2.1.1/2 {
410   │   │   │     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)
411   │   │   │     Max:       12 bytes in 1 blocks, avg size 12 bytes
412   │   │   │     At t-gmax: 12 bytes (12.12%) in 1 blocks (11.11%), avg size 12 bytes
413   │   │   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
414   │   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
415   │   │   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
416   │   │   │     Accesses: {
417   │   │   │       [  0]  - - - - - - - - - - - - 
418   │   │   │     }
419   │   │   │     Allocated at {
420   │   │   │       ^1: d()
421   │   │   │       ^2: e()
422   │   │   │       ^3: f()
423   │   │   │       ^4: f()
424   │   │   │       #5: f()
425   │   │   │     }
426   │   │   │   }
427   │   │   └── AP 1.2.1.2/2 {
428   │   │         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)
429   │   │         Max:       11 bytes in 1 blocks, avg size 11 bytes
430   │   │         At t-gmax: 11 bytes (11.11%) in 1 blocks (11.11%), avg size 11 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   │   │         }
443   │   │       }
444   │   └── AP 1.2.2/2 {
445   │         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)
446   │         Max:       10 bytes in 1 blocks, avg size 10 bytes
447   │         At t-gmax: 10 bytes (10.1%) in 1 blocks (11.11%), avg size 10 bytes
448   │         At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
449   │         Reads:     0 bytes (0%, 0/Minstr), 0/byte
450   │         Writes:    0 bytes (0%, 0/Minstr), 0/byte
451   │         Accesses: {
452   │           [  0]  - - - - - - - - - - 
453   │         }
454   │         Allocated at {
455   │           ^1: d()
456   │           ^2: e()
457   │           ^3: f()
458   │         }
459   │       }
460   └─▼ AP 1.3/3 (3 children) {
461         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)
462         At t-gmax: 24 bytes (24.24%) in 3 blocks (33.33%), avg size 8 bytes
463         At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
464         Reads:     0 bytes (0%, 0/Minstr), 0/byte
465         Writes:    0 bytes (0%, 0/Minstr), 0/byte
466         Allocated at {
467           #1: g()
468           #2: h()
469         }
470       }
471       ├── AP 1.3.1/3 {
472       │     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)
473       │     Max:       9 bytes in 1 blocks, avg size 9 bytes
474       │     At t-gmax: 9 bytes (9.09%) in 1 blocks (11.11%), avg size 9 bytes
475       │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
476       │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
477       │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
478       │     Accesses: {
479       │       [  0]  - - - - - - - - - 
480       │     }
481       │     Allocated at {
482       │       ^1: g()
483       │       ^2: h()
484       │       #3: i()
485       │     }
486       │   }
487       ├── AP 1.3.2/3 {
488       │     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)
489       │     Max:       8 bytes in 1 blocks, avg size 8 bytes
490       │     At t-gmax: 8 bytes (8.08%) in 1 blocks (11.11%), avg size 8 bytes
491       │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
492       │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
493       │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
494       │     Accesses: {
495       │       [  0]  - - - - - - - - 
496       │     }
497       │     Allocated at {
498       │       ^1: g()
499       │       ^2: h()
500       │       #3: j()
501       │     }
502       │   }
503       └── AP 1.3.3/3 {
504             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)
505             Max:       7 bytes in 1 blocks, avg size 7 bytes
506             At t-gmax: 7 bytes (7.07%) in 1 blocks (11.11%), avg size 7 bytes
507             At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
508             Reads:     0 bytes (0%, 0/Minstr), 0/byte
509             Writes:    0 bytes (0%, 0/Minstr), 0/byte
510             Accesses: {
511               [  0]  - - - - - - - 
512             }
513             Allocated at {
514               ^1: g()
515               ^2: h()
516             }
517           }
519 AP significance threshold: total >= 0.99 bytes (1%)
521 //---------------------------------------------------------------------------
522     }
523   ]
525 tests.push(subseqs);
527 //---------------------------------------------------------------------------
528 // acc (corresponds to dhat/tests/acc.c)
529 //---------------------------------------------------------------------------
531 let acc = {
532   name: "acc",
533   input:
534 //---------------------------------------------------------------------------
535 {"dhatFileVersion":1
536 ,"cmd":"./acc"
537 ,"pid":23513
538 ,"mi":265120,"ei":1337753
539 ,"aps":
540  [{"tb":32,"tbk":1,"tli":4751
541   ,"mb":32,"mbk":1
542   ,"gb":0,"gbk":0
543   ,"fb":0,"fbk":0
544   ,"rb":0,"wb":496
545   ,"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]
546   ,"fs":[1]
547   }
548  ,{"tb":20,"tbk":1,"tli":106
549   ,"mb":20,"mbk":1
550   ,"gb":0,"gbk":0
551   ,"fb":0,"fbk":0
552   ,"rb":4,"wb":48
553   ,"acc":[-4,2,-4,0,-4,1,-4,0,-4,10]
554   ,"fs":[2]
555   }
556  ,{"tb":33,"tbk":1,"tli":39
557   ,"mb":33,"mbk":1
558   ,"gb":0,"gbk":0
559   ,"fb":0,"fbk":0
560   ,"rb":0,"wb":1
561   ,"acc":[-32,0,1]
562   ,"fs":[3]
563   }
564  ,{"tb":1024,"tbk":1,"tli":15179
565   ,"mb":1024,"mbk":1
566   ,"gb":0,"gbk":0
567   ,"fb":0,"fbk":0
568   ,"rb":1024,"wb":1124
569   ,"acc":[-500,2,-100,3,-424,2]
570   ,"fs":[4]
571   }
572  ,{"tb":1025,"tbk":1,"tli":15415
573   ,"mb":1025,"mbk":1
574   ,"gb":1025,"gbk":1
575   ,"fb":0,"fbk":0
576   ,"rb":1025,"wb":1025
577   ,"fs":[5]
578   }
579  ,{"tb":100,"tbk":1,"tli":350084
580   ,"mb":100,"mbk":1
581   ,"gb":0,"gbk":0
582   ,"fb":0,"fbk":0
583   ,"rb":0,"wb":200000
584   ,"acc":[-4,50000,-96,0]
585   ,"fs":[6,7]
586   }
587  ,{"tb":100,"tbk":1,"tli":350072
588   ,"mb":100,"mbk":1
589   ,"gb":0,"gbk":0
590   ,"fb":0,"fbk":0
591   ,"rb":0,"wb":200000
592   ,"acc":[-4,50000,-96,0]
593   ,"fs":[6,8]
594   }
595  ,{"tb":100,"tbk":1,"tli":700084
596   ,"mb":100,"mbk":1
597   ,"gb":0,"gbk":0
598   ,"fb":0,"fbk":0
599   ,"rb":0,"wb":400000
600   ,"acc":[-4,65535,-96,0]
601   ,"fs":[9,10]
602   }
603  ,{"tb":100,"tbk":1,"tli":700072
604   ,"mb":100,"mbk":1
605   ,"gb":0,"gbk":0
606   ,"fb":0,"fbk":0
607   ,"rb":0,"wb":400000
608   ,"acc":[-4,65535,-96,0]
609   ,"fs":[9,11]
610   }
612 ,"ftbl":
613  ["[root]"
614  ,"0x10871F: main (acc.c:14)"
615  ,"0x108771: main (acc.c:23)"
616  ,"0x1087CB: main (acc.c:32)"
617  ,"0x1087F0: main (acc.c:37)"
618  ,"0x10886F: main (acc.c:47)"
619  ,"0x1086F1: m1 (acc.c:7)"
620  ,"0x1088C3: main (acc.c:54)"
621  ,"0x1088D1: main (acc.c:55)"
622  ,"0x10870B: m2 (acc.c:9)"
623  ,"0x108921: main (acc.c:64)"
624  ,"0x10892F: main (acc.c:65)"
627 //---------------------------------------------------------------------------
628   ,
629   outputs: [
630     {
631       // All blocks are freed, which means all "At t-end" values are 0, so
632       // sorting by atTEndBytes results in no aggregate nodes, which is what we
633       // want here.
634       label: "At t-end (bytes)",
635       expected:
636 //---------------------------------------------------------------------------
638 Invocation {
639   Command: ./acc
640   PID:     23513
643 Times {
644   t-gmax: 265,120 instrs (19.82% of program duration)
645   t-end:  1,337,753 instrs
648 ▼ AP 1/1 (7 children) {
649     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)
650     At t-gmax: 1,025 bytes (100%) in 1 blocks (100%), avg size 1,025 bytes
651     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
652     Reads:     2,053 bytes (100%, 1,534.66/Minstr), 0.81/byte
653     Writes:    1,202,694 bytes (100%, 899,040.41/Minstr), 474.62/byte
654     Allocated at {
655       #0: [root]
656     }
657   }
658   ├── AP 1.1/7 {
659   │     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)
660   │     Max:       1,025 bytes in 1 blocks, avg size 1,025 bytes
661   │     At t-gmax: 1,025 bytes (100%) in 1 blocks (100%), avg size 1,025 bytes
662   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
663   │     Reads:     1,025 bytes (49.93%, 766.21/Minstr), 1/byte
664   │     Writes:    1,025 bytes (0.09%, 766.21/Minstr), 1/byte
665   │     Allocated at {
666   │       #1: 0x10886F: main (acc.c:47)
667   │     }
668   │   }
669   ├── AP 1.2/7 {
670   │     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)
671   │     Max:       1,024 bytes in 1 blocks, avg size 1,024 bytes
672   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
673   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
674   │     Reads:     1,024 bytes (49.88%, 765.46/Minstr), 1/byte
675   │     Writes:    1,124 bytes (0.09%, 840.21/Minstr), 1.1/byte
676   │     Accesses: {
677   │       [  0]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
678   │       [ 32]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
679   │       [ 64]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
680   │       [ 96]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
681   │       [128]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
682   │       [160]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
683   │       [192]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
684   │       [224]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
685   │       [256]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
686   │       [288]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
687   │       [320]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
688   │       [352]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
689   │       [384]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
690   │       [416]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
691   │       [448]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
692   │       [480]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 3 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
693   │       [512]  3 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
694   │       [544]  3 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
695   │       [576]  3 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 2 〃 〃 〃 〃 〃 〃 〃 
696   │       [608]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
697   │       [640]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
698   │       [672]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
699   │       [704]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
700   │       [736]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
701   │       [768]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
702   │       [800]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
703   │       [832]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
704   │       [864]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
705   │       [896]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
706   │       [928]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
707   │       [960]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
708   │       [992]  2 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
709   │     }
710   │     Allocated at {
711   │       #1: 0x1087F0: main (acc.c:37)
712   │     }
713   │   }
714   ├─▼ AP 1.3/7 (2 children) {
715   │     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)
716   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
717   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
718   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
719   │     Writes:    400,000 bytes (33.26%, 299,008.86/Minstr), 2,000/byte
720   │     Accesses: {
721   │       [  0]  100000 〃 〃 〃 - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
722   │       [ 32]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
723   │       [ 64]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
724   │       [ 96]  - - - - 
725   │     }
726   │     Allocated at {
727   │       #1: 0x1086F1: m1 (acc.c:7)
728   │     }
729   │   }
730   │   ├── AP 1.3.1/2 {
731   │   │     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)
732   │   │     Max:       100 bytes in 1 blocks, avg size 100 bytes
733   │   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
734   │   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
735   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
736   │   │     Writes:    200,000 bytes (16.63%, 149,504.43/Minstr), 2,000/byte
737   │   │     Accesses: {
738   │   │       [  0]  50000 〃 〃 〃 - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
739   │   │       [ 32]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
740   │   │       [ 64]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
741   │   │       [ 96]  - - - - 
742   │   │     }
743   │   │     Allocated at {
744   │   │       ^1: 0x1086F1: m1 (acc.c:7)
745   │   │       #2: 0x1088C3: main (acc.c:54)
746   │   │     }
747   │   │   }
748   │   └── AP 1.3.2/2 {
749   │         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)
750   │         Max:       100 bytes in 1 blocks, avg size 100 bytes
751   │         At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
752   │         At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
753   │         Reads:     0 bytes (0%, 0/Minstr), 0/byte
754   │         Writes:    200,000 bytes (16.63%, 149,504.43/Minstr), 2,000/byte
755   │         Accesses: {
756   │           [  0]  50000 〃 〃 〃 - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
757   │           [ 32]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
758   │           [ 64]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
759   │           [ 96]  - - - - 
760   │         }
761   │         Allocated at {
762   │           ^1: 0x1086F1: m1 (acc.c:7)
763   │           #2: 0x1088D1: main (acc.c:55)
764   │         }
765   │       }
766   ├─▼ AP 1.4/7 (2 children) {
767   │     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)
768   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
769   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
770   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
771   │     Writes:    800,000 bytes (66.52%, 598,017.72/Minstr), 4,000/byte
772   │     Accesses: {
773   │       [  0]  ∞ 〃 〃 〃 - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
774   │       [ 32]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
775   │       [ 64]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
776   │       [ 96]  - - - - 
777   │     }
778   │     Allocated at {
779   │       #1: 0x10870B: m2 (acc.c:9)
780   │     }
781   │   }
782   │   ├── AP 1.4.1/2 {
783   │   │     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)
784   │   │     Max:       100 bytes in 1 blocks, avg size 100 bytes
785   │   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
786   │   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
787   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
788   │   │     Writes:    400,000 bytes (33.26%, 299,008.86/Minstr), 4,000/byte
789   │   │     Accesses: {
790   │   │       [  0]  ∞ 〃 〃 〃 - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
791   │   │       [ 32]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
792   │   │       [ 64]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
793   │   │       [ 96]  - - - - 
794   │   │     }
795   │   │     Allocated at {
796   │   │       ^1: 0x10870B: m2 (acc.c:9)
797   │   │       #2: 0x108921: main (acc.c:64)
798   │   │     }
799   │   │   }
800   │   └── AP 1.4.2/2 {
801   │         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)
802   │         Max:       100 bytes in 1 blocks, avg size 100 bytes
803   │         At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
804   │         At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
805   │         Reads:     0 bytes (0%, 0/Minstr), 0/byte
806   │         Writes:    400,000 bytes (33.26%, 299,008.86/Minstr), 4,000/byte
807   │         Accesses: {
808   │           [  0]  ∞ 〃 〃 〃 - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
809   │           [ 32]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
810   │           [ 64]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
811   │           [ 96]  - - - - 
812   │         }
813   │         Allocated at {
814   │           ^1: 0x10870B: m2 (acc.c:9)
815   │           #2: 0x10892F: main (acc.c:65)
816   │         }
817   │       }
818   ├── AP 1.5/7 {
819   │     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)
820   │     Max:       33 bytes in 1 blocks, avg size 33 bytes
821   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
822   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
823   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
824   │     Writes:    1 bytes (0%, 0.75/Minstr), 0.03/byte
825   │     Accesses: {
826   │       [  0]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
827   │       [ 32]  1 
828   │     }
829   │     Allocated at {
830   │       #1: 0x1087CB: main (acc.c:32)
831   │     }
832   │   }
833   ├── AP 1.6/7 {
834   │     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)
835   │     Max:       32 bytes in 1 blocks, avg size 32 bytes
836   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
837   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
838   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
839   │     Writes:    496 bytes (0.04%, 370.77/Minstr), 15.5/byte
840   │     Accesses: {
841   │       [  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 
842   │     }
843   │     Allocated at {
844   │       #1: 0x10871F: main (acc.c:14)
845   │     }
846   │   }
847   └── AP 1.7/7 {
848         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)
849         Max:       20 bytes in 1 blocks, avg size 20 bytes
850         At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
851         At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
852         Reads:     4 bytes (0.19%, 2.99/Minstr), 0.2/byte
853         Writes:    48 bytes (0%, 35.88/Minstr), 2.4/byte
854         Accesses: {
855           [  0]  2 〃 〃 〃 - - - - 1 〃 〃 〃 - - - - 10 〃 〃 〃 
856         }
857         Allocated at {
858           #1: 0x108771: main (acc.c:23)
859         }
860       }
862 AP significance threshold: at-t-end >= 0 bytes (0%)
864 //---------------------------------------------------------------------------
865     }
866   ]
868 tests.push(acc);
870 //---------------------------------------------------------------------------
871 // big (corresponds to dhat/tests/big.c)
872 //---------------------------------------------------------------------------
874 let big = {
875   name: "big",
876   input:
877 //---------------------------------------------------------------------------
878 {"dhatFileVersion":1
879 ,"cmd":"./big"
880 ,"pid":3902
881 ,"mi":245281,"ei":253354
882 ,"aps":
883  [{"tb":706,"tbk":1,"tli":543
884   ,"mb":706,"mbk":1
885   ,"gb":706,"gbk":1
886   ,"fb":0,"fbk":0
887   ,"rb":0,"wb":0
888   ,"acc":[-706,0]
889   ,"fs":[1,2,3,4,5]
890   }
891  ,{"tb":5,"tbk":1,"tli":7972
892   ,"mb":5,"mbk":1
893   ,"gb":0,"gbk":0
894   ,"fb":5,"fbk":1
895   ,"rb":0,"wb":0
896   ,"acc":[-5,0]
897   ,"fs":[1,2,3,6,7]
898   }
899  ,{"tb":30,"tbk":1,"tli":7910
900   ,"mb":30,"mbk":1
901   ,"gb":0,"gbk":0
902   ,"fb":30,"fbk":1
903   ,"rb":0,"wb":0
904   ,"acc":[-30,0]
905   ,"fs":[1,2,8,9]
906   }
907  ,{"tb":20,"tbk":1,"tli":7857
908   ,"mb":20,"mbk":1
909   ,"gb":0,"gbk":0
910   ,"fb":20,"fbk":1
911   ,"rb":0,"wb":0
912   ,"acc":[-20,0]
913   ,"fs":[1,10,11]
914   }
915  ,{"tb":10,"tbk":1,"tli":7792
916   ,"mb":10,"mbk":1
917   ,"gb":0,"gbk":0
918   ,"fb":10,"fbk":1
919   ,"rb":0,"wb":0
920   ,"acc":[-10,0]
921   ,"fs":[1,12,13,14,15]
922   }
923  ,{"tb":60,"tbk":1,"tli":7709
924   ,"mb":60,"mbk":1
925   ,"gb":0,"gbk":0
926   ,"fb":60,"fbk":1
927   ,"rb":0,"wb":0
928   ,"acc":[-60,0]
929   ,"fs":[16,17,18,19,20,21,22]
930   }
931  ,{"tb":30,"tbk":1,"tli":7622
932   ,"mb":30,"mbk":1
933   ,"gb":0,"gbk":0
934   ,"fb":30,"fbk":1
935   ,"rb":0,"wb":0
936   ,"acc":[-30,0]
937   ,"fs":[16,17,18,23,24,25,26]
938   }
939  ,{"tb":20,"tbk":1,"tli":7528
940   ,"mb":20,"mbk":1
941   ,"gb":0,"gbk":0
942   ,"fb":20,"fbk":1
943   ,"rb":0,"wb":0
944   ,"acc":[-20,0]
945   ,"fs":[16,17,18,23,24,27,28,29]
946   }
947  ,{"tb":7,"tbk":1,"tli":7446
948   ,"mb":7,"mbk":1
949   ,"gb":0,"gbk":0
950   ,"fb":7,"fbk":1
951   ,"rb":0,"wb":0
952   ,"acc":[-7,0]
953   ,"fs":[16,17,18,30,31,32]
954   }
955  ,{"tb":3,"tbk":1,"tli":7375
956   ,"mb":3,"mbk":1
957   ,"gb":0,"gbk":0
958   ,"fb":3,"fbk":1
959   ,"rb":0,"wb":0
960   ,"acc":[-3,0]
961   ,"fs":[16,17,18,33,34]
962   }
963  ,{"tb":30,"tbk":1,"tli":7299
964   ,"mb":30,"mbk":1
965   ,"gb":0,"gbk":0
966   ,"fb":30,"fbk":1
967   ,"rb":0,"wb":0
968   ,"acc":[-30,0]
969   ,"fs":[35,36,37,38,39,40]
970   }
971  ,{"tb":20,"tbk":1,"tli":7249
972   ,"mb":20,"mbk":1
973   ,"gb":0,"gbk":0
974   ,"fb":20,"fbk":1
975   ,"rb":0,"wb":0
976   ,"acc":[-20,0]
977   ,"fs":[41,42]
978   }
979  ,{"tb":19,"tbk":1,"tli":7207
980   ,"mb":19,"mbk":1
981   ,"gb":0,"gbk":0
982   ,"fb":19,"fbk":1
983   ,"rb":0,"wb":0
984   ,"acc":[-19,0]
985   ,"fs":[43,44]
986   }
987  ,{"tb":9,"tbk":1,"tli":7158
988   ,"mb":9,"mbk":1
989   ,"gb":0,"gbk":0
990   ,"fb":9,"fbk":1
991   ,"rb":0,"wb":0
992   ,"acc":[-9,0]
993   ,"fs":[45,46,47]
994   }
995  ,{"tb":8,"tbk":1,"tli":7107
996   ,"mb":8,"mbk":1
997   ,"gb":0,"gbk":0
998   ,"fb":8,"fbk":1
999   ,"rb":0,"wb":0
1000   ,"acc":[-8,0]
1001   ,"fs":[45,48,49]
1002   }
1003  ,{"tb":7,"tbk":1,"tli":7056
1004   ,"mb":7,"mbk":1
1005   ,"gb":0,"gbk":0
1006   ,"fb":7,"fbk":1
1007   ,"rb":0,"wb":0
1008   ,"acc":[-7,0]
1009   ,"fs":[45,50,51]
1010   }
1011  ,{"tb":5,"tbk":1,"tli":7005
1012   ,"mb":5,"mbk":1
1013   ,"gb":0,"gbk":0
1014   ,"fb":5,"fbk":1
1015   ,"rb":0,"wb":0
1016   ,"acc":[-5,0]
1017   ,"fs":[45,52,53]
1018   }
1019  ,{"tb":1,"tbk":1,"tli":6954
1020   ,"mb":1,"mbk":1
1021   ,"gb":0,"gbk":0
1022   ,"fb":1,"fbk":1
1023   ,"rb":0,"wb":0
1024   ,"acc":[0]
1025   ,"fs":[45,52,54]
1026   }
1027  ,{"tb":10,"tbk":1,"tli":6917
1028   ,"mb":10,"mbk":1
1029   ,"gb":0,"gbk":0
1030   ,"fb":10,"fbk":1
1031   ,"rb":0,"wb":0
1032   ,"acc":[-10,0]
1033   ,"fs":[55]
1034   }
1036 ,"ftbl":
1037  ["[root]"
1038  ,"0x1086A1: a (big.c:10)"
1039  ,"0x1086BB: b1 (big.c:11)"
1040  ,"0x1086D5: c1 (big.c:12)"
1041  ,"0x1086EF: d1 (big.c:13)"
1042  ,"0x108A43: main (big.c:38)"
1043  ,"0x108709: d2 (big.c:14)"
1044  ,"0x108A5D: main (big.c:41)"
1045  ,"0x108723: c2 (big.c:15)"
1046  ,"0x108A67: main (big.c:42)"
1047  ,"0x10873D: b2 (big.c:16)"
1048  ,"0x108A71: main (big.c:43)"
1049  ,"0x108757: b3 (big.c:17)"
1050  ,"0x108771: e (big.c:17)"
1051  ,"0x10878B: f (big.c:17)"
1052  ,"0x108A7B: main (big.c:44)"
1053  ,"0x1087A5: g (big.c:18)"
1054  ,"0x1087BF: h (big.c:18)"
1055  ,"0x1087D9: i (big.c:18)"
1056  ,"0x1087F3: j2 (big.c:19)"
1057  ,"0x10880D: k (big.c:19)"
1058  ,"0x108827: l (big.c:19)"
1059  ,"0x108A85: main (big.c:45)"
1060  ,"0x108841: j3 (big.c:20)"
1061  ,"0x10885B: m (big.c:20)"
1062  ,"0x108875: n1 (big.c:21)"
1063  ,"0x108A8F: main (big.c:46)"
1064  ,"0x10888F: n2 (big.c:22)"
1065  ,"0x1088A9: o (big.c:22)"
1066  ,"0x108A99: main (big.c:47)"
1067  ,"0x1088C3: p (big.c:23)"
1068  ,"0x1088DD: q (big.c:23)"
1069  ,"0x108AA3: main (big.c:48)"
1070  ,"0x1088F7: r (big.c:24)"
1071  ,"0x108AAD: main (big.c:49)"
1072  ,"0x108911: s1 (big.c:25)"
1073  ,"0x10892B: s2 (big.c:25)"
1074  ,"0x108945: s3 (big.c:25)"
1075  ,"0x10895F: s4 (big.c:25)"
1076  ,"0x108979: s5 (big.c:25)"
1077  ,"0x108AB7: main (big.c:50)"
1078  ,"0x108993: t (big.c:26)"
1079  ,"0x108AC1: main (big.c:51)"
1080  ,"0x1089AD: u (big.c:27)"
1081  ,"0x108ACB: main (big.c:52)"
1082  ,"0x1089C7: v (big.c:28)"
1083  ,"0x1089E1: w (big.c:29)"
1084  ,"0x108AD5: main (big.c:53)"
1085  ,"0x1089FB: x (big.c:30)"
1086  ,"0x108ADF: main (big.c:54)"
1087  ,"0x108A15: y (big.c:31)"
1088  ,"0x108AE9: main (big.c:55)"
1089  ,"0x108A2F: z (big.c:32)"
1090  ,"0x108AF3: main (big.c:56)"
1091  ,"0x108AFD: main (big.c:57)"
1092  ,"0x108B07: main (big.c:60)"
1095 //---------------------------------------------------------------------------
1096   ,
1097   outputs: [
1098     {
1099       label: "Total (bytes)",
1100       expected:
1101 //---------------------------------------------------------------------------
1103 Invocation {
1104   Command: ./big
1105   PID:     3902
1108 Times {
1109   t-gmax: 245,281 instrs (96.81% of program duration)
1110   t-end:  253,354 instrs
1113 ▼ AP 1/1 (7 children) {
1114     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)
1115     At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1116     At t-end:  294 bytes (100%) in 18 blocks (100%), avg size 16.33 bytes
1117     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1118     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1119     Allocated at {
1120       #0: [root]
1121     }
1122   }
1123   ├─▼ AP 1.1/7 (3 children) {
1124   │     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)
1125   │     At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1126   │     At t-end:  65 bytes (22.11%) in 4 blocks (22.22%), avg size 16.25 bytes
1127   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1128   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1129   │     Allocated at {
1130   │       #1: 0x1086A1: a (big.c:10)
1131   │     }
1132   │   }
1133   │   ├─▼ AP 1.1.1/3 (2 children) {
1134   │   │     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)
1135   │   │     At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1136   │   │     At t-end:  35 bytes (11.9%) in 2 blocks (11.11%), avg size 17.5 bytes
1137   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1138   │   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1139   │   │     Allocated at {
1140   │   │       ^1: 0x1086A1: a (big.c:10)
1141   │   │       #2: 0x1086BB: b1 (big.c:11)
1142   │   │     }
1143   │   │   }
1144   │   │   ├─▼ AP 1.1.1.1/2 (2 children) {
1145   │   │   │     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)
1146   │   │   │     At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1147   │   │   │     At t-end:  5 bytes (1.7%) in 1 blocks (5.56%), avg size 5 bytes
1148   │   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1149   │   │   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1150   │   │   │     Allocated at {
1151   │   │   │       ^1: 0x1086A1: a (big.c:10)
1152   │   │   │       ^2: 0x1086BB: b1 (big.c:11)
1153   │   │   │       #3: 0x1086D5: c1 (big.c:12)
1154   │   │   │     }
1155   │   │   │   }
1156   │   │   │   ├── AP 1.1.1.1.1/2 {
1157   │   │   │   │     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)
1158   │   │   │   │     Max:       706 bytes in 1 blocks, avg size 706 bytes
1159   │   │   │   │     At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1160   │   │   │   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1161   │   │   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1162   │   │   │   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1163   │   │   │   │     Accesses: {
1164   │   │   │   │       [  0]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1165   │   │   │   │       [ 32]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1166   │   │   │   │       [ 64]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1167   │   │   │   │       [ 96]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1168   │   │   │   │       [128]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1169   │   │   │   │       [160]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1170   │   │   │   │       [192]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1171   │   │   │   │       [224]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1172   │   │   │   │       [256]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1173   │   │   │   │       [288]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1174   │   │   │   │       [320]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1175   │   │   │   │       [352]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1176   │   │   │   │       [384]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1177   │   │   │   │       [416]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1178   │   │   │   │       [448]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1179   │   │   │   │       [480]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1180   │   │   │   │       [512]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1181   │   │   │   │       [544]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1182   │   │   │   │       [576]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1183   │   │   │   │       [608]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1184   │   │   │   │       [640]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1185   │   │   │   │       [672]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1186   │   │   │   │       [704]  - - 
1187   │   │   │   │     }
1188   │   │   │   │     Allocated at {
1189   │   │   │   │       ^1: 0x1086A1: a (big.c:10)
1190   │   │   │   │       ^2: 0x1086BB: b1 (big.c:11)
1191   │   │   │   │       ^3: 0x1086D5: c1 (big.c:12)
1192   │   │   │   │       #4: 0x1086EF: d1 (big.c:13)
1193   │   │   │   │       #5: 0x108A43: main (big.c:38)
1194   │   │   │   │     }
1195   │   │   │   │   }
1196   │   │   │   └── AP 1.1.1.1.2/2 {
1197   │   │   │         Total:     5 bytes (0.5%, 19.74/Minstr)
1198   │   │   │         Allocated at {
1199   │   │   │           [1 insignificant]
1200   │   │   │         }
1201   │   │   │       }
1202   │   │   └── AP 1.1.1.2/2 {
1203   │   │         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)
1204   │   │         Max:       30 bytes in 1 blocks, avg size 30 bytes
1205   │   │         At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1206   │   │         At t-end:  30 bytes (10.2%) in 1 blocks (5.56%), avg size 30 bytes
1207   │   │         Reads:     0 bytes (0%, 0/Minstr), 0/byte
1208   │   │         Writes:    0 bytes (0%, 0/Minstr), 0/byte
1209   │   │         Accesses: {
1210   │   │           [  0]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1211   │   │         }
1212   │   │         Allocated at {
1213   │   │           ^1: 0x1086A1: a (big.c:10)
1214   │   │           ^2: 0x1086BB: b1 (big.c:11)
1215   │   │           #3: 0x108723: c2 (big.c:15)
1216   │   │           #4: 0x108A67: main (big.c:42)
1217   │   │         }
1218   │   │       }
1219   │   ├── AP 1.1.2/3 {
1220   │   │     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)
1221   │   │     Max:       20 bytes in 1 blocks, avg size 20 bytes
1222   │   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1223   │   │     At t-end:  20 bytes (6.8%) in 1 blocks (5.56%), avg size 20 bytes
1224   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1225   │   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1226   │   │     Accesses: {
1227   │   │       [  0]  - - - - - - - - - - - - - - - - - - - - 
1228   │   │     }
1229   │   │     Allocated at {
1230   │   │       ^1: 0x1086A1: a (big.c:10)
1231   │   │       #2: 0x10873D: b2 (big.c:16)
1232   │   │       #3: 0x108A71: main (big.c:43)
1233   │   │     }
1234   │   │   }
1235   │   └── AP 1.1.3/3 {
1236   │         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)
1237   │         Max:       10 bytes in 1 blocks, avg size 10 bytes
1238   │         At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1239   │         At t-end:  10 bytes (3.4%) in 1 blocks (5.56%), avg size 10 bytes
1240   │         Reads:     0 bytes (0%, 0/Minstr), 0/byte
1241   │         Writes:    0 bytes (0%, 0/Minstr), 0/byte
1242   │         Accesses: {
1243   │           [  0]  - - - - - - - - - - 
1244   │         }
1245   │         Allocated at {
1246   │           ^1: 0x1086A1: a (big.c:10)
1247   │           #2: 0x108757: b3 (big.c:17)
1248   │           #3: 0x108771: e (big.c:17)
1249   │           #4: 0x10878B: f (big.c:17)
1250   │           #5: 0x108A7B: main (big.c:44)
1251   │         }
1252   │       }
1253   ├─▼ AP 1.2/7 (3 children) {
1254   │     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)
1255   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1256   │     At t-end:  120 bytes (40.82%) in 5 blocks (27.78%), avg size 24 bytes
1257   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1258   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1259   │     Allocated at {
1260   │       #1: 0x1087A5: g (big.c:18)
1261   │       #2: 0x1087BF: h (big.c:18)
1262   │       #3: 0x1087D9: i (big.c:18)
1263   │     }
1264   │   }
1265   │   ├── AP 1.2.1/3 {
1266   │   │     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)
1267   │   │     Max:       60 bytes in 1 blocks, avg size 60 bytes
1268   │   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1269   │   │     At t-end:  60 bytes (20.41%) in 1 blocks (5.56%), avg size 60 bytes
1270   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1271   │   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1272   │   │     Accesses: {
1273   │   │       [  0]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1274   │   │       [ 32]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1275   │   │     }
1276   │   │     Allocated at {
1277   │   │       ^1: 0x1087A5: g (big.c:18)
1278   │   │       ^2: 0x1087BF: h (big.c:18)
1279   │   │       ^3: 0x1087D9: i (big.c:18)
1280   │   │       #4: 0x1087F3: j2 (big.c:19)
1281   │   │       #5: 0x10880D: k (big.c:19)
1282   │   │       #6: 0x108827: l (big.c:19)
1283   │   │       #7: 0x108A85: main (big.c:45)
1284   │   │     }
1285   │   │   }
1286   │   ├─▼ AP 1.2.2/3 (2 children) {
1287   │   │     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)
1288   │   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1289   │   │     At t-end:  50 bytes (17.01%) in 2 blocks (11.11%), avg size 25 bytes
1290   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1291   │   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1292   │   │     Allocated at {
1293   │   │       ^1: 0x1087A5: g (big.c:18)
1294   │   │       ^2: 0x1087BF: h (big.c:18)
1295   │   │       ^3: 0x1087D9: i (big.c:18)
1296   │   │       #4: 0x108841: j3 (big.c:20)
1297   │   │       #5: 0x10885B: m (big.c:20)
1298   │   │     }
1299   │   │   }
1300   │   │   ├── AP 1.2.2.1/2 {
1301   │   │   │     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)
1302   │   │   │     Max:       30 bytes in 1 blocks, avg size 30 bytes
1303   │   │   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1304   │   │   │     At t-end:  30 bytes (10.2%) in 1 blocks (5.56%), avg size 30 bytes
1305   │   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1306   │   │   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1307   │   │   │     Accesses: {
1308   │   │   │       [  0]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1309   │   │   │     }
1310   │   │   │     Allocated at {
1311   │   │   │       ^1: 0x1087A5: g (big.c:18)
1312   │   │   │       ^2: 0x1087BF: h (big.c:18)
1313   │   │   │       ^3: 0x1087D9: i (big.c:18)
1314   │   │   │       ^4: 0x108841: j3 (big.c:20)
1315   │   │   │       ^5: 0x10885B: m (big.c:20)
1316   │   │   │       #6: 0x108875: n1 (big.c:21)
1317   │   │   │       #7: 0x108A8F: main (big.c:46)
1318   │   │   │     }
1319   │   │   │   }
1320   │   │   └── AP 1.2.2.2/2 {
1321   │   │         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)
1322   │   │         Max:       20 bytes in 1 blocks, avg size 20 bytes
1323   │   │         At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1324   │   │         At t-end:  20 bytes (6.8%) in 1 blocks (5.56%), avg size 20 bytes
1325   │   │         Reads:     0 bytes (0%, 0/Minstr), 0/byte
1326   │   │         Writes:    0 bytes (0%, 0/Minstr), 0/byte
1327   │   │         Accesses: {
1328   │   │           [  0]  - - - - - - - - - - - - - - - - - - - - 
1329   │   │         }
1330   │   │         Allocated at {
1331   │   │           ^1: 0x1087A5: g (big.c:18)
1332   │   │           ^2: 0x1087BF: h (big.c:18)
1333   │   │           ^3: 0x1087D9: i (big.c:18)
1334   │   │           ^4: 0x108841: j3 (big.c:20)
1335   │   │           ^5: 0x10885B: m (big.c:20)
1336   │   │           #6: 0x10888F: n2 (big.c:22)
1337   │   │           #7: 0x1088A9: o (big.c:22)
1338   │   │           #8: 0x108A99: main (big.c:47)
1339   │   │         }
1340   │   │       }
1341   │   └── AP 1.2.3/3 {
1342   │         Total:     10 bytes (1%, 39.47/Minstr)
1343   │         Allocated at {
1344   │           [2 insignificant]
1345   │         }
1346   │       }
1347   ├── AP 1.3/7 {
1348   │     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)
1349   │     Max:       30 bytes in 1 blocks, avg size 30 bytes
1350   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1351   │     At t-end:  30 bytes (10.2%) in 1 blocks (5.56%), avg size 30 bytes
1352   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1353   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1354   │     Accesses: {
1355   │       [  0]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1356   │     }
1357   │     Allocated at {
1358   │       #1: 0x108911: s1 (big.c:25)
1359   │       #2: 0x10892B: s2 (big.c:25)
1360   │       #3: 0x108945: s3 (big.c:25)
1361   │       #4: 0x10895F: s4 (big.c:25)
1362   │       #5: 0x108979: s5 (big.c:25)
1363   │       #6: 0x108AB7: main (big.c:50)
1364   │     }
1365   │   }
1366   ├─▼ AP 1.4/7 (1 children) {
1367   │     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)
1368   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1369   │     At t-end:  30 bytes (10.2%) in 5 blocks (27.78%), avg size 6 bytes
1370   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1371   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1372   │     Allocated at {
1373   │       #1: 0x1089C7: v (big.c:28)
1374   │     }
1375   │   }
1376   │   └── AP 1.4.1/1 {
1377   │         Total:     30 bytes (3%, 118.41/Minstr)
1378   │         Allocated at {
1379   │           [4 insignificant]
1380   │         }
1381   │       }
1382   ├── AP 1.5/7 {
1383   │     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)
1384   │     Max:       20 bytes in 1 blocks, avg size 20 bytes
1385   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1386   │     At t-end:  20 bytes (6.8%) in 1 blocks (5.56%), avg size 20 bytes
1387   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1388   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1389   │     Accesses: {
1390   │       [  0]  - - - - - - - - - - - - - - - - - - - - 
1391   │     }
1392   │     Allocated at {
1393   │       #1: 0x108993: t (big.c:26)
1394   │       #2: 0x108AC1: main (big.c:51)
1395   │     }
1396   │   }
1397   ├── AP 1.6/7 {
1398   │     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)
1399   │     Max:       19 bytes in 1 blocks, avg size 19 bytes
1400   │     At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1401   │     At t-end:  19 bytes (6.46%) in 1 blocks (5.56%), avg size 19 bytes
1402   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1403   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1404   │     Accesses: {
1405   │       [  0]  - - - - - - - - - - - - - - - - - - - 
1406   │     }
1407   │     Allocated at {
1408   │       #1: 0x1089AD: u (big.c:27)
1409   │       #2: 0x108ACB: main (big.c:52)
1410   │     }
1411   │   }
1412   └── AP 1.7/7 {
1413         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)
1414         Max:       10 bytes in 1 blocks, avg size 10 bytes
1415         At t-gmax: 0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1416         At t-end:  10 bytes (3.4%) in 1 blocks (5.56%), avg size 10 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: 0x108B07: main (big.c:60)
1424         }
1425       }
1427 AP significance threshold: total >= 10 bytes (1%)
1429 //---------------------------------------------------------------------------
1430     },
1431     {
1432       label: "Total (blocks), short-lived",
1433       expected:
1434 //---------------------------------------------------------------------------
1436 Invocation {
1437   Command: ./big
1438   PID:     3902
1441 Times {
1442   t-gmax: 245,281 instrs (96.81% of program duration)
1443   t-end:  253,354 instrs
1446 ▼ AP 1/1 (1 children) {
1447     Total:     19 blocks (100%, 74.99/Minstr), avg lifetime 7,037.16 instrs (2.78% of program duration)
1448     Allocated at {
1449       #0: [root]
1450     }
1451   }
1452   └── AP 1.1/1 {
1453         Total:     19 blocks (100%, 74.99/Minstr), avg lifetime 7,037.16 instrs (2.78% of program duration)
1454         Allocated at {
1455           [7 insignificant]
1456         }
1457       }
1459 AP significance threshold: (total >= 0.1 blocks (0.5%)) && (total avg lifetime <= 500 instrs)
1461 //---------------------------------------------------------------------------
1462     },
1463     {
1464       label: "At t-gmax (bytes)",
1465       expected:
1466 //---------------------------------------------------------------------------
1468 Invocation {
1469   Command: ./big
1470   PID:     3902
1473 Times {
1474   t-gmax: 245,281 instrs (96.81% of program duration)
1475   t-end:  253,354 instrs
1478 ▼ AP 1/1 (2 children) {
1479     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)
1480     At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1481     At t-end:  294 bytes (100%) in 18 blocks (100%), avg size 16.33 bytes
1482     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1483     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1484     Allocated at {
1485       #0: [root]
1486     }
1487   }
1488   ├─▼ AP 1.1/2 (2 children) {
1489   │     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)
1490   │     At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1491   │     At t-end:  65 bytes (22.11%) in 4 blocks (22.22%), avg size 16.25 bytes
1492   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1493   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1494   │     Allocated at {
1495   │       #1: 0x1086A1: a (big.c:10)
1496   │     }
1497   │   }
1498   │   ├─▼ AP 1.1.1/2 (2 children) {
1499   │   │     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)
1500   │   │     At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1501   │   │     At t-end:  35 bytes (11.9%) in 2 blocks (11.11%), avg size 17.5 bytes
1502   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1503   │   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1504   │   │     Allocated at {
1505   │   │       ^1: 0x1086A1: a (big.c:10)
1506   │   │       #2: 0x1086BB: b1 (big.c:11)
1507   │   │     }
1508   │   │   }
1509   │   │   ├─▼ AP 1.1.1.1/2 (2 children) {
1510   │   │   │     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)
1511   │   │   │     At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1512   │   │   │     At t-end:  5 bytes (1.7%) in 1 blocks (5.56%), avg size 5 bytes
1513   │   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1514   │   │   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1515   │   │   │     Allocated at {
1516   │   │   │       ^1: 0x1086A1: a (big.c:10)
1517   │   │   │       ^2: 0x1086BB: b1 (big.c:11)
1518   │   │   │       #3: 0x1086D5: c1 (big.c:12)
1519   │   │   │     }
1520   │   │   │   }
1521   │   │   │   ├── AP 1.1.1.1.1/2 {
1522   │   │   │   │     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)
1523   │   │   │   │     Max:       706 bytes in 1 blocks, avg size 706 bytes
1524   │   │   │   │     At t-gmax: 706 bytes (100%) in 1 blocks (100%), avg size 706 bytes
1525   │   │   │   │     At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
1526   │   │   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1527   │   │   │   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1528   │   │   │   │     Accesses: {
1529   │   │   │   │       [  0]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1530   │   │   │   │       [ 32]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1531   │   │   │   │       [ 64]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1532   │   │   │   │       [ 96]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1533   │   │   │   │       [128]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1534   │   │   │   │       [160]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1535   │   │   │   │       [192]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1536   │   │   │   │       [224]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1537   │   │   │   │       [256]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1538   │   │   │   │       [288]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1539   │   │   │   │       [320]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1540   │   │   │   │       [352]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1541   │   │   │   │       [384]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1542   │   │   │   │       [416]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1543   │   │   │   │       [448]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1544   │   │   │   │       [480]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1545   │   │   │   │       [512]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1546   │   │   │   │       [544]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1547   │   │   │   │       [576]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1548   │   │   │   │       [608]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1549   │   │   │   │       [640]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1550   │   │   │   │       [672]  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1551   │   │   │   │       [704]  - - 
1552   │   │   │   │     }
1553   │   │   │   │     Allocated at {
1554   │   │   │   │       ^1: 0x1086A1: a (big.c:10)
1555   │   │   │   │       ^2: 0x1086BB: b1 (big.c:11)
1556   │   │   │   │       ^3: 0x1086D5: c1 (big.c:12)
1557   │   │   │   │       #4: 0x1086EF: d1 (big.c:13)
1558   │   │   │   │       #5: 0x108A43: main (big.c:38)
1559   │   │   │   │     }
1560   │   │   │   │   }
1561   │   │   │   └── AP 1.1.1.1.2/2 {
1562   │   │   │         At t-gmax: 0 bytes (0%)
1563   │   │   │         Allocated at {
1564   │   │   │           [1 insignificant]
1565   │   │   │         }
1566   │   │   │       }
1567   │   │   └── AP 1.1.1.2/2 {
1568   │   │         At t-gmax: 0 bytes (0%)
1569   │   │         Allocated at {
1570   │   │           [1 insignificant]
1571   │   │         }
1572   │   │       }
1573   │   └── AP 1.1.2/2 {
1574   │         At t-gmax: 0 bytes (0%)
1575   │         Allocated at {
1576   │           [2 insignificant]
1577   │         }
1578   │       }
1579   └── AP 1.2/2 {
1580         At t-gmax: 0 bytes (0%)
1581         Allocated at {
1582           [6 insignificant]
1583         }
1584       }
1586 AP significance threshold: at-t-gmax >= 7.06 bytes (1%)
1588 //---------------------------------------------------------------------------
1589     }
1590   ]
1592 tests.push(big);
1594 //---------------------------------------------------------------------------
1595 // sig (corresponds to dhat/tests/sig.c)
1596 //---------------------------------------------------------------------------
1598 let sig = {
1599   name: "sig",
1600   input:
1601 //---------------------------------------------------------------------------
1602 {"dhatFileVersion":1
1603 ,"cmd":"./sig"
1604 ,"pid":21476
1605 ,"mi":1311861,"ei":1318783
1606 ,"aps":
1607  [{"tb":11,"tbk":1,"tli":1075941
1608   ,"mb":11,"mbk":1
1609   ,"gb":11,"gbk":1
1610   ,"fb":11,"fbk":1
1611   ,"rb":11,"wb":16489
1612   ,"acc":[-11,1500]
1613   ,"fs":[1,2]
1614   }
1615  ,{"tb":10,"tbk":1,"tli":880845
1616   ,"mb":10,"mbk":1
1617   ,"gb":10,"gbk":1
1618   ,"fb":10,"fbk":1
1619   ,"rb":10,"wb":14990
1620   ,"acc":[-10,1500]
1621   ,"fs":[1,3,4]
1622   }
1623  ,{"tb":5,"tbk":1,"tli":702250
1624   ,"mb":5,"mbk":1
1625   ,"gb":5,"gbk":1
1626   ,"fb":5,"fbk":1
1627   ,"rb":5,"wb":7495
1628   ,"acc":[-5,1500]
1629   ,"fs":[1,5,6]
1630   }
1631  ,{"tb":4,"tbk":1,"tli":606170
1632   ,"mb":4,"mbk":1
1633   ,"gb":4,"gbk":1
1634   ,"fb":4,"fbk":1
1635   ,"rb":4,"wb":5996
1636   ,"acc":[-4,1500]
1637   ,"fs":[1,5,7]
1638   }
1639  ,{"tb":10,"tbk":1,"tli":510097
1640   ,"mb":10,"mbk":1
1641   ,"gb":10,"gbk":1
1642   ,"fb":10,"fbk":1
1643   ,"rb":10,"wb":14990
1644   ,"acc":[-10,1500]
1645   ,"fs":[8,9]
1646   }
1647  ,{"tb":9,"tbk":1,"tli":331504
1648   ,"mb":9,"mbk":1
1649   ,"gb":9,"gbk":1
1650   ,"fb":9,"fbk":1
1651   ,"rb":9,"wb":13491
1652   ,"acc":[-9,1500]
1653   ,"fs":[8,10,11]
1654   }
1655  ,{"tb":5,"tbk":1,"tli":169412
1656   ,"mb":5,"mbk":1
1657   ,"gb":5,"gbk":1
1658   ,"fb":5,"fbk":1
1659   ,"rb":0,"wb":0
1660   ,"acc":[-5,0]
1661   ,"fs":[8,12,13]
1662   }
1663  ,{"tb":3,"tbk":1,"tli":169360
1664   ,"mb":3,"mbk":1
1665   ,"gb":3,"gbk":1
1666   ,"fb":3,"fbk":1
1667   ,"rb":0,"wb":0
1668   ,"acc":[-3,0]
1669   ,"fs":[8,12,14]
1670   }
1671  ,{"tb":9,"tbk":1,"tli":169315
1672   ,"mb":9,"mbk":1
1673   ,"gb":9,"gbk":1
1674   ,"fb":9,"fbk":1
1675   ,"rb":9,"wb":13491
1676   ,"acc":[-9,1500]
1677   ,"fs":[15,16]
1678   }
1679  ,{"tb":8,"tbk":1,"tli":7225
1680   ,"mb":8,"mbk":1
1681   ,"gb":8,"gbk":1
1682   ,"fb":8,"fbk":1
1683   ,"rb":0,"wb":0
1684   ,"acc":[-8,0]
1685   ,"fs":[15,17,18]
1686   }
1687  ,{"tb":4,"tbk":1,"tli":7173
1688   ,"mb":4,"mbk":1
1689   ,"gb":4,"gbk":1
1690   ,"fb":4,"fbk":1
1691   ,"rb":0,"wb":0
1692   ,"acc":[-4,0]
1693   ,"fs":[15,19,20]
1694   }
1695  ,{"tb":3,"tbk":1,"tli":7121
1696   ,"mb":3,"mbk":1
1697   ,"gb":3,"gbk":1
1698   ,"fb":3,"fbk":1
1699   ,"rb":0,"wb":0
1700   ,"acc":[-3,0]
1701   ,"fs":[15,19,21]
1702   }
1703  ,{"tb":8,"tbk":1,"tli":7076
1704   ,"mb":8,"mbk":1
1705   ,"gb":8,"gbk":1
1706   ,"fb":8,"fbk":1
1707   ,"rb":0,"wb":0
1708   ,"acc":[-8,0]
1709   ,"fs":[22,23]
1710   }
1711  ,{"tb":7,"tbk":1,"tli":7026
1712   ,"mb":7,"mbk":1
1713   ,"gb":7,"gbk":1
1714   ,"fb":7,"fbk":1
1715   ,"rb":0,"wb":0
1716   ,"acc":[-7,0]
1717   ,"fs":[22,24,25]
1718   }
1719  ,{"tb":4,"tbk":1,"tli":6974
1720   ,"mb":4,"mbk":1
1721   ,"gb":4,"gbk":1
1722   ,"fb":4,"fbk":1
1723   ,"rb":0,"wb":0
1724   ,"acc":[-4,0]
1725   ,"fs":[22,26,27]
1726   }
1727  ,{"tb":2,"tbk":1,"tli":6922
1728   ,"mb":2,"mbk":1
1729   ,"gb":2,"gbk":1
1730   ,"fb":2,"fbk":1
1731   ,"rb":0,"wb":0
1732   ,"acc":[-2,0]
1733   ,"fs":[22,26,28]
1734   }
1736 ,"ftbl":
1737  ["[root]"
1738  ,"0x108681: am (sig.c:9)"
1739  ,"0x10883C: main (sig.c:57)"
1740  ,"0x10869B: a2 (sig.c:11)"
1741  ,"0x10885B: main (sig.c:58)"
1742  ,"0x1086B5: a3 (sig.c:12)"
1743  ,"0x10887A: main (sig.c:59)"
1744  ,"0x108899: main (sig.c:60)"
1745  ,"0x1086CF: bm (sig.c:15)"
1746  ,"0x1088B8: main (sig.c:62)"
1747  ,"0x1086E9: b2 (sig.c:17)"
1748  ,"0x1088D7: main (sig.c:63)"
1749  ,"0x108703: b3 (sig.c:18)"
1750  ,"0x1088F6: main (sig.c:64)"
1751  ,"0x108904: main (sig.c:65)"
1752  ,"0x10871D: cm (sig.c:21)"
1753  ,"0x108912: main (sig.c:67)"
1754  ,"0x108737: c2 (sig.c:23)"
1755  ,"0x108931: main (sig.c:68)"
1756  ,"0x108751: c3 (sig.c:24)"
1757  ,"0x10893F: main (sig.c:69)"
1758  ,"0x10894D: main (sig.c:70)"
1759  ,"0x10876B: dm (sig.c:27)"
1760  ,"0x10895B: main (sig.c:72)"
1761  ,"0x108785: d2 (sig.c:29)"
1762  ,"0x108969: main (sig.c:73)"
1763  ,"0x10879F: d3 (sig.c:30)"
1764  ,"0x108977: main (sig.c:74)"
1765  ,"0x108985: main (sig.c:75)"
1768 //---------------------------------------------------------------------------
1769   ,
1770   outputs: [
1771     {
1772       label: "Total (bytes), zero reads or zero writes",
1773       expected:
1774 //---------------------------------------------------------------------------
1776 Invocation {
1777   Command: ./sig
1778   PID:     21476
1781 Times {
1782   t-gmax: 1,311,861 instrs (99.48% of program duration)
1783   t-end:  1,318,783 instrs
1786 ▼ AP 1/1 (4 children) {
1787     Total:     102 bytes (100%, 77.34/Minstr)
1788     Reads:     58 bytes (100%, 43.98/Minstr)
1789     Writes:    86,942 bytes (100%, 65,925.93/Minstr)
1790     Allocated at {
1791       #0: [root]
1792     }
1793   }
1794   ├── AP 1.1/4 {
1795   │     Total:     30 bytes (29.41%, 22.75/Minstr)
1796   │     Reads:     30 bytes (51.72%, 22.75/Minstr)
1797   │     Writes:    44,970 bytes (51.72%, 34,099.62/Minstr)
1798   │     Allocated at {
1799   │       [1 insignificant]
1800   │     }
1801   │   }
1802   ├─▼ AP 1.2/4 (2 children) {
1803   │     Total:     27 bytes (26.47%, 20.47/Minstr)
1804   │     Reads:     19 bytes (32.76%, 14.41/Minstr)
1805   │     Writes:    28,481 bytes (32.76%, 21,596.43/Minstr)
1806   │     Allocated at {
1807   │       #1: 0x1086CF: bm (sig.c:15)
1808   │     }
1809   │   }
1810   │   ├── AP 1.2.1/2 {
1811   │   │     Total:     19 bytes (18.63%, 14.41/Minstr)
1812   │   │     Reads:     19 bytes (32.76%, 14.41/Minstr)
1813   │   │     Writes:    28,481 bytes (32.76%, 21,596.43/Minstr)
1814   │   │     Allocated at {
1815   │   │       [2 insignificant]
1816   │   │     }
1817   │   │   }
1818   │   └─▼ AP 1.2.2/2 (2 children) {
1819   │         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)
1820   │         At t-gmax: 8 bytes (7.84%) in 2 blocks (12.5%), avg size 4 bytes
1821   │         At t-end:  8 bytes (7.84%) in 2 blocks (12.5%), avg size 4 bytes
1822   │         Reads:     0 bytes (0%, 0/Minstr), 0/byte
1823   │         Writes:    0 bytes (0%, 0/Minstr), 0/byte
1824   │         Allocated at {
1825   │           ^1: 0x1086CF: bm (sig.c:15)
1826   │           #2: 0x108703: b3 (sig.c:18)
1827   │         }
1828   │       }
1829   │       ├── AP 1.2.2.1/2 {
1830   │       │     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)
1831   │       │     Max:       5 bytes in 1 blocks, avg size 5 bytes
1832   │       │     At t-gmax: 5 bytes (4.9%) in 1 blocks (6.25%), avg size 5 bytes
1833   │       │     At t-end:  5 bytes (4.9%) in 1 blocks (6.25%), avg size 5 bytes
1834   │       │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1835   │       │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1836   │       │     Accesses: {
1837   │       │       [  0]  - - - - - 
1838   │       │     }
1839   │       │     Allocated at {
1840   │       │       ^1: 0x1086CF: bm (sig.c:15)
1841   │       │       ^2: 0x108703: b3 (sig.c:18)
1842   │       │       #3: 0x1088F6: main (sig.c:64)
1843   │       │     }
1844   │       │   }
1845   │       └── AP 1.2.2.2/2 {
1846   │             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)
1847   │             Max:       3 bytes in 1 blocks, avg size 3 bytes
1848   │             At t-gmax: 3 bytes (2.94%) in 1 blocks (6.25%), avg size 3 bytes
1849   │             At t-end:  3 bytes (2.94%) in 1 blocks (6.25%), avg size 3 bytes
1850   │             Reads:     0 bytes (0%, 0/Minstr), 0/byte
1851   │             Writes:    0 bytes (0%, 0/Minstr), 0/byte
1852   │             Accesses: {
1853   │               [  0]  - - - 
1854   │             }
1855   │             Allocated at {
1856   │               ^1: 0x1086CF: bm (sig.c:15)
1857   │               ^2: 0x108703: b3 (sig.c:18)
1858   │               #3: 0x108904: main (sig.c:65)
1859   │             }
1860   │           }
1861   ├─▼ AP 1.3/4 (3 children) {
1862   │     Total:     24 bytes (23.53%, 18.2/Minstr)
1863   │     Reads:     9 bytes (15.52%, 6.82/Minstr)
1864   │     Writes:    13,491 bytes (15.52%, 10,229.89/Minstr)
1865   │     Allocated at {
1866   │       #1: 0x10871D: cm (sig.c:21)
1867   │     }
1868   │   }
1869   │   ├── AP 1.3.1/3 {
1870   │   │     Total:     9 bytes (8.82%, 6.82/Minstr)
1871   │   │     Reads:     9 bytes (15.52%, 6.82/Minstr)
1872   │   │     Writes:    13,491 bytes (15.52%, 10,229.89/Minstr)
1873   │   │     Allocated at {
1874   │   │       [1 insignificant]
1875   │   │     }
1876   │   │   }
1877   │   ├── AP 1.3.2/3 {
1878   │   │     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)
1879   │   │     Max:       8 bytes in 1 blocks, avg size 8 bytes
1880   │   │     At t-gmax: 8 bytes (7.84%) in 1 blocks (6.25%), avg size 8 bytes
1881   │   │     At t-end:  8 bytes (7.84%) in 1 blocks (6.25%), avg size 8 bytes
1882   │   │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1883   │   │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1884   │   │     Accesses: {
1885   │   │       [  0]  - - - - - - - - 
1886   │   │     }
1887   │   │     Allocated at {
1888   │   │       ^1: 0x10871D: cm (sig.c:21)
1889   │   │       #2: 0x108737: c2 (sig.c:23)
1890   │   │       #3: 0x108931: main (sig.c:68)
1891   │   │     }
1892   │   │   }
1893   │   └─▼ AP 1.3.3/3 (2 children) {
1894   │         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)
1895   │         At t-gmax: 7 bytes (6.86%) in 2 blocks (12.5%), avg size 3.5 bytes
1896   │         At t-end:  7 bytes (6.86%) in 2 blocks (12.5%), avg size 3.5 bytes
1897   │         Reads:     0 bytes (0%, 0/Minstr), 0/byte
1898   │         Writes:    0 bytes (0%, 0/Minstr), 0/byte
1899   │         Allocated at {
1900   │           ^1: 0x10871D: cm (sig.c:21)
1901   │           #2: 0x108751: c3 (sig.c:24)
1902   │         }
1903   │       }
1904   │       ├── AP 1.3.3.1/2 {
1905   │       │     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)
1906   │       │     Max:       4 bytes in 1 blocks, avg size 4 bytes
1907   │       │     At t-gmax: 4 bytes (3.92%) in 1 blocks (6.25%), avg size 4 bytes
1908   │       │     At t-end:  4 bytes (3.92%) in 1 blocks (6.25%), avg size 4 bytes
1909   │       │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1910   │       │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1911   │       │     Accesses: {
1912   │       │       [  0]  - - - - 
1913   │       │     }
1914   │       │     Allocated at {
1915   │       │       ^1: 0x10871D: cm (sig.c:21)
1916   │       │       ^2: 0x108751: c3 (sig.c:24)
1917   │       │       #3: 0x10893F: main (sig.c:69)
1918   │       │     }
1919   │       │   }
1920   │       └── AP 1.3.3.2/2 {
1921   │             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)
1922   │             Max:       3 bytes in 1 blocks, avg size 3 bytes
1923   │             At t-gmax: 3 bytes (2.94%) in 1 blocks (6.25%), avg size 3 bytes
1924   │             At t-end:  3 bytes (2.94%) in 1 blocks (6.25%), avg size 3 bytes
1925   │             Reads:     0 bytes (0%, 0/Minstr), 0/byte
1926   │             Writes:    0 bytes (0%, 0/Minstr), 0/byte
1927   │             Accesses: {
1928   │               [  0]  - - - 
1929   │             }
1930   │             Allocated at {
1931   │               ^1: 0x10871D: cm (sig.c:21)
1932   │               ^2: 0x108751: c3 (sig.c:24)
1933   │               #3: 0x10894D: main (sig.c:70)
1934   │             }
1935   │           }
1936   └─▼ AP 1.4/4 (3 children) {
1937         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)
1938         At t-gmax: 21 bytes (20.59%) in 4 blocks (25%), avg size 5.25 bytes
1939         At t-end:  21 bytes (20.59%) in 4 blocks (25%), avg size 5.25 bytes
1940         Reads:     0 bytes (0%, 0/Minstr), 0/byte
1941         Writes:    0 bytes (0%, 0/Minstr), 0/byte
1942         Allocated at {
1943           #1: 0x10876B: dm (sig.c:27)
1944         }
1945       }
1946       ├── AP 1.4.1/3 {
1947       │     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)
1948       │     Max:       8 bytes in 1 blocks, avg size 8 bytes
1949       │     At t-gmax: 8 bytes (7.84%) in 1 blocks (6.25%), avg size 8 bytes
1950       │     At t-end:  8 bytes (7.84%) in 1 blocks (6.25%), avg size 8 bytes
1951       │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1952       │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1953       │     Accesses: {
1954       │       [  0]  - - - - - - - - 
1955       │     }
1956       │     Allocated at {
1957       │       ^1: 0x10876B: dm (sig.c:27)
1958       │       #2: 0x10895B: main (sig.c:72)
1959       │     }
1960       │   }
1961       ├── AP 1.4.2/3 {
1962       │     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)
1963       │     Max:       7 bytes in 1 blocks, avg size 7 bytes
1964       │     At t-gmax: 7 bytes (6.86%) in 1 blocks (6.25%), avg size 7 bytes
1965       │     At t-end:  7 bytes (6.86%) in 1 blocks (6.25%), avg size 7 bytes
1966       │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1967       │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1968       │     Accesses: {
1969       │       [  0]  - - - - - - - 
1970       │     }
1971       │     Allocated at {
1972       │       ^1: 0x10876B: dm (sig.c:27)
1973       │       #2: 0x108785: d2 (sig.c:29)
1974       │       #3: 0x108969: main (sig.c:73)
1975       │     }
1976       │   }
1977       └─▼ AP 1.4.3/3 (2 children) {
1978             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)
1979             At t-gmax: 6 bytes (5.88%) in 2 blocks (12.5%), avg size 3 bytes
1980             At t-end:  6 bytes (5.88%) in 2 blocks (12.5%), avg size 3 bytes
1981             Reads:     0 bytes (0%, 0/Minstr), 0/byte
1982             Writes:    0 bytes (0%, 0/Minstr), 0/byte
1983             Allocated at {
1984               ^1: 0x10876B: dm (sig.c:27)
1985               #2: 0x10879F: d3 (sig.c:30)
1986             }
1987           }
1988           ├── AP 1.4.3.1/2 {
1989           │     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)
1990           │     Max:       4 bytes in 1 blocks, avg size 4 bytes
1991           │     At t-gmax: 4 bytes (3.92%) in 1 blocks (6.25%), avg size 4 bytes
1992           │     At t-end:  4 bytes (3.92%) in 1 blocks (6.25%), avg size 4 bytes
1993           │     Reads:     0 bytes (0%, 0/Minstr), 0/byte
1994           │     Writes:    0 bytes (0%, 0/Minstr), 0/byte
1995           │     Accesses: {
1996           │       [  0]  - - - - 
1997           │     }
1998           │     Allocated at {
1999           │       ^1: 0x10876B: dm (sig.c:27)
2000           │       ^2: 0x10879F: d3 (sig.c:30)
2001           │       #3: 0x108977: main (sig.c:74)
2002           │     }
2003           │   }
2004           └── AP 1.4.3.2/2 {
2005                 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)
2006                 Max:       2 bytes in 1 blocks, avg size 2 bytes
2007                 At t-gmax: 2 bytes (1.96%) in 1 blocks (6.25%), avg size 2 bytes
2008                 At t-end:  2 bytes (1.96%) in 1 blocks (6.25%), avg size 2 bytes
2009                 Reads:     0 bytes (0%, 0/Minstr), 0/byte
2010                 Writes:    0 bytes (0%, 0/Minstr), 0/byte
2011                 Accesses: {
2012                   [  0]  - - 
2013                 }
2014                 Allocated at {
2015                   ^1: 0x10876B: dm (sig.c:27)
2016                   ^2: 0x10879F: d3 (sig.c:30)
2017                   #3: 0x108985: main (sig.c:75)
2018                 }
2019               }
2021 AP significance threshold: (total >= 0.51 bytes (0.5%)) && ((reads == 0 bytes) || (writes == 0 bytes))
2023 //---------------------------------------------------------------------------
2024     },
2025     {
2026       label: "Total (blocks), low-access",
2027       expected:
2028 //---------------------------------------------------------------------------
2030 Invocation {
2031   Command: ./sig
2032   PID:     21476
2035 Times {
2036   t-gmax: 1,311,861 instrs (99.48% of program duration)
2037   t-end:  1,318,783 instrs
2040 ▼ AP 1/1 (2 children) {
2041     Total:     16 blocks (100%, 12.13/Minstr)
2042     Reads:     0.57/byte
2043     Writes:    852.37/byte
2044     Allocated at {
2045       #0: [root]
2046     }
2047   }
2048   ├── AP 1.1/2 {
2049   │     Total:     12 blocks (75%, 9.1/Minstr)
2050   │     Reads:     0.63/byte
2051   │     Writes:    941.68/byte
2052   │     Allocated at {
2053   │       [3 insignificant]
2054   │     }
2055   │   }
2056   └─▼ AP 1.2/2 (1 children) {
2057         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)
2058         At t-gmax: 24 bytes (23.53%) in 4 blocks (25%), avg size 6 bytes
2059         At t-end:  24 bytes (23.53%) in 4 blocks (25%), avg size 6 bytes
2060         Reads:     9 bytes (15.52%, 6.82/Minstr), 0.38/byte
2061         Writes:    13,491 bytes (15.52%, 10,229.89/Minstr), 562.13/byte
2062         Allocated at {
2063           #1: 0x10871D: cm (sig.c:21)
2064         }
2065       }
2066       └── AP 1.2.1/1 {
2067             Total:     4 blocks (25%, 3.03/Minstr)
2068             Reads:     0.38/byte
2069             Writes:    562.13/byte
2070             Allocated at {
2071               [3 insignificant]
2072             }
2073           }
2075 AP significance threshold: (total >= 0.08 blocks (0.5%)) && (reads != 0 bytes) && (writes != 0 bytes) && ((reads <= 0.4/byte) || (writes <= 0.4/byte))
2077 //---------------------------------------------------------------------------
2078     },
2079     {
2080       label: "Writes (bytes), high-access",
2081       expected:
2082 //---------------------------------------------------------------------------
2084 Invocation {
2085   Command: ./sig
2086   PID:     21476
2089 Times {
2090   t-gmax: 1,311,861 instrs (99.48% of program duration)
2091   t-end:  1,318,783 instrs
2094 ▼ AP 1/1 (4 children) {
2095     Writes:    86,942 bytes (100%, 65,925.93/Minstr), 852.37/byte
2096     Allocated at {
2097       #0: [root]
2098     }
2099   }
2100   ├─▼ AP 1.1/4 (3 children) {
2101   │     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)
2102   │     At t-gmax: 30 bytes (29.41%) in 4 blocks (25%), avg size 7.5 bytes
2103   │     At t-end:  30 bytes (29.41%) in 4 blocks (25%), avg size 7.5 bytes
2104   │     Reads:     30 bytes (51.72%, 22.75/Minstr), 1/byte
2105   │     Writes:    44,970 bytes (51.72%, 34,099.62/Minstr), 1,499/byte
2106   │     Allocated at {
2107   │       #1: 0x108681: am (sig.c:9)
2108   │     }
2109   │   }
2110   │   ├── AP 1.1.1/3 {
2111   │   │     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)
2112   │   │     Max:       11 bytes in 1 blocks, avg size 11 bytes
2113   │   │     At t-gmax: 11 bytes (10.78%) in 1 blocks (6.25%), avg size 11 bytes
2114   │   │     At t-end:  11 bytes (10.78%) in 1 blocks (6.25%), avg size 11 bytes
2115   │   │     Reads:     11 bytes (18.97%, 8.34/Minstr), 1/byte
2116   │   │     Writes:    16,489 bytes (18.97%, 12,503.19/Minstr), 1,499/byte
2117   │   │     Accesses: {
2118   │   │       [  0]  1500 〃 〃 〃 〃 〃 〃 〃 〃 〃 〃 
2119   │   │     }
2120   │   │     Allocated at {
2121   │   │       ^1: 0x108681: am (sig.c:9)
2122   │   │       #2: 0x10883C: main (sig.c:57)
2123   │   │     }
2124   │   │   }
2125   │   ├── AP 1.1.2/3 {
2126   │   │     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)
2127   │   │     Max:       10 bytes in 1 blocks, avg size 10 bytes
2128   │   │     At t-gmax: 10 bytes (9.8%) in 1 blocks (6.25%), avg size 10 bytes
2129   │   │     At t-end:  10 bytes (9.8%) in 1 blocks (6.25%), avg size 10 bytes
2130   │   │     Reads:     10 bytes (17.24%, 7.58/Minstr), 1/byte
2131   │   │     Writes:    14,990 bytes (17.24%, 11,366.54/Minstr), 1,499/byte
2132   │   │     Accesses: {
2133   │   │       [  0]  1500 〃 〃 〃 〃 〃 〃 〃 〃 〃 
2134   │   │     }
2135   │   │     Allocated at {
2136   │   │       ^1: 0x108681: am (sig.c:9)
2137   │   │       #2: 0x10869B: a2 (sig.c:11)
2138   │   │       #3: 0x10885B: main (sig.c:58)
2139   │   │     }
2140   │   │   }
2141   │   └─▼ AP 1.1.3/3 (2 children) {
2142   │         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)
2143   │         At t-gmax: 9 bytes (8.82%) in 2 blocks (12.5%), avg size 4.5 bytes
2144   │         At t-end:  9 bytes (8.82%) in 2 blocks (12.5%), avg size 4.5 bytes
2145   │         Reads:     9 bytes (15.52%, 6.82/Minstr), 1/byte
2146   │         Writes:    13,491 bytes (15.52%, 10,229.89/Minstr), 1,499/byte
2147   │         Allocated at {
2148   │           ^1: 0x108681: am (sig.c:9)
2149   │           #2: 0x1086B5: a3 (sig.c:12)
2150   │         }
2151   │       }
2152   │       ├── AP 1.1.3.1/2 {
2153   │       │     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)
2154   │       │     Max:       5 bytes in 1 blocks, avg size 5 bytes
2155   │       │     At t-gmax: 5 bytes (4.9%) in 1 blocks (6.25%), avg size 5 bytes
2156   │       │     At t-end:  5 bytes (4.9%) in 1 blocks (6.25%), avg size 5 bytes
2157   │       │     Reads:     5 bytes (8.62%, 3.79/Minstr), 1/byte
2158   │       │     Writes:    7,495 bytes (8.62%, 5,683.27/Minstr), 1,499/byte
2159   │       │     Accesses: {
2160   │       │       [  0]  1500 〃 〃 〃 〃 
2161   │       │     }
2162   │       │     Allocated at {
2163   │       │       ^1: 0x108681: am (sig.c:9)
2164   │       │       ^2: 0x1086B5: a3 (sig.c:12)
2165   │       │       #3: 0x10887A: main (sig.c:59)
2166   │       │     }
2167   │       │   }
2168   │       └── AP 1.1.3.2/2 {
2169   │             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)
2170   │             Max:       4 bytes in 1 blocks, avg size 4 bytes
2171   │             At t-gmax: 4 bytes (3.92%) in 1 blocks (6.25%), avg size 4 bytes
2172   │             At t-end:  4 bytes (3.92%) in 1 blocks (6.25%), avg size 4 bytes
2173   │             Reads:     4 bytes (6.9%, 3.03/Minstr), 1/byte
2174   │             Writes:    5,996 bytes (6.9%, 4,546.62/Minstr), 1,499/byte
2175   │             Accesses: {
2176   │               [  0]  1500 〃 〃 〃 
2177   │             }
2178   │             Allocated at {
2179   │               ^1: 0x108681: am (sig.c:9)
2180   │               ^2: 0x1086B5: a3 (sig.c:12)
2181   │               #3: 0x108899: main (sig.c:60)
2182   │             }
2183   │           }
2184   ├─▼ AP 1.2/4 (3 children) {
2185   │     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)
2186   │     At t-gmax: 27 bytes (26.47%) in 4 blocks (25%), avg size 6.75 bytes
2187   │     At t-end:  27 bytes (26.47%) in 4 blocks (25%), avg size 6.75 bytes
2188   │     Reads:     19 bytes (32.76%, 14.41/Minstr), 0.7/byte
2189   │     Writes:    28,481 bytes (32.76%, 21,596.43/Minstr), 1,054.85/byte
2190   │     Allocated at {
2191   │       #1: 0x1086CF: bm (sig.c:15)
2192   │     }
2193   │   }
2194   │   ├── AP 1.2.1/3 {
2195   │   │     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)
2196   │   │     Max:       10 bytes in 1 blocks, avg size 10 bytes
2197   │   │     At t-gmax: 10 bytes (9.8%) in 1 blocks (6.25%), avg size 10 bytes
2198   │   │     At t-end:  10 bytes (9.8%) in 1 blocks (6.25%), avg size 10 bytes
2199   │   │     Reads:     10 bytes (17.24%, 7.58/Minstr), 1/byte
2200   │   │     Writes:    14,990 bytes (17.24%, 11,366.54/Minstr), 1,499/byte
2201   │   │     Accesses: {
2202   │   │       [  0]  1500 〃 〃 〃 〃 〃 〃 〃 〃 〃 
2203   │   │     }
2204   │   │     Allocated at {
2205   │   │       ^1: 0x1086CF: bm (sig.c:15)
2206   │   │       #2: 0x1088B8: main (sig.c:62)
2207   │   │     }
2208   │   │   }
2209   │   ├── AP 1.2.2/3 {
2210   │   │     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)
2211   │   │     Max:       9 bytes in 1 blocks, avg size 9 bytes
2212   │   │     At t-gmax: 9 bytes (8.82%) in 1 blocks (6.25%), avg size 9 bytes
2213   │   │     At t-end:  9 bytes (8.82%) in 1 blocks (6.25%), avg size 9 bytes
2214   │   │     Reads:     9 bytes (15.52%, 6.82/Minstr), 1/byte
2215   │   │     Writes:    13,491 bytes (15.52%, 10,229.89/Minstr), 1,499/byte
2216   │   │     Accesses: {
2217   │   │       [  0]  1500 〃 〃 〃 〃 〃 〃 〃 〃 
2218   │   │     }
2219   │   │     Allocated at {
2220   │   │       ^1: 0x1086CF: bm (sig.c:15)
2221   │   │       #2: 0x1086E9: b2 (sig.c:17)
2222   │   │       #3: 0x1088D7: main (sig.c:63)
2223   │   │     }
2224   │   │   }
2225   │   └── AP 1.2.3/3 {
2226   │         Writes:    0 bytes (0%, 0/Minstr), 0/byte
2227   │         Allocated at {
2228   │           [1 insignificant]
2229   │         }
2230   │       }
2231   ├─▼ AP 1.3/4 (2 children) {
2232   │     Writes:    13,491 bytes (15.52%, 10,229.89/Minstr), 562.13/byte
2233   │     Allocated at {
2234   │       #1: 0x10871D: cm (sig.c:21)
2235   │     }
2236   │   }
2237   │   ├── AP 1.3.1/2 {
2238   │   │     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)
2239   │   │     Max:       9 bytes in 1 blocks, avg size 9 bytes
2240   │   │     At t-gmax: 9 bytes (8.82%) in 1 blocks (6.25%), avg size 9 bytes
2241   │   │     At t-end:  9 bytes (8.82%) in 1 blocks (6.25%), avg size 9 bytes
2242   │   │     Reads:     9 bytes (15.52%, 6.82/Minstr), 1/byte
2243   │   │     Writes:    13,491 bytes (15.52%, 10,229.89/Minstr), 1,499/byte
2244   │   │     Accesses: {
2245   │   │       [  0]  1500 〃 〃 〃 〃 〃 〃 〃 〃 
2246   │   │     }
2247   │   │     Allocated at {
2248   │   │       ^1: 0x10871D: cm (sig.c:21)
2249   │   │       #2: 0x108912: main (sig.c:67)
2250   │   │     }
2251   │   │   }
2252   │   └── AP 1.3.2/2 {
2253   │         Writes:    0 bytes (0%, 0/Minstr), 0/byte
2254   │         Allocated at {
2255   │           [2 insignificant]
2256   │         }
2257   │       }
2258   └── AP 1.4/4 {
2259         Writes:    0 bytes (0%, 0/Minstr), 0/byte
2260         Allocated at {
2261           [1 insignificant]
2262         }
2263       }
2265 AP significance threshold: (writes >= 434.71 bytes (0.5%)) && ((reads >= 1,000/byte) || (writes >= 1,000/byte))
2267 //---------------------------------------------------------------------------
2268     }
2269   ]
2271 tests.push(sig);
2273 //---------------------------------------------------------------------------
2274 // sig2 (doesn't corresponds to a .c file)
2275 //---------------------------------------------------------------------------
2277 let sig2 = {
2278   name: "sig2",
2279   input:
2280 //---------------------------------------------------------------------------
2281 {"dhatFileVersion":1
2282 ,"cmd":"subseqs"
2283 ,"pid":0
2284 ,"mi":10000,"ei":20000
2285 ,"aps":
2286  [{"tb":100,"tbk":1,"tli":1000
2287   ,"mb":100,"mbk":1
2288   ,"gb":100,"gbk":1
2289   ,"fb":0,"fbk":0
2290   ,"rb":0,"wb":0
2291   ,"acc":[-10,0]
2292   ,"fs":[1]
2293   }
2294  ,{"tb":101,"tbk":1,"tli":1000
2295   ,"mb":101,"mbk":1
2296   ,"gb":101,"gbk":1
2297   ,"fb":0,"fbk":0
2298   ,"rb":0,"wb":0
2299   ,"acc":[-10,0]
2300   ,"fs":[2]
2301   }
2302  ,{"tb":102,"tbk":1,"tli":1000
2303   ,"mb":102,"mbk":1
2304   ,"gb":102,"gbk":1
2305   ,"fb":0,"fbk":0
2306   ,"rb":0,"wb":0
2307   ,"acc":[-10,0]
2308   ,"fs":[3,4]
2309   }
2310  ,{"tb":103,"tbk":1,"tli":1000
2311   ,"mb":103,"mbk":1
2312   ,"gb":103,"gbk":1
2313   ,"fb":0,"fbk":0
2314   ,"rb":0,"wb":0
2315   ,"acc":[-10,0]
2316   ,"fs":[3,5]
2317   }
2318  ,{"tb":104,"tbk":1,"tli":1000
2319   ,"mb":104,"mbk":1
2320   ,"gb":104,"gbk":1
2321   ,"fb":0,"fbk":0
2322   ,"rb":0,"wb":0
2323   ,"acc":[-10,0]
2324   ,"fs":[3,6,7]
2325   }
2326  ,{"tb":105,"tbk":1,"tli":1000
2327   ,"mb":105,"mbk":1
2328   ,"gb":105,"gbk":1
2329   ,"fb":0,"fbk":0
2330   ,"rb":0,"wb":0
2331   ,"acc":[-10,0]
2332   ,"fs":[3,6,8]
2333   }
2334  ,{"tb":10,"tbk":1,"tli":1000
2335   ,"mb":10,"mbk":1
2336   ,"gb":10,"gbk":1
2337   ,"fb":0,"fbk":0
2338   ,"rb":0,"wb":0
2339   ,"acc":[-10,0]
2340   ,"fs":[3,6,9,10]
2341   }
2342  ,{"tb":106,"tbk":1,"tli":1000
2343   ,"mb":106,"mbk":1
2344   ,"gb":106,"gbk":1
2345   ,"fb":0,"fbk":0
2346   ,"rb":0,"wb":0
2347   ,"acc":[-10,0]
2348   ,"fs":[3,6,9,11]
2349   }
2350  ,{"tb":107,"tbk":1,"tli":1000
2351   ,"mb":107,"mbk":1
2352   ,"gb":107,"gbk":1
2353   ,"fb":0,"fbk":0
2354   ,"rb":0,"wb":0
2355   ,"acc":[-10,0]
2356   ,"fs":[3,6,9,12]
2357   }
2359 ,"ftbl":
2360  ["[root]"
2361  ,"a1()"
2362  ,"a2()"
2363  ,"a3()"
2364  ,"b1()"
2365  ,"b2()"
2366  ,"b3()"
2367  ,"c1()"
2368  ,"c2()"
2369  ,"c3()"
2370  ,"d1()"
2371  ,"d2()"
2372  ,"d3()"
2375 //---------------------------------------------------------------------------
2376   ,
2377   outputs: [
2378     {
2379       label: "Total (blocks), tiny",
2380       expected:
2381 //---------------------------------------------------------------------------
2383 Invocation {
2384   Command: subseqs
2385   PID:     0
2388 Times {
2389   t-gmax: 10,000 instrs (50% of program duration)
2390   t-end:  20,000 instrs
2393 ▼ AP 1/1 (2 children) {
2394     Total:     9 blocks (100%, 450/Minstr), avg size 93.11 bytes
2395     Allocated at {
2396       #0: [root]
2397     }
2398   }
2399   ├─▼ AP 1.1/2 (2 children) {
2400   │     Total:     7 blocks (77.78%, 350/Minstr), avg size 91 bytes
2401   │     Allocated at {
2402   │       #1: a3()
2403   │     }
2404   │   }
2405   │   ├─▼ AP 1.1.1/2 (2 children) {
2406   │   │     Total:     5 blocks (55.56%, 250/Minstr), avg size 86.4 bytes
2407   │   │     Allocated at {
2408   │   │       #2: b3()
2409   │   │     }
2410   │   │   }
2411   │   │   ├─▼ AP 1.1.1.1/2 (2 children) {
2412   │   │   │     Total:     3 blocks (33.33%, 150/Minstr), avg size 74.33 bytes
2413   │   │   │     Allocated at {
2414   │   │   │       #3: c3()
2415   │   │   │     }
2416   │   │   │   }
2417   │   │   │   ├── AP 1.1.1.1.1/2 {
2418   │   │   │   │     Total:     2 blocks (22.22%, 100/Minstr), avg size 106.5 bytes
2419   │   │   │   │     Allocated at {
2420   │   │   │   │       [2 insignificant]
2421   │   │   │   │     }
2422   │   │   │   │   }
2423   │   │   │   └── AP 1.1.1.1.2/2 {
2424   │   │   │         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)
2425   │   │   │         Max:       10 bytes in 1 blocks, avg size 10 bytes
2426   │   │   │         At t-gmax: 10 bytes (1.19%) in 1 blocks (11.11%), avg size 10 bytes
2427   │   │   │         At t-end:  0 bytes (0%) in 0 blocks (0%), avg size 0 bytes
2428   │   │   │         Reads:     0 bytes (0%, 0/Minstr), 0/byte
2429   │   │   │         Writes:    0 bytes (0%, 0/Minstr), 0/byte
2430   │   │   │         Accesses: {
2431   │   │   │           [  0]  - - - - - - - - - - 
2432   │   │   │         }
2433   │   │   │         Allocated at {
2434   │   │   │           ^1: a3()
2435   │   │   │           ^2: b3()
2436   │   │   │           ^3: c3()
2437   │   │   │           #4: d1()
2438   │   │   │         }
2439   │   │   │       }
2440   │   │   └── AP 1.1.1.2/2 {
2441   │   │         Total:     2 blocks (22.22%, 100/Minstr), avg size 104.5 bytes
2442   │   │         Allocated at {
2443   │   │           [2 insignificant]
2444   │   │         }
2445   │   │       }
2446   │   └── AP 1.1.2/2 {
2447   │         Total:     2 blocks (22.22%, 100/Minstr), avg size 102.5 bytes
2448   │         Allocated at {
2449   │           [2 insignificant]
2450   │         }
2451   │       }
2452   └── AP 1.2/2 {
2453         Total:     2 blocks (22.22%, 100/Minstr), avg size 100.5 bytes
2454         Allocated at {
2455           [2 insignificant]
2456         }
2457       }
2459 AP significance threshold: (total >= 0.05 blocks (0.5%)) && (total avg size <= 16 bytes)
2461 //---------------------------------------------------------------------------
2462     }
2463   ]
2465 tests.push(sig2);
2467 //---------------------------------------------------------------------------
2468 // Code
2469 //---------------------------------------------------------------------------
2471 function runTests() {
2472   let pre = appendElement(gTestingDiv, "pre");
2474   for (let [i, test] of tests.entries()) {
2475     let name = test.name;
2476     gData = test.input;
2478     for (let output of test.outputs) {
2479       // Set the sort metric.
2480       let label = output.label;
2481       let j = 0;
2482       let labelFound = false;
2483       for (let opt of gSelect.options) {
2484         if (gSelectData[opt.value].label == label) {
2485           gSelect.selectedIndex = j;
2486           labelFound = true;
2487           break;
2488         }
2489         j++;
2490       }
2491       assert(labelFound, "test label not found in gSelectData");
2493       // Build and display the tree.
2494       tryFunc(() => {
2495         gFilename = "TEST MODE";
2496         buildTree();
2497         displayTree();
2498       });
2500       // Compare actual text output against expected.
2501       let expected = output.expected;
2502       let actual = gMainDiv.textContent;
2504       let id = `Test ${i} - ${test.name} - ${label}`;
2506       if (expected !== actual) {
2507         // Test failed. Do a crude diff: find the line and column of the first
2508         // char that differs.
2509         let j = 0, line = 1, col = 1;
2510         while (expected[j] === actual[j]) {
2511           if (expected[j] === "\n") {
2512             line++;
2513             col = 1;
2514           } else {
2515             col++;
2516           }
2517           j++;
2518         }
2520         let s = `\
2521 FAIL - ${id}
2523 Expected length: ${expected.length}, actual length: ${actual.length}
2524 First differing char at ${line}:${col}
2526 EXPECTED OUTPUT
2530         // Print line numbers for the expected output, because it makes it much
2531         // easier to find the first differing char.
2532         for (let [n, line] of expected.split('\n').entries()) {
2533           s += `${(n + 1).toString().padStart(3)} ${line}\n`;
2534         }
2536         s += ">>>";
2538         appendElementWithText(pre, "div", s);
2539         return;  // stop on the first failure
2540       }
2542       // Test passed.
2543       appendElementWithText(pre, "div", `PASS - ${id}`);
2544     }
2545   }
2547   clearMainDivWithText("All tests passed");
2550 runTests();