# compile code
make

# run command
./gprof_test

# run gprof to generate profiling information
gprof gprof_test > gprof.out

# look at the output file
emacs gprof.out

gprof output is a bit confusing:


index % time    self  children    called     name
-----------------------------------------------
                1.89    1.97       1/1           main [1]
[2]     78.2    1.89    1.97       1         func1 [2]
                0.99    0.00       1/1           func1_child [4]
                0.98    0.00       1/2           func2 [3]
-----------------------------------------------

-> means "time propagated"

		self->parent	self's children->parent
[2]		self		children
		child->self	child's children->self
