spdk_top: change type of core_num in rpc_thread_info
Change type of core_num to be int instead of uin32_t to allow assignment of -1 value for the "hanging" threads that are not assigned to any core. Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com> Change-Id: I708f9547ee4fa2cf49f6c38750e12380d76b1160 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8154 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Maciej Szwed <maciej.szwed@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
3a2a1d80e0
commit
a9a2c09579
@ -189,7 +189,7 @@ static struct col_desc g_col_desc[NUMBER_OF_TABS][TABS_COL_COUNT] = {
|
||||
struct rpc_thread_info {
|
||||
char *name;
|
||||
uint64_t id;
|
||||
uint32_t core_num;
|
||||
int core_num;
|
||||
char *cpumask;
|
||||
uint64_t busy;
|
||||
uint64_t last_busy;
|
||||
@ -1389,7 +1389,7 @@ refresh_cores_tab(uint8_t current_page)
|
||||
{
|
||||
struct col_desc *col_desc = g_col_desc[CORES_TAB];
|
||||
uint64_t i;
|
||||
uint32_t core_num;
|
||||
int core_num;
|
||||
uint16_t offset, count = 0;
|
||||
uint8_t max_pages, item_index;
|
||||
static uint8_t last_page = 0;
|
||||
@ -1402,6 +1402,10 @@ refresh_cores_tab(uint8_t current_page)
|
||||
|
||||
for (i = 0; i < g_threads_stats.threads.threads_count; i++) {
|
||||
core_num = g_threads_stats.threads.thread_info[i].core_num;
|
||||
/* If the thread is hanging, do not count it. */
|
||||
if (core_num == -1) {
|
||||
continue;
|
||||
}
|
||||
cores[core_num].threads_count++;
|
||||
cores[core_num].pollers_count += g_threads_stats.threads.thread_info[i].active_pollers_count +
|
||||
g_threads_stats.threads.thread_info[i].timed_pollers_count +
|
||||
|
Loading…
Reference in New Issue
Block a user