]> git.proxmox.com Git - mirror_qemu.git/blobdiff - linux-user/exit.c
accel/tcg: Move perf and debuginfo support to tcg/
[mirror_qemu.git] / linux-user / exit.c
index 159401544452371033a30cb4d1bb007c29e4e5e1..1ff8fe4f072fcc902d1a202bfc24c516a588b059 100644 (file)
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu/osdep.h"
+#include "tcg/perf.h"
+#include "gdbstub/syscalls.h"
 #include "qemu.h"
-#ifdef CONFIG_GPROF
-#include <sys/gmon.h>
-#endif
+#include "user-internals.h"
+#include "qemu/plugin.h"
 
 #ifdef CONFIG_GCOV
 extern void __gcov_dump(void);
@@ -28,12 +29,10 @@ extern void __gcov_dump(void);
 
 void preexit_cleanup(CPUArchState *env, int code)
 {
-#ifdef CONFIG_GPROF
-        _mcleanup();
-#endif
 #ifdef CONFIG_GCOV
         __gcov_dump();
 #endif
-        gdb_exit(env, code);
-        qemu_plugin_atexit_cb();
+        gdb_exit(code);
+        qemu_plugin_user_exit();
+        perf_exit();
 }