Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Loe1M-0007Of-Pe for qemu-devel@nongnu.org; Tue, 31 Mar 2009 09:28:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Loe1I-0007O2-Ki for qemu-devel@nongnu.org; Tue, 31 Mar 2009 09:28:52 -0400 Received: from [199.232.76.173] (port=51899 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Loe1I-0007Nr-Hd for qemu-devel@nongnu.org; Tue, 31 Mar 2009 09:28:48 -0400 Received: from wa4ehsobe002.messaging.microsoft.com ([216.32.181.12]:29729 helo=WA4EHSOBE002.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1Loe1I-0004V6-2S for qemu-devel@nongnu.org; Tue, 31 Mar 2009 09:28:48 -0400 From: Andre Przywara Date: Tue, 31 Mar 2009 15:28:55 +0200 Message-ID: <1238506137-9140-3-git-send-email-andre.przywara@amd.com> In-Reply-To: <1238506137-9140-2-git-send-email-andre.przywara@amd.com> References: <1238506137-9140-1-git-send-email-andre.przywara@amd.com> <1238506137-9140-2-git-send-email-andre.przywara@amd.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH 2/4] add info numa command to monitor Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Andre Przywara , Andre Przywara From: Andre Przywara Signed-off-by: Andre Przywara --- monitor.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index c6fe968..eb7b6cb 100644 --- a/monitor.c +++ b/monitor.c @@ -1397,6 +1397,22 @@ static void do_info_kvm(Monitor *mon) #endif } +static void do_info_numa(Monitor *mon) +{ + int i, j; + + monitor_printf(mon, "%d nodes\n", nb_numa_nodes); + for (i = 0; i < nb_numa_nodes; i++) { + monitor_printf(mon, "node %d cpus:", i); + for (j = 0; j < 64; j++) { + if (node_cpumask[i] & (1ULL << j)) monitor_printf(mon, " %d", j); + } + monitor_printf(mon, "\n"); + monitor_printf(mon, "node %d size: %" PRId64 " MB\n", i, + node_mem[i] >> 20); + } +} + #ifdef CONFIG_PROFILER int64_t kqemu_time; @@ -1770,6 +1786,8 @@ static const mon_cmd_t info_cmds[] = { "", "show KQEMU information", }, { "kvm", "", do_info_kvm, "", "show KVM information", }, + { "numa", "", do_info_numa, + "", "show NUMA information", }, { "usb", "", usb_info, "", "show guest USB devices", }, { "usbhost", "", usb_host_info, -- 1.6.1.3