spdk_top: fix threads_count assignment

threads_count inside show_core() function takes its value
from first core instead of the one selected by the user and
breaks core pop-up window.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I11710eaf061e7ead0fec46a0f9c47dd84d8d0209
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7588
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Krzysztof Karas 2021-04-22 10:25:14 +02:00 committed by Tomasz Zawadzki
parent d7d4a712cf
commit 0f5cd128ec

View File

@ -2132,7 +2132,7 @@ show_core(uint8_t current_page)
core_info[i] = &g_cores_stats.cores.core[i];
}
threads_count = g_cores_stats.cores.core->threads.threads_count;
threads_count = g_cores_stats.cores.core[core_number].threads.threads_count;
core_win = newwin(threads_count + CORE_WIN_HEIGHT, CORE_WIN_WIDTH,
get_position_for_window(CORE_WIN_HEIGHT + threads_count, g_max_row),