[commit] Add more bcache stats

Andrew Cagney ac131313@redhat.com
Mon Nov 3 17:07:00 GMT 2003


The attached adds more info to the bcache stats output (seen in maint 
print statistics).  It adds:

- entry size (median, average, max)
- table rebuild numbers

Which both turn out to be cheap to compute.  I needed this when trying 
to figure out the answer to daniel's question:

 > is the hash table in libiberty in any way unsuited to replace bcache?

I didn't add "compare counts" as I couldn't figure out a cheap way of 
doing it :-/


PS: Output now looks like:

   Cached 'partial symbol cache' statistics:
     Total object count:  36924
     Unique object count: 15935
     Percentage of duplicates, by count:  56%

     Total object size:   886176
     Unique object size:  382440
     Percentage of duplicates, by size:   56%

     Max entry size:     24
     Average entry size: 24
     Median entry size:  24

     Total memory used by bcache, including overhead: 526316
     Percentage memory overhead:  37%
     Net memory savings:          40%

     Hash table size:           4099
     Hash table expands:        3
     Hash table hashes:         52294
     Hash table population:      98%
     Median hash chain length:    4
     Average hash chain length:   3
     Maximum hash chain length:  12
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20031103/cec4f15e/attachment.ksh>

More information about the Gdb-patches mailing list