prim revision 12027:1eb7dc7aa10b
1#! /bin/awk -f
2
3BEGIN {
4  purpose = "report times for microbenchmarks"
5
6  nmach = 0;
7
8  test_callind = "18";
9  test_callimm = "18";
10  test_addreg = "20";
11  test_loadreg = "21";
12}
13
14{
15  mach = $1
16  test = $2
17  iter = $3
18  time = $6 + $8
19
20  if (machi[mach] == 0) {
21    machn[nmach] = mach;
22    machi[mach] = 1;
23    ++nmach;
24  }
25
26  ns_per_op = time / iter * 1000000
27  times[mach "_" test] = ns_per_op;
28}
29
30
31END {
32  for (i=0; i<nmach; ++i) {
33    m = machn[i];
34
35    ind = times[m "_" test_callind];
36    imm = times[m "_" test_callimm];
37    add = times[m "_" test_addreg];
38    load = times[m "_" test_loadreg];
39    printf ("%s|%1.3f|%1.3f|%1.3f|%1.3f\n", m, ind, imm, add, load);
40  }
41}
42