vlib: leave SIGPROF signal with its default handler 06/25906/2
authorJieqiang Wang <jieqiang.wang@arm.com>
Mon, 20 Jan 2020 05:43:38 +0000 (13:43 +0800)
committerDamjan Marion <dmarion@me.com>
Sat, 21 Mar 2020 12:11:38 +0000 (12:11 +0000)
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 <jieqiang.wang@arm.com>
src/vat/main.c
src/vlib/unix/main.c
src/vpp/api/vpp_get_metrics.c

index 996fb1e..1395949 100644 (file)
@@ -266,6 +266,7 @@ setup_signal_handlers (void)
        case SIGSTOP:
        case SIGUSR1:
        case SIGUSR2:
+       case SIGPROF:
          continue;
 
          /* ignore SIGPIPE, SIGCHLD */
index e40a462..90601d7 100755 (executable)
@@ -213,6 +213,7 @@ setup_signal_handlers (unix_main_t * um)
        case SIGSTOP:
        case SIGUSR1:
        case SIGUSR2:
+       case SIGPROF:
          continue;
 
          /* ignore SIGPIPE, SIGCHLD */
index 9241e6d..4653664 100644 (file)
@@ -81,6 +81,7 @@ setup_signal_handlers (void)
        case SIGSTOP:
        case SIGUSR1:
        case SIGUSR2:
+       case SIGPROF:
          continue;
 
          /* ignore SIGPIPE, SIGCHLD */