aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/unix
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/unix')
-rw-r--r--src/vlib/unix/input.c20
-rw-r--r--src/vlib/unix/main.c20
2 files changed, 32 insertions, 8 deletions
diff --git a/src/vlib/unix/input.c b/src/vlib/unix/input.c
index e96cd902466..302d1eb1194 100644
--- a/src/vlib/unix/input.c
+++ b/src/vlib/unix/input.c
@@ -130,6 +130,17 @@ linux_epoll_file_update (clib_file_t * f, clib_file_update_type_t update_type)
}
}
+static int
+is_int_pending (vlib_node_main_t *nm)
+{
+
+ for (int nt = 0; nt < VLIB_N_NODE_TYPE; nt++)
+ if (nm->node_interrupts[nt] &&
+ clib_interrupt_is_any_pending (nm->node_interrupts[nt]))
+ return 1;
+ return 0;
+}
+
static_always_inline uword
linux_epoll_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_frame_t * frame, u32 thread_index)
@@ -174,8 +185,8 @@ linux_epoll_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
else if (is_main && vector_rate < 2 && vm->api_queue_nonempty == 0
&& nm->input_node_counts_by_state[VLIB_NODE_STATE_POLLING] == 0)
{
- ticks_until_expiration = TW (tw_timer_first_expires_in_ticks)
- ((TWT (tw_timer_wheel) *) nm->timing_wheel);
+ ticks_until_expiration = TW (tw_timer_first_expires_in_ticks) (
+ (TWT (tw_timer_wheel) *) vm->timing_wheel);
/* Nothing on the fast wheel, sleep 10ms */
if (ticks_until_expiration == TW_SLOTS_PER_RING)
@@ -250,10 +261,7 @@ linux_epoll_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
while (nanosleep (&ts, &tsrem) < 0)
ts = tsrem;
if (*vlib_worker_threads->wait_at_barrier ||
- clib_interrupt_is_any_pending (
- nm->input_node_interrupts) ||
- clib_interrupt_is_any_pending (
- nm->pre_input_node_interrupts))
+ is_int_pending (nm))
goto done;
}
}
diff --git a/src/vlib/unix/main.c b/src/vlib/unix/main.c
index 11d0cb1160c..49aa5d3a8ab 100644
--- a/src/vlib/unix/main.c
+++ b/src/vlib/unix/main.c
@@ -54,6 +54,10 @@
#include <sys/resource.h>
#include <unistd.h>
+#ifdef HAVE_LIBIBERTY
+#include <libiberty/demangle.h>
+#endif
+
/** Default CLI pager limit is not configured in startup.conf */
#define UNIX_CLI_DEFAULT_PAGER_LIMIT 100000
@@ -226,8 +230,20 @@ unix_signal_handler (int signum, siginfo_t * si, ucontext_t * uc)
{
if (color)
syslog_msg = format (syslog_msg, ANSI_FG_YELLOW);
- syslog_msg =
- format (syslog_msg, " %s + 0x%x", sf->name, sf->offset);
+#if HAVE_LIBIBERTY
+ if (strncmp (sf->name, "_Z", 2) == 0)
+ {
+ char *demangled = cplus_demangle (sf->name, DMGL_AUTO);
+ syslog_msg = format (syslog_msg, " %s",
+ demangled ? demangled : sf->name);
+ if (demangled)
+ free (demangled);
+ }
+ else
+#endif
+ syslog_msg = format (syslog_msg, " %s", sf->name);
+
+ syslog_msg = format (syslog_msg, " + 0x%x", sf->offset);
if (color)
syslog_msg = format (syslog_msg, ANSI_FG_DEFAULT);
}