
Running this code when TAU is configured with -PROFILEPHASE should result in profiles such as:

> pprof
Reading Profile files in profile.*

NODE 0;CONTEXT 0;THREAD 0:
---------------------------------------------------------------------------------------
%Time    Exclusive    Inclusive       #Call      #Subrs  Inclusive Name
              msec   total msec                          usec/call
---------------------------------------------------------------------------------------
100.0        0.641       27,040           1           7   27040906 main()
 37.1        0.235       10,018           5           5    2003745 f2()
 37.0        0.225       10,018           5          10    2003698 IO Phase
 37.0       10,006       10,006           5           0    2001320 f3()
 25.9        0.075        7,006           1           3    7006714 Iteration 4
 25.9        0.075        7,006           1           3    7006714 main()   => Iteration 4
 22.2        6,012        6,012           6           0    1002100 f1()
 22.2         0.08        6,006           1           3    6006796 Iteration 3
 22.2         0.08        6,006           1           3    6006796 main()   => Iteration 3
 18.5        5,009        5,009           5           0    1001904 IO Phase   => input
 18.5        5,009        5,009           5           0    1001904 input
 18.5        5,008        5,008           5           0    1001749 IO Phase   => output
 18.5        5,008        5,008           5           0    1001749 output
 18.5        0.074        5,007           1           3    5007764 Iteration 2
 18.5        0.074        5,007           1           3    5007764 main()   => Iteration 2
 14.8        0.065        4,008           1           3    4008717 Iteration 1
 14.8        0.065        4,008           1           3    4008717 main()   => Iteration 1
 14.8        4,000        4,000           1           0    4000865 Iteration 4     => f3()
 11.1        0.103        3,006           1           3    3006373 Iteration 0
 11.1        0.103        3,006           1           3    3006373 main()   => Iteration 0
 11.1        3,001        3,001           1           0    3001887 Iteration 3     => f3()
  7.4         0.03        2,003           1           1    2003965 Iteration 0     => f2()
  7.4         0.05        2,003           1           1    2003951 Iteration 2     => f2()
  7.4        0.053        2,003           1           2    2003935 Iteration 0     => IO Phase
  7.4        0.052        2,003           1           1    2003931 Iteration 4     => f2()
  7.4        0.049        2,003           1           1    2003915 Iteration 1     => f2()
  7.4        0.041        2,003           1           2    2003901 Iteration 2     => IO Phase
  7.4        0.041        2,003           1           2    2003879 Iteration 4     => IO Phase
  7.4         0.05        2,003           1           2    2003866 Iteration 1     => IO Phase
  7.4        0.054        2,002           1           1    2002964 Iteration 3     => f2()
  7.4         0.04        2,002           1           2    2002910 Iteration 3     => IO Phase
  7.4        2,001        2,001           1           0    2001881 Iteration 2     => f3()
  3.7        1,002        1,002           1           0    1002799 Iteration 1     => f1()
  3.7        1,002        1,002           1           0    1002277 Iteration 0     => f1()
  3.7        1,001        1,001           1           0    1001959 main()   => f1()
  3.7        1,001        1,001           1           0    1001942 f4()
  3.7        1,001        1,001           1           0    1001942 main()   => f4()
  3.7        1,001        1,001           1           0    1001938 Iteration 1     => f3()
  3.7        1,001        1,001           1           0    1001865 Iteration 3     => f1()
  3.7        1,001        1,001           1           0    1001858 Iteration 2     => f1()
  3.7        1,001        1,001           1           0    1001843 Iteration 4     => f1()
  0.0        0.028        0.028           1           0         28 Iteration 0     => f3()


This program has 7 phases, 'main()', Iteration 0-4, and 'IO Phase'.  This
sample demonstrates both dynamic and static phase definitions.  The iterations
are dynamic phases since the name changes each time (registration occurs each
time).  IO Phase is a static phase because the name will never change.  Static
phases should be preferred due to the lower overhead (registration occurs only
once).

If the sample is executed when TAU is configured without -PROFILEPHASE, a
profile similar to the following will result.

> pprof
Reading Profile files in profile.*

NODE 0;CONTEXT 0;THREAD 0:
---------------------------------------------------------------------------------------
%Time    Exclusive    Inclusive       #Call      #Subrs  Inclusive Name
              msec   total msec                          usec/call
---------------------------------------------------------------------------------------
100.0         0.63       27,039           1           7   27039549 main()
 37.1        0.081       10,018           5           5    2003757 f2()
 37.1        0.193       10,018           5          10    2003741 IO Phase
 37.0       10,006       10,006           5           0    2001397 f3()
 25.9        0.046        7,007           1           3    7007212 Iteration 4
 22.2        6,010        6,010           6           0    1001827 f1()
 22.2        0.049        6,007           1           3    6007346 Iteration 3
 18.5        5,009        5,009           5           0    1001917 input
 18.5        5,008        5,008           5           0    1001785 output
 18.5        0.047        5,007           1           3    5007361 Iteration 2
 14.8        0.044        4,007           1           3    4007480 Iteration 1
 11.1        0.093        3,005           1           3    3005671 Iteration 0
  3.7        1,001        1,001           1           0    1001906 f4()
