spdk_top: fix threads assignment to cores in THREADS tab
FIxes incorrect cores showing for each thread in THREADS tab. Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com> Change-Id: I661eac0cd70cf6ecf308dafaa940fcae8fd513f9 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8153 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>
This commit is contained in:
parent
130c94c489
commit
57837813e3
@ -624,7 +624,7 @@ get_data(void)
|
||||
struct rpc_threads_stats threads_stats;
|
||||
struct rpc_pollers *pollers;
|
||||
struct rpc_poller_info *poller;
|
||||
uint64_t i, j;
|
||||
uint64_t i, j, k;
|
||||
int rc = 0;
|
||||
|
||||
rc = rpc_send_req("thread_get_stats", &json_resp);
|
||||
@ -713,7 +713,11 @@ get_data(void)
|
||||
core_info = &g_cores_stats.cores.core[i];
|
||||
|
||||
for (j = 0; j < core_info->threads.threads_count; j++) {
|
||||
g_threads_stats.threads.thread_info[j].core_num = core_info->lcore;
|
||||
for (k = 0; k < g_threads_stats.threads.threads_count; k++) {
|
||||
if (core_info->threads.thread[j].id == g_threads_stats.threads.thread_info[k].id) {
|
||||
g_threads_stats.threads.thread_info[k].core_num = core_info->lcore;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user