qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] da91c1: linux-user: Clean up when exiting due


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] da91c1: linux-user: Clean up when exiting due to a signal
Date: Tue, 17 Jan 2023 02:29:58 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: da91c19202420d61e3316f5a9d4c2d66bfbaff04
      
https://github.com/qemu/qemu/commit/da91c19202420d61e3316f5a9d4c2d66bfbaff04
  Author: Ilya Leoshkevich <iii@linux.ibm.com>
  Date:   2023-01-16 (Mon, 16 Jan 2023)

  Changed paths:
    M linux-user/signal.c

  Log Message:
  -----------
  linux-user: Clean up when exiting due to a signal

When exiting due to an exit() syscall, qemu-user calls
preexit_cleanup(), but this is currently not the case when exiting due
to a signal. This leads to various buffers not being flushed (e.g.,
for gprof, for gcov, and for the upcoming perf support).

Add the missing call.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230112152013.125680-2-iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 7c10cb38ccb86a0e56fff32bb348aa4b34e17e10
      
https://github.com/qemu/qemu/commit/7c10cb38ccb86a0e56fff32bb348aa4b34e17e10
  Author: Ilya Leoshkevich <iii@linux.ibm.com>
  Date:   2023-01-16 (Mon, 16 Jan 2023)

  Changed paths:
    A accel/tcg/debuginfo.c
    A accel/tcg/debuginfo.h
    M accel/tcg/meson.build
    M hw/core/loader.c
    M linux-user/elfload.c
    M linux-user/meson.build
    M meson.build

  Log Message:
  -----------
  accel/tcg: Add debuginfo support

Add libdw-based functions for loading and querying debuginfo. Load
debuginfo from the system and the linux-user loaders.

This is useful for the upcoming perf support, which can then put
human-readable guest symbols instead of raw guest PCs into perfmap and
jitdump files.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230112152013.125680-3-iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 5584e2dbe8c9c95ceb178786fb88e5edf625e1b6
      
https://github.com/qemu/qemu/commit/5584e2dbe8c9c95ceb178786fb88e5edf625e1b6
  Author: Ilya Leoshkevich <iii@linux.ibm.com>
  Date:   2023-01-16 (Mon, 16 Jan 2023)

  Changed paths:
    M accel/tcg/meson.build
    A accel/tcg/perf.c
    A accel/tcg/perf.h
    M accel/tcg/translate-all.c
    M docs/devel/tcg.rst
    M linux-user/exit.c
    M linux-user/main.c
    M qemu-options.hx
    M softmmu/vl.c
    M tcg/tcg.c

  Log Message:
  -----------
  tcg: add perfmap and jitdump

Add ability to dump /tmp/perf-<pid>.map and jit-<pid>.dump.
The first one allows the perf tool to map samples to each individual
translation block. The second one adds the ability to resolve symbol
names, line numbers and inspect JITed code.

Example of use:

    perf record qemu-x86_64 -perfmap ./a.out
    perf report

or

    perf record -k 1 qemu-x86_64 -jitdump ./a.out
    DEBUGINFOD_URLS= perf inject -j -i perf.data -o perf.data.jitted
    perf report -i perf.data.jitted

Co-developed-by: Vanderson M. do Rosario <vandersonmr2@gmail.com>
Co-developed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230112152013.125680-4-iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 701ea5870d3752173d0c78d79d9d1f57757a8036
      
https://github.com/qemu/qemu/commit/701ea5870d3752173d0c78d79d9d1f57757a8036
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-01-16 (Mon, 16 Jan 2023)

  Changed paths:
    M meson.build
    M util/bufferiszero.c

  Log Message:
  -----------
  util/bufferiszero: Use __attribute__((target)) for avx2/avx512

Use the attribute, which is supported by clang, instead of
the #pragma, which is not supported and, for some reason,
also not detected by the meson probe, so we fail by -Werror.

Include only <immintrin.h> as that is the outermost "official"
header for these intrinsics -- emmintrin.h and smmintrin -- are
older SSE2 and SSE4 specific headers, while the immintrin.h
includes all of the Intel intrinsics.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 61710a7e23a63546da0071ea32adb96476fa5d07
      
https://github.com/qemu/qemu/commit/61710a7e23a63546da0071ea32adb96476fa5d07
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-01-16 (Mon, 16 Jan 2023)

  Changed paths:
    M accel/tcg/cpu-exec.c

  Log Message:
  -----------
  accel/tcg: Split out cpu_exec_{setjmp,loop}

Recently the g_assert(cpu == current_cpu) test has been
intermittently failing with gcc.  Reorg the code around
the setjmp to minimize the lifetime of the cpu variable
affected by the setjmp.

This appears to fix the existing issue with clang as well.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1147
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 7c9236d6d61f30583d5d860097d88dbf0fe487bf
      
https://github.com/qemu/qemu/commit/7c9236d6d61f30583d5d860097d88dbf0fe487bf
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-01-17 (Tue, 17 Jan 2023)

  Changed paths:
    M accel/tcg/cpu-exec.c
    A accel/tcg/debuginfo.c
    A accel/tcg/debuginfo.h
    M accel/tcg/meson.build
    A accel/tcg/perf.c
    A accel/tcg/perf.h
    M accel/tcg/translate-all.c
    M docs/devel/tcg.rst
    M hw/core/loader.c
    M linux-user/elfload.c
    M linux-user/exit.c
    M linux-user/main.c
    M linux-user/meson.build
    M linux-user/signal.c
    M meson.build
    M qemu-options.hx
    M softmmu/vl.c
    M tcg/tcg.c
    M util/bufferiszero.c

  Log Message:
  -----------
  Merge tag 'pull-tcg-20230116' of https://gitlab.com/rth7680/qemu into staging

- Reorg cpu_tb_exec around setjmp.
- Use __attribute__((target)) for buffer_is_zero.
- Add perfmap and jitdump for perf support.

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmPFtXgdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV+62Af/YLdd77+IO8wcPN1n
# 2esKNlrrYQ2/x40Hede6L4pp+Qz6M810YgNbhMchBS3u8YGIFzmVLaiz5N4nBGTq
# ricOit6Jj2KonlxWaxgma1BW36ydBIwphC20WjrLTVgdNGvxmy4JKbfklTd4oIZ+
# +Kf1VTN1bbt7vfDntd454ck2rhtVZBEvYTynikA3LJ1W7EVN5etDUnrN3VwbaTTK
# 0aY8MbDfGUASyrDzmaRcF5F90K+V2STuEUs1whgOuTBusZ6n3+FSDhW8CuDhsy/l
# rXtPkQba3rtUWfJ1+o7bx3Gg4nbfn/9lxIfGwhQ79ywD9InjqLqu9etwVyhijx+n
# k+tvPw==
# =xFfF
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 16 Jan 2023 20:37:12 GMT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" 
[full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* tag 'pull-tcg-20230116' of https://gitlab.com/rth7680/qemu:
  accel/tcg: Split out cpu_exec_{setjmp,loop}
  util/bufferiszero: Use __attribute__((target)) for avx2/avx512
  tcg: add perfmap and jitdump
  accel/tcg: Add debuginfo support
  linux-user: Clean up when exiting due to a signal

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/2f8d6a88e449...7c9236d6d61f



reply via email to

[Prev in Thread] Current Thread [Next in Thread]