]> git.proxmox.com Git - mirror_qemu.git/blobdiff - linux-user/exit.c
target/hppa: Fix possible overflow in TLB size calculation
[mirror_qemu.git] / linux-user / exit.c
index a362ef67d2c1103ff2d39d7850374a2c44457eaa..50266314e0a9ab3618567f24cd7d069a052f5d01 100644 (file)
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu/osdep.h"
+#include "accel/tcg/perf.h"
+#include "gdbstub/syscalls.h"
 #include "qemu.h"
-#ifdef TARGET_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 TARGET_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();
 }