History log of /external/jemalloc/src/prof.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
932d77dc8089af14d4d334188aa800d405fc51f6 29-May-2014 Chris Peterson <cpeterson@mozilla.com> Fix -Wsign-compare warnings
/external/jemalloc/src/prof.c
73b37a9697acd53496bbef06ed25696e0c897341 23-Apr-2014 Jason Evans <jasone@canonware.com> Simplify backtracing.

Simplify backtracing to not ignore any frames, and compensate for this
in pprof in order to increase flexibility with respect to function-based
refactoring even in the presence of non-deterministic inlining. Modify
pprof to blacklist all jemalloc allocation entry points including
non-standard ones like mallocx(), and ignore all allocator-internal
frames. Prior to this change, pprof excluded the specifically
blacklisted functions from backtraces, but it left allocator-internal
frames intact.
/external/jemalloc/src/prof.c
3716407897bd1273da21b0987fd8184f86623626 22-Apr-2014 Lucian Adrian Grijincu <lucian@fb.com> prof_backtrace: use unw_backtrace

unw_backtrace:
- does internal per-thread caching
- doesn't acquire an internal lock
/external/jemalloc/src/prof.c
6c39f9e059d0825f4c29d8cec9f318b798912c3c 15-Apr-2014 Ben Maurer <bmaurer@fb.com> refactor profiling. only use a bytes till next sample variable.
/external/jemalloc/src/prof.c
9b0cbf0850b130a9b0a8c58bd10b2926b2083510 11-Apr-2014 Jason Evans <je@fb.com> Remove support for non-prof-promote heap profiling metadata.

Make promotion of sampled small objects to large objects mandatory, so
that profiling metadata can always be stored in the chunk map, rather
than requiring one pointer per small region in each small-region page
run. In practice the non-prof-promote code was only useful when using
jemalloc to track all objects and report them as leaks at program exit.
However, Valgrind is at least as good a tool for this particular use
case.

Furthermore, the non-prof-promote code is getting in the way of
some optimizations that will make heap profiling much cheaper for the
predominant use case (sampling a small representative proportion of all
allocations).
/external/jemalloc/src/prof.c
c2da2591befa5574cf8c930a5a2cd7f56138658e 18-Mar-2014 Harald Weppner <harald.weppner@tidalscale.com> Consistently use debug lib(s) if present

Fixes a situation where nm uses the debug lib but
addr2line does not, which completely messes up the symbol
lookup.
/external/jemalloc/src/prof.c
bf543df20ccd9e2c422751908cabf073bc7f5d4b 18-Mar-2014 Harald Weppner <harald.weppner@tidalscale.com> Enable profiling / leak detection in FreeBSD

* Assumes procfs is mounted at /proc, cf.
<http://www.freebsd.org/doc/en/articles/linux-users/procfs.html>
/external/jemalloc/src/prof.c
772163b4f3d8e9a12343e9215f6b070068507604 18-Jan-2014 Jason Evans <je@fb.com> Add heap profiling tests.

Fix a regression in prof_dump_ctx() due to an uninitized variable. This
was caused by revision 4f37ef693e3d5903ce07dc0b61c0da320b35e3d9, so no
releases are affected.
/external/jemalloc/src/prof.c
eefdd02e70ec1b9cf11920fcff585835dcbd766b 17-Jan-2014 Jason Evans <je@fb.com> Fix a variable prototype/definition mismatch.
/external/jemalloc/src/prof.c
4f37ef693e3d5903ce07dc0b61c0da320b35e3d9 16-Jan-2014 Jason Evans <je@fb.com> Refactor prof_dump() to reduce contention.

Refactor prof_dump() to use a two pass algorithm, and prof_leave() prior
to the second pass. This avoids write(2) system calls while holding
critical prof resources.

Fix prof_dump() to close the dump file descriptor for all relevant error
paths.

Minimize the size of prof-related static buffers when prof is disabled.
This saves roughly 65 KiB of application memory for non-prof builds.

Refactor prof_ctx_init() out of prof_lookup_global().
/external/jemalloc/src/prof.c
fb1775e47e91e2e5cef8d4adcb19473309a75f28 15-Jan-2014 Jason Evans <je@fb.com> Refactor prof_lookup() by extracting prof_lookup_global().
/external/jemalloc/src/prof.c
239692b18edb5bc1b2557f1e215509072866d2bb 28-Oct-2013 Jason Evans <je@fb.com> Fix whitespace.
/external/jemalloc/src/prof.c
93f39f8d23bf0a8554b16962a43dd75258e8e337 22-Oct-2013 Jason Evans <je@fb.com> Fix a file descriptor leak in a prof_dump_maps() error path.

Reported by Pat Lynch.
/external/jemalloc/src/prof.c
f1c3da8b02489b7728d4275ac011336299eace62 21-Oct-2013 Jason Evans <je@fb.com> Consistently use malloc_mutex_prefork().

Consistently use malloc_mutex_prefork() instead of malloc_mutex_lock()
in all prefork functions.
/external/jemalloc/src/prof.c
6556e28be15d9acd8f3835fb9fad90145e1edbff 21-Oct-2013 Jason Evans <je@fb.com> Prefer not_reached() over assert(false) where appropriate.
/external/jemalloc/src/prof.c
bbe29d374d0fa5f4684621f16c099294e56c26ef 31-Jan-2013 Jason Evans <je@fb.com> Fix potential TLS-related memory corruption.

Avoid writing to uninitialized TLS as a side effect of deallocation.
Initializing TLS during deallocation is unsafe because it is possible
that a thread never did any allocation, and that TLS has already been
deallocated by the threads library, resulting in write-after-free
corruption. These fixes affect prof_tdata and quarantine; all other
uses of TLS are already safe, whether intentionally (as for tcache) or
unintentionally (as for arenas).
/external/jemalloc/src/prof.c
ae03bf6a57f0dd6a009288fa6477a300cabf6d5e 22-Jan-2013 Jason Evans <jasone@canonware.com> Update hash from MurmurHash2 to MurmurHash3.

Update hash from MurmurHash2 to MurmurHash3, primarily because the
latter generates 128 bits in a single call for no extra cost, which
simplifies integration with cuckoo hashing.
/external/jemalloc/src/prof.c
a3b3386ddde8048b9d6b54c397bb93da5e806cef 13-Nov-2012 Jason Evans <je@fb.com> Avoid arena_prof_accum()-related locking when possible.

Refactor arena_prof_accum() and its callers to avoid arena locking when
prof_interval is 0 (as when profiling is disabled).

Reported by Ben Maurer.
/external/jemalloc/src/prof.c
20f1fc95adb35ea63dc61f47f2b0ffbd37d39f32 09-Oct-2012 Jason Evans <je@fb.com> Fix fork(2)-related deadlocks.

Add a library constructor for jemalloc that initializes the allocator.
This fixes a race that could occur if threads were created by the main
thread prior to any memory allocation, followed by fork(2), and then
memory allocation in the child process.

Fix the prefork/postfork functions to acquire/release the ctl, prof, and
rtree mutexes. This fixes various fork() child process deadlocks, but
one possible deadlock remains (intentionally) unaddressed: prof
backtracing can acquire runtime library mutexes, so deadlock is still
possible if heap profiling is enabled during fork(). This deadlock is
known to be a real issue in at least the case of libgcc-based
backtracing.

Reported by tfengjun.
/external/jemalloc/src/prof.c
f27899402914065a6c1484ea8d81a2c8b70aa659 29-Apr-2012 Jason Evans <je@fb.com> Fix more prof_tdata resurrection corner cases.
/external/jemalloc/src/prof.c
0050a0f7e6ea5a33c9aed769e2652afe20714194 29-Apr-2012 Jason Evans <je@fb.com> Handle prof_tdata resurrection.

Handle prof_tdata resurrection during thread shutdown, similarly to how
tcache and quarantine handle resurrection.
/external/jemalloc/src/prof.c
95ff6aadca1e91641e093c61091e70344d048b50 28-Apr-2012 Jason Evans <je@fb.com> Don't set prof_tdata during thread cleanup.

Don't set prof_tdata during thread cleanup, because doing so will cause
the cleanup function to be called again, the second time with a NULL
argument.
/external/jemalloc/src/prof.c
52386b2dc689db3bf71307424c4e1a2b7044c363 23-Apr-2012 Jason Evans <je@fb.com> Fix heap profiling bugs.

Fix a potential deadlock that could occur during interval- and
growth-triggered heap profile dumps.

Fix an off-by-one heap profile statistics bug that could be observed in
interval- and growth-triggered heap profiles.

Fix heap profile dump filename sequence numbers (regression during
conversion to malloc_snprintf()).
/external/jemalloc/src/prof.c
0b25fe79aaf8840a5acda7e3160a053d42349872 18-Apr-2012 Jason Evans <je@fb.com> Update prof defaults to match common usage.

Change the "opt.lg_prof_sample" default from 0 to 19 (1 B to 512 KiB).

Change the "opt.prof_accum" default from true to false.

Add the "opt.prof_final" mallctl, so that "opt.prof_prefix" need not be
abused to disable final profile dumping.
/external/jemalloc/src/prof.c
a1ee7838e14b321a97bfacb1f1cf5004198f2203 11-Apr-2012 Jason Evans <je@fb.com> Rename labels.

Rename labels from FOO to label_foo in order to avoid system macro
definitions, in particular OUT and ERROR on mingw.

Reported by Mike Hommey.
/external/jemalloc/src/prof.c
ae4c7b4b4092906c641d69b4bf9fcb4a7d50790d 02-Apr-2012 Jason Evans <jasone@canonware.com> Clean up *PAGE* macros.

s/PAGE_SHIFT/LG_PAGE/g and s/PAGE_SIZE/PAGE/g.

Remove remnants of the dynamic-page-shift code.

Rename the "arenas.pagesize" mallctl to "arenas.page".

Remove the "arenas.chunksize" mallctl, which is redundant with
"opt.lg_chunk".
/external/jemalloc/src/prof.c
6da5418ded9170b087c35960e0010006430117c1 24-Mar-2012 Jason Evans <je@fb.com> Remove ephemeral mutexes.

Remove ephemeral mutexes from the prof machinery, and remove
malloc_mutex_destroy(). This simplifies mutex management on systems
that call malloc()/free() inside pthread_mutex_{create,destroy}().

Add atomic_*_u() for operation on unsigned values.

Fix prof_printf() to call malloc_vsnprintf() rather than
malloc_snprintf().
/external/jemalloc/src/prof.c
cd9a1346e96f71bdecdc654ea50fc62d76371e74 22-Mar-2012 Jason Evans <je@fb.com> Implement tsd.

Implement tsd, which is a TLS/TSD abstraction that uses one or both
internally. Modify bootstrapping such that no tsd's are utilized until
allocation is safe.

Remove malloc_[v]tprintf(), and use malloc_snprintf() instead.

Fix %p argument size handling in malloc_vsnprintf().

Fix a long-standing statistics-related bug in the "thread.arena"
mallctl that could cause crashes due to linked list corruption.
/external/jemalloc/src/prof.c
e24c7af35d1e9d24d02166ac98cfca7cf807ff13 19-Mar-2012 Jason Evans <je@fb.com> Invert NO_TLS to JEMALLOC_TLS.
/external/jemalloc/src/prof.c
2bb6c7a632fc4c0afe2532ea4044d337d9b288ae 12-Mar-2012 Jason Evans <je@fb.com> s/PRIx64/PRIxPTR/ for uintptr_t printf() argument.
/external/jemalloc/src/prof.c
d81e4bdd5c991bd5642c8b859ef1f752b51cd9be 06-Mar-2012 Jason Evans <je@fb.com> Implement malloc_vsnprintf().

Implement malloc_vsnprintf() (a subset of vsnprintf(3)) as well as
several other printing functions based on it, so that formatted printing
can be relied upon without concern for inducing a dependency on floating
point runtime support. Replace malloc_write() calls with
malloc_*printf() where doing so simplifies the code.

Add name mangling for library-private symbols in the data and BSS
sections. Adjust CONF_HANDLE_*() macros in malloc_conf_init() to expose
all opt_* variable use to cpp so that proper mangling occurs.
/external/jemalloc/src/prof.c
b8c8be7f8abe72f4cb4f315f3078ad864fd6a2d8 05-Mar-2012 Jason Evans <je@fb.com> Use UINT64_C() rather than LLU for 64-bit constants.
/external/jemalloc/src/prof.c
84f7cdb0c588322dfd50a26497fc1cb54b792018 03-Mar-2012 Jason Evans <je@fb.com> Rename prn to prng.

Rename prn to prng so that Windows doesn't choke when trying to create
a file named prn.h.
/external/jemalloc/src/prof.c
5389146191b279ca3b90028357dd6ad66b283def 14-Feb-2012 Jason Evans <je@fb.com> Remove the opt.lg_prof_bt_max option.

Remove opt.lg_prof_bt_max, and hard code it to 7. The original
intention of this option was to enable faster backtracing by limiting
backtrace depth. However, this makes graphical pprof output very
difficult to interpret. In practice, decreasing sampling frequency is a
better mechanism for limiting profiling overhead.
/external/jemalloc/src/prof.c
0b526ff94da7e59aa947a4d3529b2376794f8b01 14-Feb-2012 Jason Evans <je@fb.com> Remove the opt.lg_prof_tcmax option.

Remove the opt.lg_prof_tcmax option and hard-code a cache size of 1024.
This setting is something that users just shouldn't have to worry about.
If lock contention actually ends up being a problem, the simple solution
available to the user is to reduce sampling frequency.
/external/jemalloc/src/prof.c
7372b15a31c63ac5cb9ed8aeabc2a0a3c005e8bf 11-Feb-2012 Jason Evans <je@fb.com> Reduce cpp conditional logic complexity.

Convert configuration-related cpp conditional logic to use static
constant variables, e.g.:

#ifdef JEMALLOC_DEBUG
[...]
#endif

becomes:

if (config_debug) {
[...]
}

The advantage is clearer, more concise code. The main disadvantage is
that data structures no longer have conditionally defined fields, so
they pay the cost of all fields regardless of whether they are used. In
practice, this is only a minor concern; config_stats will go away in an
upcoming change, and config_prof is the only other major feature that
depends on more than a few special-purpose fields.
/external/jemalloc/src/prof.c
a9076c9483a8efcb216b9f1303bf310f80ee3401 31-Aug-2011 Jason Evans <je@fb.com> Fix a prof-related race condition.

Fix prof_lookup() to artificially raise curobjs for all paths through
the code that creates a new entry in the per thread bt2cnt hash table.
This fixes a race condition that could corrupt memory if prof_accum were
false, and a non-default lg_prof_tcmax were used and/or threads were
destroyed.
/external/jemalloc/src/prof.c
0cdd42eb3204cdd2646561c90ec202716cd3c344 10-Aug-2011 Jason Evans <je@fb.com> Clean up prof-related comments.

Clean up some prof-related comments to more accurately reflect how the
code works.

Simplify OOM handling code in a couple of prof-related error paths.
/external/jemalloc/src/prof.c
41b954ed36f90e5a479bbe2118b5ce85189a55ee 09-Aug-2011 Jason Evans <je@fb.com> Use prof_tdata_cleanup() argument.

Use the argument to prof_tdata_cleanup(), rather than calling
PROF_TCACHE_GET(). This fixes a bug in the NO_TLS case.
/external/jemalloc/src/prof.c
f0b22cf932b6fa7be2027a1058802fab0d6e25c6 22-May-2011 Jason Evans <jasone@canonware.com> Use LLU suffix for all 64-bit constants.

Add the LLU suffix for all 0x... 64-bit constants.

Reported by Jakob Blomer.
/external/jemalloc/src/prof.c
7427525c28d58c423a68930160e3b0fe577fe953 01-Apr-2011 Jason Evans <jasone@canonware.com> Move repo contents in jemalloc/ to top level.
/external/jemalloc/src/prof.c