Improve profile report

Print profiled events in the right order with the right nesting