From 6f533d780ded2d0d2a4ba2224e4a9f7d181c7577 Mon Sep 17 00:00:00 2001 From: Jieqiang Wang Date: Mon, 20 Jan 2020 13:43:38 +0800 Subject: vlib: leave SIGPROF signal with its default handler When profiling VPP with MAP (a software profile suite on Arm CPUs, see details in https://www.arm.com/products/development-tools/server-and-hpc/forge/map) on Arm servers, VPP will receive SIGPROF signal because MAP uses SIGPROF signal to drive its sampler to do profiling on VPP. However, the default action of SIGPROF signal handler in VPP such as unix_signal_handler() is process termination. To profile VPP with MAP, the SIGPROF handler should be left as default, and MAP sampler will overwrite it with its own implementation. Type: feature Change-Id: Ie14e513d35ec27a66e95067689408bad8ed1ad6b Signed-off-by: Jieqiang Wang --- src/vat/main.c | 1 + src/vlib/unix/main.c | 1 + src/vpp/api/vpp_get_metrics.c | 1 + 3 files changed, 3 insertions(+) diff --git a/src/vat/main.c b/src/vat/main.c index 996fb1ed6a8..139594944d2 100644 --- a/src/vat/main.c +++ b/src/vat/main.c @@ -266,6 +266,7 @@ setup_signal_handlers (void) case SIGSTOP: case SIGUSR1: case SIGUSR2: + case SIGPROF: continue; /* ignore SIGPIPE, SIGCHLD */ diff --git a/src/vlib/unix/main.c b/src/vlib/unix/main.c index e40a462578e..90601d7bc41 100755 --- a/src/vlib/unix/main.c +++ b/src/vlib/unix/main.c @@ -213,6 +213,7 @@ setup_signal_handlers (unix_main_t * um) case SIGSTOP: case SIGUSR1: case SIGUSR2: + case SIGPROF: continue; /* ignore SIGPIPE, SIGCHLD */ diff --git a/src/vpp/api/vpp_get_metrics.c b/src/vpp/api/vpp_get_metrics.c index 9241e6d70c5..46536645dc9 100644 --- a/src/vpp/api/vpp_get_metrics.c +++ b/src/vpp/api/vpp_get_metrics.c @@ -81,6 +81,7 @@ setup_signal_handlers (void) case SIGSTOP: case SIGUSR1: case SIGUSR2: + case SIGPROF: continue; /* ignore SIGPIPE, SIGCHLD */ -- cgit 1.2.3-korg