
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.184       27,041           1           7   27041782 main()
 37.1        0.278       10,019           5           5    2003920 f2()
 37.1         0.22       10,019           5          10    2003864 IO Phase
 37.0       10,006       10,006           5           0    2001294 f3()
 25.9        0.087        7,007           1           3    7007572 Iteration 4
 25.9        0.087        7,007           1           3    7007572 main()  => Iteration 4
 22.2        6,012        6,012           6           0    1002145 f1()
 22.2        0.089        6,006           1           3    6006710 Iteration 3
 22.2        0.089        6,006           1           3    6006710 main()  => Iteration 3
 18.5        5,009        5,009           5           0    1001946 IO Phase  => output
 18.5        5,009        5,009           5           0    1001946 output
 18.5        5,009        5,009           5           0    1001874 IO Phase  => input
 18.5        5,009        5,009           5           0    1001874 input
 18.5        0.085        5,007           1           3    5007739 Iteration 2
 18.5        0.085        5,007           1           3    5007739 main()  => Iteration 2
 14.8        0.082        4,008           1           3    4008758 Iteration 1
 14.8        0.082        4,008           1           3    4008758 main()  => Iteration 1
 14.8        4,001        4,001           1           0    4001734 Iteration 4  => f3()
 11.1        0.398        3,006           1           3    3006980 Iteration 0
 11.1        0.398        3,006           1           3    3006980 main()  => Iteration 0
 11.1        3,000        3,000           1           0    3000879 Iteration 3  => f3()
  7.4         0.06        2,004           1           1    2004009 Iteration 0  => f2()
  7.4         0.07        2,003           1           2    2003949 Iteration 0  => IO Phase
  7.4        0.054        2,003           1           1    2003927 Iteration 1  => f2()
  7.4        0.053        2,003           1           1    2003900 Iteration 2  => f2()
  7.4        0.057        2,003           1           1    2003900 Iteration 4  => f2()
  7.4         0.04        2,003           1           2    2003873 Iteration 1  => IO Phase
  7.4        0.054        2,003           1           1    2003863 Iteration 3  => f2()
  7.4        0.035        2,003           1           2    2003847 Iteration 2  => IO Phase
  7.4        0.038        2,003           1           2    2003843 Iteration 4  => IO Phase
  7.4        0.037        2,003           1           2    2003809 Iteration 3  => IO Phase
  7.4        2,001        2,001           1           0    2001871 Iteration 2  => f3()
  3.7        1,002        1,002           1           0    1002797 Iteration 1  => f1()
  3.7        1,002        1,002           1           0    1002538 Iteration 0  => f1()
  3.7        1,001        1,001           1           0    1001952 Iteration 1  => f3()
  3.7        1,001        1,001           1           0    1001923 main()  => f1()
  3.7        1,001        1,001           1           0    1001916 f4()
  3.7        1,001        1,001           1           0    1001916 main()  => f4()
  3.7        1,001        1,001           1           0    1001883 Iteration 2  => f1()
  3.7        1,001        1,001           1           0    1001879 Iteration 3  => f1()
  3.7        1,001        1,001           1           0    1001851 Iteration 4  => f1()
  0.0        0.035        0.035           1           0         35 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.211       27,039           1           7   27039693 main()
 37.1        0.108       10,019           5           5    2003880 f2()
 37.1        0.149       10,019           5          10    2003858 IO Phase
 37.0       10,007       10,007           5           0    2001466 f3()
 25.9         0.31        7,007           1           3    7007619 Iteration 4
 22.2        6,010        6,010           6           0    1001825 f1()
 22.2        0.335        6,007           1           3    6007563 Iteration 3
 18.5        5,009        5,009           5           0    1001924 input
 18.5        5,009        5,009           5           0    1001905 output
 18.5        0.056        5,007           1           3    5007634 Iteration 2
 14.8        0.055        4,007           1           3    4007673 Iteration 1
 11.1        0.116        3,006           1           3    3006139 Iteration 0
  3.7        1,000        1,000           1           0    1000930 f4()


