Add GC profiling and undo-goal-ended