Commit 2b246375 authored by Jaylyn Ren's avatar Jaylyn Ren Committed by Konrad Sztyber
Browse files

spdk_top: fix the core usage display issue



Fix the incorrect cpu usage display in core page.

Signed-off-by: default avatarJaylyn Ren <jaylyn.ren@arm.com>
Change-Id: I073f4b16ed4c829f7713b2cb67bde54be5def783
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17288


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 2a463e3e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);