+41
−74
Loading
Deletes g_thread_history and g_thread_info to use g_threads_stats across the whole application to simplify spdk_top code. Now instead of separate struct, fields last_busy and last_idle are being used. get_data() function now uses local structure to get RPC data instead of filling global one. This has been changed so that g_threads_stats keeps its last_busy and last_idle fields unchanged. free_rpc_threads_stats has been moved down so that in future patches, when multithreading is implemented, there is no need to lock g_threads_stats during RPC call. Changes places of allocation/deallocation of g_threads_stats, since we want to save last_idle and last_busy fields instead of zeroing them out each application loop. Changes show_thread() function to use local copy of threads array instead of pointers to global struct. This is for the convenience in the future patches implementing multithreading to avoid the need to lock the global struct for details display. Signed-off-by:Krzysztof Karas <krzysztof.karas@intel.com> Change-Id: I0dc87eac4c1b89fa16f14f5387d94ee176dfdf43 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7587 Reviewed-by:
Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Paul Luse <paul.e.luse@intel.com> Reviewed-by:
Aleksey Marchuk <alexeymar@mellanox.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot