it profiles

Signed-off-by: Ava Hahn <a.hahn@f5.com>
This commit is contained in:
Ava Hahn 2025-08-25 23:04:54 +00:00
parent 8924f2ef22
commit d07bf56cd7
7 changed files with 112 additions and 33 deletions

View file

@ -1,20 +1,23 @@
#!/bin/bash
function p_invoke() {
perf record -F1000 --call-graph dwarf -o /perf.data \
-- /nginx/objs/nginx \
-p /tmp \
-e /tmp/error.log \
-c /nginx.conf \
# set trace-children=yes to profile worker processes
valgrind --tool=callgrind \
--trace-children=no \
--callgrind-out-file=/tmp/callgrind.output \
/nginx/objs/nginx \
-p /tmp \
-e /tmp/error.log \
-c /nginx.conf \
-g "daemon off;"
}
function invoke() {
/nginx/objs/nginx \
-p /tmp \
-e /tmp/error.log \
-c /nginx.conf \
-g "daemon off;" \
/nginx/objs/nginx \
-p /tmp \
-e /tmp/error.log \
-c /nginx.conf \
-g "daemon off;" \
$@
}