fixes for worker process profiling

Signed-off-by: Ava Hahn <a.hahn@f5.com>
This commit is contained in:
Ava Hahn 2025-09-18 00:04:23 +00:00
parent 71990d3988
commit 78baa850a8
7 changed files with 46 additions and 25 deletions

View file

@ -3,10 +3,10 @@
function p_invoke() {
valgrind --tool=callgrind \
--trace-children=yes \
--callgrind-out-file=/tmp/callgrind.output \
--callgrind-out-file=/tmp/callgrind.out.%p \
--cache-sim=yes \
--instr-atstart=no \
/nginx/objs/nginx \
-p /tmp \
-e /tmp/error.log \
-c /nginx.conf \
-g "daemon off;"
@ -14,7 +14,6 @@ function p_invoke() {
function invoke() {
/nginx/objs/nginx \
-p /tmp \
-e /tmp/error.log \
-c /nginx.conf \
-g "daemon off;" \
@ -35,7 +34,14 @@ function sigcont_handler() {
trap 'sigint_handler' INT
trap 'sigcont_handler' CONT
# enable tracing
echo 1 > /proc/sys/kernel/yama/ptrace_scope
p_invoke &
wait
echo "NGINX down. waiting until signalled..."
echo "NGINX down. waiting to find it again"
sleep 0.5
wait $(cat /tmp/pid)
echo "NGINX is GONE. waiting until signalled"
sleep infinity