summaryrefslogtreecommitdiff
path: root/ext/systemc/src/sysc/qt/time/prim
blob: 22b323f6fb6655e5d2c239e6f10caaef6c3140b3 (plain)
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
32
33
34
35
36
37
38
39
40
41
#! /bin/awk -f

BEGIN {
  purpose = "report times for microbenchmarks"

  nmach = 0;

  test_callind = "18";
  test_callimm = "18";
  test_addreg = "20";
  test_loadreg = "21";
}

{
  mach = $1
  test = $2
  iter = $3
  time = $6 + $8

  if (machi[mach] == 0) {
    machn[nmach] = mach;
    machi[mach] = 1;
    ++nmach;
  }

  ns_per_op = time / iter * 1000000
  times[mach "_" test] = ns_per_op;
}


END {
  for (i=0; i<nmach; ++i) {
    m = machn[i];

    ind = times[m "_" test_callind];
    imm = times[m "_" test_callimm];
    add = times[m "_" test_addreg];
    load = times[m "_" test_loadreg];
    printf ("%s|%1.3f|%1.3f|%1.3f|%1.3f\n", m, ind, imm, add, load);
  }
}