Commit e0830eaa authored by Maciej Szwed's avatar Maciej Szwed Committed by Jim Harris
Browse files

spdk_top: Fix thread idle and busy times sorting



Fixes github issue #1367

Signed-off-by: default avatarMaciej Szwed <maciej.szwed@intel.com>
Change-Id: I639f94af0a61784cc1f3fe5bf9bbe7506bd39df6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1999


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
parent 251a551a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -792,12 +792,12 @@ sort_threads(const void *p1, const void *p2)
		count2 = thread_info2->paused_pollers_count;
		break;
	case 5: /* Sort by idle time */
		count1 = thread_info1->idle;
		count2 = thread_info2->idle;
		count1 = thread_info1->idle - thread_info1->last_idle;
		count2 = thread_info2->idle - thread_info2->last_idle;
		break;
	case 6: /* Sort by busy time */
		count1 = thread_info1->busy;
		count2 = thread_info2->busy;
		count1 = thread_info1->busy - thread_info1->last_busy;
		count2 = thread_info2->busy - thread_info2->last_busy;
		break;
	default:
		return 0;