Skip to contentSkip to conversation

Dump profiler information when exiting (user emulation)

PATCH New Laurent Desnogues 1 participant 1 message Jun 12, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Dump profiler information when exiting (user emulation)

This patch calls dump_exec_info when _exit or exit_group syscall is run.

Laurent

linux-user/syscall.c +6 -0
@@ -3236,6 +3236,9 @@
 #ifdef HAVE_GPROF
         _mcleanup();
 #endif
+#ifdef CONFIG_PROFILER
+        dump_exec_info(stderr, fprintf);
+#endif
         gdb_exit(cpu_env, arg1);
         /* XXX: should free thread stack and CPU env */
         _exit(arg1);
@@ -4662,6 +4665,9 @@
 #ifdef __NR_exit_group
         /* new thread calls */
     case TARGET_NR_exit_group:
+#ifdef CONFIG_PROFILER
+        dump_exec_info(stderr, fprintf);
+#endif
         gdb_exit(cpu_env, arg1);
         ret = get_errno(exit_group(arg1));
         break;