From 2b24637557694ad6ed6ba3138ec2492158eeff1d Mon Sep 17 00:00:00 2001 From: Jaylyn Ren Date: Fri, 17 Mar 2023 17:15:49 +0800 Subject: [PATCH] spdk_top: fix the core usage display issue Fix the incorrect cpu usage display in core page. Signed-off-by: Jaylyn Ren Change-Id: I073f4b16ed4c829f7713b2cb67bde54be5def783 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17288 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- app/spdk_top/spdk_top.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/spdk_top/spdk_top.c b/app/spdk_top/spdk_top.c index e2f3d3caf..a67427399 100644 --- a/app/spdk_top/spdk_top.c +++ b/app/spdk_top/spdk_top.c @@ -1634,8 +1634,8 @@ draw_core_tab_row(uint64_t current_row, uint8_t item_index) col += col_desc[COL_CORES_POLLERS].max_data_string; } - uint64_t idle_period = g_threads_info[current_row].idle - g_threads_info[current_row].last_idle; - uint64_t busy_period = g_threads_info[current_row].busy - g_threads_info[current_row].last_busy; + uint64_t idle_period = g_cores_info[current_row].idle - g_cores_info[current_row].last_idle; + uint64_t busy_period = g_cores_info[current_row].busy - g_cores_info[current_row].last_busy; if (!col_desc[COL_CORES_IDLE_TIME].disabled) { if (g_interval_data == true) { get_time_str(idle_period, idle_time);