Skip to contentSkip to conversation

linux-user and profiler

PATCH New Laurent Desnogues 1 participant 1 message Nov 7, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user and profiler

Hello,

here is a patch that calls dump_exec_info before calling
exit and exit_group when CONFIG_PROFILER is defined. Something similar should be done for bsd-user and darwin-user, but I have no way to test them.

Laurent

syscall.c +6 -0
Index: linux-user/syscall.c
===================================================================
@@ -3396,6 +3396,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 */
         sys_exit(arg1);
@@ -4870,6 +4873,9 @@
 #ifdef HAVE_GPROF
         _mcleanup();
 #endif
+#ifdef CONFIG_PROFILER
+        dump_exec_info(stderr, fprintf);
+#endif
         gdb_exit(cpu_env, arg1);
         ret = get_errno(exit_group(arg1));
         break;