spdk_top: fix the core usage display issue

Fix the incorrect cpu usage display in core page.

Signed-off-by: Jaylyn Ren <jaylyn.ren@arm.com>
Change-Id: I073f4b16ed4c829f7713b2cb67bde54be5def783
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17288
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Jaylyn Ren 2023-03-17 17:15:49 +08:00 committed by Konrad Sztyber
parent 2a463e3e26
commit 2b24637557

View File

@ -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; 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 idle_period = g_cores_info[current_row].idle - g_cores_info[current_row].last_idle;
uint64_t busy_period = g_threads_info[current_row].busy - g_threads_info[current_row].last_busy; 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 (!col_desc[COL_CORES_IDLE_TIME].disabled) {
if (g_interval_data == true) { if (g_interval_data == true) {
get_time_str(idle_period, idle_time); get_time_str(idle_period, idle_time);