mirror of
https://github.com/apache/httpd.git
synced 2026-10-23 22:49:01 +03:00
* .gdbinit: improve dump_allocator, add dump_one_pool.
trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1352909 2.4.x patch: trunk patch works +1: rjung, jorton, jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1365529 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
24
.gdbinit
24
.gdbinit
@@ -349,23 +349,45 @@ define dump_allocator
|
||||
printf "Allocator free list:\n"
|
||||
set $i = 0
|
||||
set $max =(sizeof $arg0->free)/(sizeof $arg0->free[0])
|
||||
set $kb = 0
|
||||
while $i < $max
|
||||
set $node = $arg0->free[$i]
|
||||
if $node != 0
|
||||
printf " #%2d: ", $i
|
||||
while $node != 0
|
||||
printf "%d, ", $node->endp - $node->first_avail
|
||||
printf "%d, ", 4096 << $node->index
|
||||
set $kb = $kb + (4 << $node->index)
|
||||
set $node = $node->next
|
||||
end
|
||||
printf "ends.\n"
|
||||
end
|
||||
set $i = $i + 1
|
||||
end
|
||||
printf "Sum of free blocks: %dkiB\n", $kb
|
||||
end
|
||||
document dump_allocator
|
||||
Print status of an allocator and its freelists.
|
||||
end
|
||||
|
||||
define dump_one_pool
|
||||
set $p = $arg0
|
||||
set $size = 0
|
||||
set $free = 0
|
||||
set $nodes = 0
|
||||
set $node = $arg0->active
|
||||
set $done = 0
|
||||
while $done == 0
|
||||
set $size = $size + (4096 << $node->index)
|
||||
set $free = $free + ($node->endp - $node->first_avail)
|
||||
set $nodes = $nodes + 1
|
||||
set $node = $node->next
|
||||
if $node == $arg0->active
|
||||
set $done = 1
|
||||
end
|
||||
end
|
||||
printf "Pool '%s' [%p]: %d/%d free (%d blocks)\n", $p->tag, $p, $free, $size, $nodes
|
||||
end
|
||||
|
||||
# Set sane defaults for common signals:
|
||||
handle SIGPIPE noprint pass nostop
|
||||
handle SIGUSR1 print pass nostop
|
||||
|
||||
6
STATUS
6
STATUS
@@ -104,12 +104,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
|
||||
+1: rjung, humbedooh, jim
|
||||
rjung: sf: you applied it to trunk, care to vote?
|
||||
|
||||
* .gdbinit: improve dump_allocator, add dump_one_pool.
|
||||
trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1352909
|
||||
2.4.x patch: trunk patch works
|
||||
+1: rjung, jorton, jim
|
||||
rjung: sf: you applied it to trunk, care to vote?
|
||||
|
||||
|
||||
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
|
||||
[ New proposals should be added at the end of the list ]
|
||||
|
||||
Reference in New Issue
Block a user