Skip to content

Commit

Permalink
Merge pull request #16406 from opensourcerouting/fix/remove_deprecati…
Browse files Browse the repository at this point in the history
…on_for_show_threads

Drop deprecation for `show thread ...`
  • Loading branch information
Jafaral authored Jul 19, 2024
2 parents 0b138e9 + 193e14e commit 7aeb51e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 36 deletions.
50 changes: 17 additions & 33 deletions lib/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,6 @@ static uint8_t parse_filter(const char *filterstr)
return filter;
}

#if CONFDATE > 20240707
CPP_NOTICE("Remove `show thread ...` commands")
#endif
DEFUN_NOSH (show_event_cpu,
show_event_cpu_cmd,
"show event cpu [FILTER]",
Expand All @@ -332,14 +329,6 @@ DEFUN_NOSH (show_event_cpu,
return CMD_SUCCESS;
}

ALIAS(show_event_cpu,
show_thread_cpu_cmd,
"show thread cpu [FILTER]",
SHOW_STR
"Thread information\n"
"Thread CPU usage\n"
"Display filter (rwtex)\n")

DEFPY (service_cputime_stats,
service_cputime_stats_cmd,
"[no] service cputime-stats",
Expand Down Expand Up @@ -440,19 +429,15 @@ DEFUN_NOSH (show_event_poll,
return CMD_SUCCESS;
}

ALIAS(show_event_poll,
show_thread_poll_cmd,
"show thread poll",
SHOW_STR
"Thread information\n"
"Show poll FD's and information\n")

DEFUN (clear_thread_cpu,
clear_thread_cpu_cmd,
"clear thread cpu [FILTER]",
#if CONFDATE > 20241231
CPP_NOTICE("Remove `clear thread cpu` command")
#endif
DEFUN (clear_event_cpu,
clear_event_cpu_cmd,
"clear event cpu [FILTER]",
"Clear stored data in all pthreads\n"
"Thread information\n"
"Thread CPU usage\n"
"Event information\n"
"Event CPU usage\n"
"Display filter (rwtexb)\n")
{
uint8_t filter = (uint8_t)-1U;
Expand All @@ -472,6 +457,14 @@ DEFUN (clear_thread_cpu,
return CMD_SUCCESS;
}

ALIAS (clear_event_cpu,
clear_thread_cpu_cmd,
"clear thread cpu [FILTER]",
"Clear stored data in all pthreads\n"
"Thread information\n"
"Thread CPU usage\n"
"Display filter (rwtexb)\n")

static void show_event_timers_helper(struct vty *vty, struct event_loop *m)
{
const char *name = m->name ? m->name : "main";
Expand Down Expand Up @@ -507,26 +500,17 @@ DEFPY_NOSH (show_event_timers,
return CMD_SUCCESS;
}

ALIAS(show_event_timers,
show_thread_timers_cmd,
"show thread timers",
SHOW_STR
"Thread information\n"
"Show all timers and how long they have in the system\n")

void event_cmd_init(void)
{
install_element(VIEW_NODE, &show_thread_cpu_cmd);
install_element(VIEW_NODE, &show_event_cpu_cmd);
install_element(VIEW_NODE, &show_thread_poll_cmd);
install_element(VIEW_NODE, &show_event_poll_cmd);
install_element(ENABLE_NODE, &clear_thread_cpu_cmd);
install_element(ENABLE_NODE, &clear_event_cpu_cmd);

install_element(CONFIG_NODE, &service_cputime_stats_cmd);
install_element(CONFIG_NODE, &service_cputime_warning_cmd);
install_element(CONFIG_NODE, &service_walltime_warning_cmd);

install_element(VIEW_NODE, &show_thread_timers_cmd);
install_element(VIEW_NODE, &show_event_timers_cmd);
}
/* CLI end ------------------------------------------------------------------ */
Expand Down
3 changes: 0 additions & 3 deletions vtysh/vtysh.c
Original file line number Diff line number Diff line change
Expand Up @@ -3058,9 +3058,6 @@ static int show_one_daemon(struct vty *vty, struct cmd_token **argv, int argc,
return ret;
}

#if CONFDATE > 20240707
CPP_NOTICE("Remove `show thread ...` commands")
#endif
DEFUN (vtysh_show_event_timer,
vtysh_show_event_timer_cmd,
"show event timers",
Expand Down

0 comments on commit 7aeb51e

Please sign in to comment.