implemented profiler mode 1 with basic dumping