diff --git a/bugfix-fixed-display-error-caused-by-missing-signal_exits.patch b/bugfix-fixed-display-error-caused-by-missing-signal_exits.patch new file mode 100644 index 0000000000000000000000000000000000000000..90e018bb7c5d3620db91dd179ed3a2874807f5c6 --- /dev/null +++ b/bugfix-fixed-display-error-caused-by-missing-signal_exits.patch @@ -0,0 +1,51 @@ +From ce42a7e641ff5b4cafeb00524da86ecd115a5d55 Mon Sep 17 00:00:00 2001 +From: lutong +Date: Thu, 19 Jun 2025 15:09:32 +0800 +Subject: [PATCH 1/1] bugfix:fixed display error caused by missing signal_exits + field + +--- + src/type.h | 1 + + src/vcpu_stat.c | 1 + + src/vcpu_stat.h | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/src/type.h b/src/type.h +index 77dd696..727b54b 100644 +--- a/src/type.h ++++ b/src/type.h +@@ -108,6 +108,7 @@ struct domain { + DFX_VALUE(wfi_exit_stat), + DFX_VALUE(mmio_exit_user), + DFX_VALUE(mmio_exit_kernel), ++ DFX_VALUE(signal_exits), + DFX_VALUE(exits), + DFX_VALUE(fp_asimd_exit_stat), + DFX_VALUE(irq_exit_stat), +diff --git a/src/vcpu_stat.c b/src/vcpu_stat.c +index 1578ec4..c23480e 100644 +--- a/src/vcpu_stat.c ++++ b/src/vcpu_stat.c +@@ -28,6 +28,7 @@ struct file_item vcpu_stat_stab[] = { + {"%llu", GDF(wfi_exit_stat) }, + {"%llu", GDF(mmio_exit_user) }, + {"%llu", GDF(mmio_exit_kernel) }, ++ {"%llu", GDF(signal_exits) }, + {"%llu", GDF(exits) }, + {"%llu", GDF(fp_asimd_exit_stat) }, + {"%llu", GDF(irq_exit_stat) }, +diff --git a/src/vcpu_stat.h b/src/vcpu_stat.h +index 9b3f4c2..0697608 100644 +--- a/src/vcpu_stat.h ++++ b/src/vcpu_stat.h +@@ -21,6 +21,7 @@ GET_DELTA_FUN(wfe_exit_stat) + GET_DELTA_FUN(wfi_exit_stat) + GET_DELTA_FUN(mmio_exit_user) + GET_DELTA_FUN(mmio_exit_kernel) ++GET_DELTA_FUN(signal_exits) + GET_DELTA_FUN(exits) + GET_DELTA_FUN(fp_asimd_exit_stat) + GET_DELTA_FUN(irq_exit_stat) +-- +2.43.0 + diff --git a/domain-change-method-of-getting-domain-id.patch b/domain-change-method-of-getting-domain-id.patch deleted file mode 100644 index 49b70687a25062cdfe5f9a4e761da293f08f6aba..0000000000000000000000000000000000000000 --- a/domain-change-method-of-getting-domain-id.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 81fcff0cff9ef7ba181163467b4d594c35267c5c Mon Sep 17 00:00:00 2001 -From: liangtian -Date: Sat, 27 Jul 2024 16:44:11 +0800 -Subject: [PATCH] domain: change method of getting domain id - -libvirt 9.10 change cpuset of cgroup path of vm -change -to - -Signed-off-by: liangtian ---- - src/domain.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/domain.c b/src/domain.c -index 977cabe..8039182 100644 ---- a/src/domain.c -+++ b/src/domain.c -@@ -107,17 +107,17 @@ static int get_id_from_cgroup(pid_t pid) - if (fp == NULL) { - return id; - } -- /* parse id from "cpuset:machine.slice/machine-qemu\x2d$id" */ -+ /* parse id from "cpuset:/machine/qemu-$id" */ - while (fgets(buf, BUF_SIZE - 1, fp)) { - if (strstr(buf, "cpuset:") == NULL) { - memset(buf, 0, BUF_SIZE); - continue; - } -- tmp = strstr(buf, "machine-qemu\\x2d"); -+ tmp = strstr(buf, "qemu-"); - if (tmp == NULL) { - continue; - } -- tmp += strlen("machine-qemu\\x2d"); -+ tmp += strlen("qemu-"); - id = atoi(tmp); - break; - } --- -2.45.2.windows.1 - diff --git a/vmtop.spec b/vmtop.spec index 2b1514f1b3e29da1a0135b192cd25237605e8e00..7c8b31e29285c7ccac8f33345b39fc93e141e24e 100644 --- a/vmtop.spec +++ b/vmtop.spec @@ -39,7 +39,7 @@ Patch0028: proc-del-unused-items-getting-from-proc-stat-refresh.patch Patch0029: proc-del-loop-sscanf-for-proc-pid-stat-file.patch Patch0030: utils-del-realpath-from-read_file.patch Patch0031: add-README.zh.md.-update-README.md.patch -Patch0032: domain-change-method-of-getting-domain-id.patch +Patch0032: bugfix-fixed-display-error-caused-by-missing-signal_exits.patch Requires: libvirt, ncurses @@ -80,8 +80,8 @@ install -m 550 vmtop ${RPM_BUILD_ROOT}/usr/bin/%{name} %{_bindir}/vmtop %changelog -* Sat Jul 27 2024 liangtian - 1.1-8 -- domain: change method of getting domain id +* Thu Jun 19 2025 lutong - 1.1-8 +- bugfix:fixed display error caused by missing signal_exits * Sun Oct 09 2022 fushanqing - 1.1-7 - Unified license name specification