init revision 12027
111264Sandreas.sandberg@arm.com#! /bin/awk -f
211264Sandreas.sandberg@arm.com
311264Sandreas.sandberg@arm.comBEGIN {
411264Sandreas.sandberg@arm.com  purpose = "Report time used to initialize a thread."
511264Sandreas.sandberg@arm.com  nmach = 0;
611264Sandreas.sandberg@arm.com
711264Sandreas.sandberg@arm.com  test_single = "1";
811264Sandreas.sandberg@arm.com  test_v0 = "14";
911264Sandreas.sandberg@arm.com  test_v2 = "15";
1011264Sandreas.sandberg@arm.com  test_v4 = "16";
1111264Sandreas.sandberg@arm.com  test_v8 = "17";
1211264Sandreas.sandberg@arm.com}
1311264Sandreas.sandberg@arm.com
1411264Sandreas.sandberg@arm.com{
1511264Sandreas.sandberg@arm.com  mach = $1
1611264Sandreas.sandberg@arm.com  test = $2
1711264Sandreas.sandberg@arm.com  iter = $3
1811264Sandreas.sandberg@arm.com  time = $6 + $8
1911264Sandreas.sandberg@arm.com
2011264Sandreas.sandberg@arm.com  if (machi[mach] == 0) {
2111264Sandreas.sandberg@arm.com    machn[nmach] = mach;
2211264Sandreas.sandberg@arm.com    machi[mach] = 1;
2311264Sandreas.sandberg@arm.com    ++nmach;
2411264Sandreas.sandberg@arm.com  }
2511264Sandreas.sandberg@arm.com
2611264Sandreas.sandberg@arm.com  us_per_op = time / iter * 1000000
2711264Sandreas.sandberg@arm.com  times[mach "_" test] = us_per_op;
2811264Sandreas.sandberg@arm.com}
2911264Sandreas.sandberg@arm.com
3011264Sandreas.sandberg@arm.com
3111264Sandreas.sandberg@arm.comEND {
3211264Sandreas.sandberg@arm.com  for (i=0; i<nmach; ++i) {
3311264Sandreas.sandberg@arm.com    m = machn[i];
3411264Sandreas.sandberg@arm.com
3511264Sandreas.sandberg@arm.com    single = times[m "_" test_single];
3611264Sandreas.sandberg@arm.com    v0 = times[m "_" test_v0];
3711264Sandreas.sandberg@arm.com    v2 = times[m "_" test_v2];
3811264Sandreas.sandberg@arm.com    v4 = times[m "_" test_v4];
3911264Sandreas.sandberg@arm.com    v8 = times[m "_" test_v8];
4011264Sandreas.sandberg@arm.com    printf ("%s|%3.1f|%3.1f|%3.1f|%3.1f|%3.1f\n", m, single, v0, v2, v4, v8);
4111264Sandreas.sandberg@arm.com  }
4211264Sandreas.sandberg@arm.com}
4311264Sandreas.sandberg@arm.com