Added heap profiling. The graph generated by hp2ps is very weird...
Reorganized profiling.