linux-user and profiler
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
Signed-off-by Laurent Desnogues <[email protected]>
syscall.c +6 -0
@@ -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 ;