spdk_top: change where sore_last_run_counter() is called
Changes where store_last_run_function() is called. Before this patch this function was used inside refresh_pollers_tab() and it overwrote last run counters of each poller before show_poller() function had a chance to use them. As a result poller details window was always showing zeroes instead of actual difference in run count between each application loop. Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com> Change-Id: I96219698f7f0b51b94ffe8c0d6bf40f73cbf8a82 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7951 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
49bc3005f5
commit
6f9d124888
@ -622,6 +622,8 @@ get_data(void)
|
||||
struct spdk_jsonrpc_client_response *json_resp = NULL;
|
||||
struct rpc_core_info *core_info;
|
||||
struct rpc_threads_stats threads_stats;
|
||||
struct rpc_pollers *pollers;
|
||||
struct rpc_poller_info *poller;
|
||||
uint64_t i, j;
|
||||
int rc = 0;
|
||||
|
||||
@ -659,6 +661,25 @@ get_data(void)
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* Save last run counter of each poller before updating g_pollers_stats */
|
||||
for (i = 0; i < g_pollers_stats.pollers_threads.threads_count; i++) {
|
||||
pollers = &g_pollers_stats.pollers_threads.threads[i].active_pollers;
|
||||
for (j = 0; j < pollers->pollers_count; j++) {
|
||||
poller = &pollers->pollers[j];
|
||||
store_last_run_counter(poller->name, poller->thread_id, poller->run_count);
|
||||
}
|
||||
pollers = &g_pollers_stats.pollers_threads.threads[i].timed_pollers;
|
||||
for (j = 0; j < pollers->pollers_count; j++) {
|
||||
poller = &pollers->pollers[j];
|
||||
store_last_run_counter(poller->name, poller->thread_id, poller->run_count);
|
||||
}
|
||||
pollers = &g_pollers_stats.pollers_threads.threads[i].paused_pollers;
|
||||
for (j = 0; j < pollers->pollers_count; j++) {
|
||||
poller = &pollers->pollers[j];
|
||||
store_last_run_counter(poller->name, poller->thread_id, poller->run_count);
|
||||
}
|
||||
}
|
||||
|
||||
/* Free old pollers values before allocating memory for new ones */
|
||||
free_rpc_pollers_stats(&g_pollers_stats);
|
||||
|
||||
@ -1224,8 +1245,6 @@ refresh_pollers_tab(uint8_t current_page)
|
||||
col += col_desc[3].max_data_string + 4;
|
||||
}
|
||||
|
||||
store_last_run_counter(pollers[i]->name, pollers[i]->thread_id, pollers[i]->run_count);
|
||||
|
||||
if (!col_desc[5].disabled) {
|
||||
if (pollers[i]->busy_count > 0) {
|
||||
if (item_index != g_selected_row) {
|
||||
|
Loading…
Reference in New Issue
Block a user