summaryrefslogtreecommitdiffstats
path: root/jemalloc/doc
diff options
context:
space:
mode:
authorJason Evans <je@facebook.com>2010-10-21 00:39:18 (GMT)
committerJason Evans <je@facebook.com>2010-10-21 00:39:18 (GMT)
commit93443689a4367cc6fe3de1c9e918adc13d8f9100 (patch)
treeeac41ca1b9c5b1ce50d43e9a296ecbd407266751 /jemalloc/doc
parent21fb95bba6ea922e0523f269c0d9a32640047a29 (diff)
downloadjemalloc-93443689a4367cc6fe3de1c9e918adc13d8f9100.zip
jemalloc-93443689a4367cc6fe3de1c9e918adc13d8f9100.tar.gz
jemalloc-93443689a4367cc6fe3de1c9e918adc13d8f9100.tar.bz2
Add per thread allocation counters, and enhance heap sampling.
Add the "thread.allocated" and "thread.deallocated" mallctls, which can be used to query the total number of bytes ever allocated/deallocated by the calling thread. Add s2u() and sa2u(), which can be used to compute the usable size that will result from an allocation request of a particular size/alignment. Re-factor ipalloc() to use sa2u(). Enhance the heap profiler to trigger samples based on usable size, rather than request size. This has a subtle, but important, impact on the accuracy of heap sampling. For example, previous to this change, 16- and 17-byte objects were sampled at nearly the same rate, but 17-byte objects actually consume 32 bytes each. Therefore it was possible for the sample to be somewhat skewed compared to actual memory usage of the allocated objects.
Diffstat (limited to 'jemalloc/doc')
-rw-r--r--jemalloc/doc/jemalloc.3.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/jemalloc/doc/jemalloc.3.in b/jemalloc/doc/jemalloc.3.in
index c8d2f29..5202a2b 100644
--- a/jemalloc/doc/jemalloc.3.in
+++ b/jemalloc/doc/jemalloc.3.in
@@ -888,6 +888,21 @@ mallctl), it will be automatically initialized as a side effect of calling this
interface.
.Ed
.\"-----------------------------------------------------------------------------
+@roff_stats@.It Sy "thread.allocated (uint64_t) r-"
+@roff_stats@.Bd -ragged -offset indent -compact
+@roff_stats@Get the total number of bytes ever allocated by the calling thread.
+@roff_stats@This counter has the potential to wrap around; it is up to the
+@roff_stats@application to appropriately interpret the counter in such cases.
+@roff_stats@.Ed
+.\"-----------------------------------------------------------------------------
+@roff_stats@.It Sy "thread.deallocated (uint64_t) r-"
+@roff_stats@.Bd -ragged -offset indent -compact
+@roff_stats@Get the total number of bytes ever deallocated by the calling
+@roff_stats@thread.
+@roff_stats@This counter has the potential to wrap around; it is up to the
+@roff_stats@application to appropriately interpret the counter in such cases.
+@roff_stats@.Ed
+.\"-----------------------------------------------------------------------------
.It Sy "config.debug (bool) r-"
.Bd -ragged -offset indent -compact
--enable-debug was specified during build configuration.