Index: linux-user/syscall.c =================================================================== --- linux-user/syscall.c (revision 5643) +++ linux-user/syscall.c (working copy) @@ -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;