summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
authorRuediger Pluem <rpluem@apache.org>2019-09-09 06:52:27 +0000
committerRuediger Pluem <rpluem@apache.org>2019-09-09 06:52:27 +0000
commit1a83006af39c9b0cbbd854f790e890371950b81d (patch)
treed392ba46ea04e4cd139ec0cf162da481b1e240fb /.gdbinit
parent66ddf77038f73ec810677a37e776709f84d13b5d (diff)
downloadhttpd-1a83006af39c9b0cbbd854f790e890371950b81d.tar.gz
Merge r1844889 from trunk:
* Add a command to dump some data from the scoreboard Submitted by: rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1866655 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit22
1 files changed, 22 insertions, 0 deletions
diff --git a/.gdbinit b/.gdbinit
index 15f6c426a8..31ebe0a98a 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -378,6 +378,28 @@ define dump_request_tree
end
end
+define dump_scoreboard
+ # Need to reserve size of array first before string literals could be
+ # put in
+ set $status = {0, 1, 2, 3, 4 ,5 ,6 ,7 ,8 ,9 ,10}
+ set $status = {"DEAD", "STARTING", "READY", "BUSY_READ", "BUSY_WRITE", "BUSY_KEEPALIVE", "BUSY_LOG", "BUSY_DNS", "CLOSING", "GRACEFUL", "IDLE_KILL"}
+ set $i = 0
+ while ($i < server_limit)
+ if ap_scoreboard_image->servers[$i][0].pid != 0
+ set $j = 0
+ while ($j < threads_per_child)
+ set $ws = ap_scoreboard_image->servers[$i][$j]
+ printf "pid: %d, tid: 0x%lx, status: %s\n", $ws.pid, $ws.tid, $status[$ws.status]
+ set $j = $j +1
+ end
+ end
+ set $i = $i +1
+ end
+end
+document dump_scoreboard
+ Dump the scoreboard
+end
+
define dump_allocator
printf "Allocator current_free_index = %d, max_free_index = %d\n", \
($arg0)->current_free_index, ($arg0)->max_free_index