mbox series

[0/5] log: Add logs for some modules

Message ID 20200806093720.2355692-1-liangpeng10@huawei.com (mailing list archive)
Headers show
Series log: Add logs for some modules | expand

Message

Peng Liang Aug. 6, 2020, 9:37 a.m. UTC
This path serial add some logs for some modeuls to make it easier to debug.

Peng Liang (5):
  log: Add logs for vm start and destroy
  log: Add log for each modules
  log: Add more details to virtio_report in virtqueue_pop
  log: Add log at boot & cpu init for aarch64
  log: Add logs during qemu start

 accel/kvm/kvm-all.c         |  5 ++++-
 blockdev.c                  |  2 ++
 hw/acpi/core.c              |  3 +++
 hw/arm/boot.c               |  2 ++
 hw/arm/virt.c               |  2 ++
 hw/core/reset.c             |  2 ++
 hw/pci/pci.c                |  1 +
 hw/usb/host-libusb.c        |  5 +++++
 hw/virtio/virtio-pci.c      |  2 ++
 hw/virtio/virtio-scsi-pci.c |  3 +++
 hw/virtio/virtio.c          | 17 ++++++++++++++---
 monitor/monitor.c           |  9 +++++++++
 monitor/qmp-cmds.c          |  2 ++
 os-posix.c                  |  1 +
 qapi/qmp-dispatch.c         | 17 +++++++++++++++++
 qdev-monitor.c              |  6 ++++++
 softmmu/vl.c                | 10 ++++++++++
 util/oslib-posix.c          |  3 +--
 18 files changed, 86 insertions(+), 6 deletions(-)

Comments

Thomas Huth Aug. 6, 2020, 10:07 a.m. UTC | #1
On 06/08/2020 11.37, Peng Liang wrote:
> Add logs for vm start and destroy.
> 
> Signed-off-by: Peng Liang <liangpeng10@huawei.com>
> ---
>  hw/acpi/core.c  | 3 +++
>  hw/core/reset.c | 2 ++
>  softmmu/vl.c    | 8 ++++++++
>  3 files changed, 13 insertions(+)
> 
> diff --git a/hw/acpi/core.c b/hw/acpi/core.c
> index ac06db3450..0a24f018cf 100644
> --- a/hw/acpi/core.c
> +++ b/hw/acpi/core.c
> @@ -560,13 +560,16 @@ static void acpi_pm1_cnt_write(ACPIREGS *ar, uint16_t val)
>          uint16_t sus_typ = (val >> 10) & 7;
>          switch(sus_typ) {
>          case 0: /* soft power off */
> +            info_report("VM will be soft power off");
>              qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
>              break;
>          case 1:
> +            info_report("VM will be suspend state");
>              qemu_system_suspend_request();
>              break;
>          default:
>              if (sus_typ == ar->pm1.cnt.s4_val) { /* S4 request */
> +                info_report("VM will be S4 state");
>                  qapi_event_send_suspend_disk();
>                  qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
>              }

There is already a trace point in qemu_system_shutdown_request(), so
this can already be used instead.

 Thomas