History log of /external/jemalloc/src/prof.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5d6cb6eb66b05261cccd2b416f50ad98d1735229 07-Nov-2016 Jason Evans <jasone@canonware.com> Refactor prng to not use 64-bit atomics on 32-bit platforms.

This resolves #495.
/external/jemalloc/src/prof.c
962a2979e353f876f3725417179f201e671d9dbb 21-Oct-2016 Jason Evans <jasone@canonware.com> Do not (recursively) allocate within tsd_fetch().

Refactor tsd so that tsdn_fetch() does not trigger allocation, since
allocation could cause infinite recursion.

This resolves #458.
/external/jemalloc/src/prof.c
c1e00ef2a6442d1d047950247c757821560db329 11-May-2016 Jason Evans <jasone@canonware.com> Resolve bootstrapping issues when embedded in FreeBSD libc.

b2c0d6322d2307458ae2b28545f8a5c9903d7ef5 (Add witness, a simple online
locking validator.) caused a broad propagation of tsd throughout the
internal API, but tsd_fetch() was designed to fail prior to tsd
bootstrapping. Fix this by splitting tsd_t into non-nullable tsd_t and
nullable tsdn_t, and modifying all internal APIs that do not critically
rely on tsd to take nullable pointers. Furthermore, add the
tsd_booted_get() function so that tsdn_fetch() can probe whether tsd
bootstrapping is complete and return NULL if not. All dangerous
conversions of nullable pointers are tsdn_tsd() calls that assert-fail
on invalid conversion.
/external/jemalloc/src/prof.c
dc391adc6577b4ed0dac0ce3b1778473e67e4c17 04-May-2016 Jason Evans <jasone@canonware.com> Scale leak report summary according to sampling probability.

This makes the numbers reported in the leak report summary closely match
those reported by jeprof.

This resolves #356.
/external/jemalloc/src/prof.c
90827a3f3ef2099dcd480d542aacc9f44a0787e8 04-May-2016 Jason Evans <jasone@canonware.com> Fix huge_palloc() regression.

Split arena_choose() into arena_[i]choose() and use arena_ichoose() for
arena lookup during internal allocation. This fixes huge_palloc() so
that it always succeeds during extent node allocation.

This regression was introduced by
66cd953514a18477eb49732e40d5c2ab5f1b12c5 (Do not allocate metadata via
non-auto arenas, nor tcaches.).
/external/jemalloc/src/prof.c
174c0c3a9c63b3a0bfa32381148b537e9b9af96d 26-Apr-2016 Jason Evans <jasone@canonware.com> Fix fork()-related lock rank ordering reversals.
/external/jemalloc/src/prof.c
66cd953514a18477eb49732e40d5c2ab5f1b12c5 22-Apr-2016 Jason Evans <jasone@canonware.com> Do not allocate metadata via non-auto arenas, nor tcaches.

This assures that all internally allocated metadata come from the
first opt_narenas arenas, i.e. the automatically multiplexed arenas.
/external/jemalloc/src/prof.c
b2c0d6322d2307458ae2b28545f8a5c9903d7ef5 14-Apr-2016 Jason Evans <jasone@canonware.com> Add witness, a simple online locking validator.

This resolves #358.
/external/jemalloc/src/prof.c
42ce80e15a5aa2ab6f2ec7e5f7c18164803f3076 26-Feb-2016 Jason Evans <jasone@canonware.com> Silence miscellaneous 64-to-32-bit data loss warnings.

This resolves #341.
/external/jemalloc/src/prof.c
ca8fffb5c13b6a7c45fd034667a8910c61d09c3b 24-Feb-2016 Jason Evans <jasone@canonware.com> Silence miscellaneous 64-to-32-bit data loss warnings.
/external/jemalloc/src/prof.c
788d29d397574396c4c93bf1f90da59dd7efc5cc 21-Feb-2016 Jason Evans <jasone@canonware.com> Fix Windows-specific prof-related compilation portability issues.
/external/jemalloc/src/prof.c
7f283980f00f0543e97f46567fbe5bdd4d732724 30-Jan-2016 rustyx <me@rustyx.org> getpid() fix for Win32
/external/jemalloc/src/prof.c
34676d33690f6cc6885ff769e537ca940aacf886 10-Feb-2016 Jason Evans <je@fb.com> Refactor prng* from cpp macros into inline functions.

Remove 32-bit variant, convert prng64() to prng_lg_range(), and add
prng_range().
/external/jemalloc/src/prof.c
f4a0f32d340985de477bbe329ecdaecd69ed1055 27-Oct-2015 Qi Wang <interwq@gwu.edu> Fast-path improvement: reduce # of branches and unnecessary operations.

- Combine multiple runtime branches into a single malloc_slow check.
- Avoid calling arena_choose / size2index / index2size on fast path.
- A few micro optimizations.
/external/jemalloc/src/prof.c
fb64ec29ec05fbcba09898a3c93211966a6fa985 22-Sep-2015 Jason Evans <jasone@canonware.com> Fix prof_tctx_dump_iter() to filter.

Fix prof_tctx_dump_iter() to filter out nodes that were created after
heap profile dumping started. Prior to this fix, spurious entries with
arbitrary object/byte counts could appear in heap profiles, which
resulted in jeprof inaccuracies or failures.
/external/jemalloc/src/prof.c
3ca0cf6a68c9eab7668be14d2b07645277f8b833 17-Sep-2015 Jason Evans <jasone@canonware.com> Fix prof_alloc_rollback().

Fix prof_alloc_rollback() to read tdata from thread-specific data rather
than dereferencing a potentially invalid tctx.
/external/jemalloc/src/prof.c
78ae1ac486ffd7953536786c9a5f9dc2bda78858 08-Sep-2015 Dmitry-Me <wipedout@yandex.ru> Reduce variable scope.

This resolves #274.
/external/jemalloc/src/prof.c
a00b10735a80f7070714b278c8acdad4473bea69 10-Sep-2015 Jason Evans <jasone@canonware.com> Fix "prof.reset" mallctl-related corruption.

Fix heap profiling to distinguish among otherwise identical sample sites
with interposed resets (triggered via the "prof.reset" mallctl). This
bug could cause data structure corruption that would most likely result
in a segfault.
/external/jemalloc/src/prof.c
594c759f37c301d0245dc2accf4d4aaf9d202819 02-Sep-2015 Jason Evans <jasone@canonware.com> Optimize arena_prof_tctx_set().

Optimize arena_prof_tctx_set() to avoid reading run metadata when
deciding whether it's actually necessary to write.
/external/jemalloc/src/prof.c
5fae7dc1b316d0e93aa20cc3aaf050f509aec705 23-Jul-2015 Jason Evans <jasone@canonware.com> Fix MinGW-related portability issues.

Create and use FMT* macros that are equivalent to the PRI* macros that
inttypes.h defines. This allows uniform use of the Unix-specific format
specifiers, e.g. "%zu", as well as avoiding Windows-specific definitions
of e.g. PRIu64.

Add ffs()/ffsl() support for compiling with gcc.

Extract compatibility definitions of ENOENT, EINVAL, EAGAIN, EPERM,
ENOMEM, and ENORANGE into include/msvc_compat/windows_extra.h and
use the file for tests as well as for core jemalloc code.
/external/jemalloc/src/prof.c
e42c309eba6c5084dc0abda9b211e91e2c548fdf 23-Jul-2015 Jason Evans <jasone@canonware.com> Add JEMALLOC_FORMAT_PRINTF().

Replace JEMALLOC_ATTR(format(printf, ...). with
JEMALLOC_FORMAT_PRINTF(), so that configuration feature tests can
omit the attribute if it would cause extraneous compilation warnings.
/external/jemalloc/src/prof.c
0313607e663294cd335da2545f10e949ee546fbc 07-Jul-2015 Jason Evans <jasone@canonware.com> Fix MinGW build warnings.

Conditionally define ENOENT, EINVAL, etc. (was unconditional).

Add/use PRIzu, PRIzd, and PRIzx for use in malloc_printf() calls. gcc issued
(harmless) warnings since e.g. "%zu" should be "%Iu" on Windows, and the
alternative to this workaround would have been to disable the function
attributes which cause gcc to look for type mismatches in formatted printing
function calls.
/external/jemalloc/src/prof.c
7041720ac208fa2f7f65e40d8133d4b291516847 01-May-2015 Jason Evans <jasone@canonware.com> Rename pprof to jeprof.

This rename avoids installation collisions with the upstream gperftools.
Additionally, jemalloc's per thread heap profile functionality
introduced an incompatible file format, so it's now worthwhile to
clearly distinguish jemalloc's version of this script from the upstream
version.

This resolves #229.
/external/jemalloc/src/prof.c
8e33c21d2d03ee7f540e32c3d75b10c128eaea57 01-May-2015 Jason Evans <jasone@canonware.com> Prefer /proc/<pid>/task/<pid>/maps over /proc/<pid>/maps on Linux.

This resolves #227.
/external/jemalloc/src/prof.c
04211e226628c41da4b3804ba411b5dd4b3a02ab 16-Mar-2015 Jason Evans <je@fb.com> Fix heap profiling regressions.

Remove the prof_tctx_state_destroying transitory state and instead add
the tctx_uid field, so that the tuple <thr_uid, tctx_uid> uniquely
identifies a tctx. This assures that tctx's are well ordered even when
more than two with the same thr_uid coexist. A previous attempted fix
based on prof_tctx_state_destroying was only sufficient for protecting
against two coexisting tctx's, but it also introduced a new dumping
race.

These regressions were introduced by
602c8e0971160e4b85b08b16cf8a2375aa24bc04 (Implement per thread heap
profiling.) and 764b00023f2bc97f240c3a758ed23ce9c0ad8526 (Fix a heap
profiling regression.).
/external/jemalloc/src/prof.c
262146dfc4778f0671ab86458acd4ec531a80a34 14-Mar-2015 Jason Evans <jasone@canonware.com> Eliminate innocuous compiler warnings.
/external/jemalloc/src/prof.c
764b00023f2bc97f240c3a758ed23ce9c0ad8526 14-Mar-2015 Jason Evans <je@fb.com> Fix a heap profiling regression.

Add the prof_tctx_state_destroying transitionary state to fix a race
between a thread destroying a tctx and another thread creating a new
equivalent tctx.

This regression was introduced by
602c8e0971160e4b85b08b16cf8a2375aa24bc04 (Implement per thread heap
profiling.).
/external/jemalloc/src/prof.c
d69964bd2d31387f79a5f0494de8fd255b693afb 13-Mar-2015 Jason Evans <je@fb.com> Fix a heap profiling regression.

Fix prof_tctx_comp() to incorporate tctx state into the comparison.
During a dump it is possible for both a purgatory tctx and an otherwise
equivalent nominal tctx to reside in the tree at the same time.

This regression was introduced by
602c8e0971160e4b85b08b16cf8a2375aa24bc04 (Implement per thread heap
profiling.).
/external/jemalloc/src/prof.c
1cb181ed632e7573fb4eab194e4d216867222d27 30-Jan-2015 Jason Evans <je@fb.com> Implement explicit tcache support.

Add the MALLOCX_TCACHE() and MALLOCX_TCACHE_NONE macros, which can be
used in conjunction with the *allocx() API.

Add the tcache.create, tcache.flush, and tcache.destroy mallctls.

This resolves #145.
/external/jemalloc/src/prof.c
5b8ed5b7c91939f64f14fc48be84ed20e3f023f4 26-Jan-2015 Jason Evans <jasone@canonware.com> Implement the prof.gdump mallctl.

This feature makes it possible to toggle the gdump feature on/off during
program execution, whereas the the opt.prof_dump mallctl value can only
be set during program startup.

This resolves #72.
/external/jemalloc/src/prof.c
4581b97809e7e545c38b996870a4e7284a620bc5 27-Nov-2014 Jason Evans <je@fb.com> Implement metadata statistics.

There are three categories of metadata:

- Base allocations are used for bootstrap-sensitive internal allocator
data structures.
- Arena chunk headers comprise pages which track the states of the
non-metadata pages.
- Internal allocations differ from application-originated allocations
in that they are for internal use, and that they are omitted from heap
profiles.

The metadata statistics comprise the metadata categories as follows:

- stats.metadata: All metadata -- base + arena chunk headers + internal
allocations.
- stats.arenas.<i>.metadata.mapped: Arena chunk headers.
- stats.arenas.<i>.metadata.allocated: Internal allocations. This is
reported separately from the other metadata statistics because it
overlaps with the allocated and active statistics, whereas the other
metadata statistics do not.

Base allocations are not reported separately, though their magnitude can
be computed by subtracting the arena-specific metadata.

This resolves #163.
/external/jemalloc/src/prof.c
82cb603ed799f29e387f37fb44cdfbe98fd2e4ee 01-Nov-2014 Jason Evans <jasone@canonware.com> Don't dereference NULL tdata in prof_{enter,leave}().

It is possible for the thread's tdata to be NULL late during thread
destruction, so take care not to dereference a NULL pointer in such
cases.
/external/jemalloc/src/prof.c
cfc5706f6977a48f3b82d69cd68aa1cf8802fb8d 31-Oct-2014 Jason Evans <jasone@canonware.com> Miscellaneous cleanups.
/external/jemalloc/src/prof.c
c93ed81cd06ae46906ae7a386fd6312caca391fb 31-Oct-2014 Jason Evans <jasone@canonware.com> Fix prof_{enter,leave}() calls to pass tdata_self.
/external/jemalloc/src/prof.c
af1f5927633ee2cb98c095de0fcc67b8aacdc9c0 31-Oct-2014 Jason Evans <jasone@canonware.com> Use JEMALLOC_INLINE_C everywhere it's appropriate.
/external/jemalloc/src/prof.c
44c97b712ef1669a4c75ea97e8d47c0535e9ec71 12-Oct-2014 Jason Evans <jasone@canonware.com> Fix a prof_tctx_t/prof_tdata_t cleanup race.

Fix a prof_tctx_t/prof_tdata_t cleanup race by storing a copy of thr_uid
in prof_tctx_t, so that the associated tdata need not be present during
tctx teardown.
/external/jemalloc/src/prof.c
57efa7bb0e284805c940472190bc9924327635a1 09-Oct-2014 Jason Evans <jasone@canonware.com> Avoid atexit(3) when possible, disable prof_final by default.

atexit(3) can deadlock internally during its own initialization if
jemalloc calls atexit() during jemalloc initialization. Mitigate the
impact by restructuring prof initialization to avoid calling atexit()
unless the registered function will actually dump a final heap profile.

Additionally, disable prof_final by default so that this land mine is
opt-in rather than opt-out.

This resolves #144.
/external/jemalloc/src/prof.c
bf40641c5c9496d2912ad9ff2c38ee9ce2bfbde6 07-Oct-2014 Jason Evans <jasone@canonware.com> Fix a prof_tctx_t destruction race.
/external/jemalloc/src/prof.c
f04a0bef99e67e11b687a661d6f04e1d7e3bde1f 05-Oct-2014 Jason Evans <jasone@canonware.com> Fix prof regressions.

Fix prof regressions related to tdata (main per thread profiling data
structure) destruction:
- Deadlock. The fix for this was intended to be part of
20c31deaae38ed9aa4fe169ed65e0c45cd542955 (Test prof.reset mallctl and
fix numerous discovered bugs.) but the fix was left incomplete.
- Destruction race. Detaching tdata just prior to destruction without
holding the tdatas lock made it possible for another thread to destroy
the tdata out from under the thread that was on its way to doing so.
/external/jemalloc/src/prof.c
029d44cf8b22aa7b749747bfd585887fb59e0030 04-Oct-2014 Jason Evans <jasone@canonware.com> Fix tsd cleanup regressions.

Fix tsd cleanup regressions that were introduced in
5460aa6f6676c7f253bfcb75c028dfd38cae8aaf (Convert all tsd variables to
reside in a single tsd structure.). These regressions were twofold:

1) tsd_tryget() should never (and need never) return NULL. Rename it to
tsd_fetch() and simplify all callers.
2) tsd_*_set() must only be called when tsd is in the nominal state,
because cleanup happens during the nominal-->purgatory transition,
and re-initialization must not happen while in the purgatory state.
Add tsd_nominal() and use it as needed. Note that tsd_*{p,}_get()
can still be used as long as no re-initialization that would require
cleanup occurs. This means that e.g. the thread_allocated counter
can be updated unconditionally.
/external/jemalloc/src/prof.c
fc12c0b8bc1160530d1e3e641b76d2a4f793136f 04-Oct-2014 Jason Evans <jasone@canonware.com> Implement/test/fix prof-related mallctl's.

Implement/test/fix the opt.prof_thread_active_init,
prof.thread_active_init, and thread.prof.active mallctl's.

Test/fix the thread.prof.name mallctl.

Refactor opt_prof_active to be read-only and move mutable state into the
prof_active variable. Stop leaning on ctl-related locking for
protection.
/external/jemalloc/src/prof.c
551ebc43647521bdd0bc78558b106762b3388928 03-Oct-2014 Jason Evans <jasone@canonware.com> Convert to uniform style: cond == false --> !cond
/external/jemalloc/src/prof.c
20c31deaae38ed9aa4fe169ed65e0c45cd542955 03-Oct-2014 Jason Evans <jasone@canonware.com> Test prof.reset mallctl and fix numerous discovered bugs.
/external/jemalloc/src/prof.c
6ef80d68f092caf3b3802a73b8d716057b41864c 25-Sep-2014 Jason Evans <jasone@canonware.com> Fix profile dumping race.

Fix a race that caused a non-critical assertion failure. To trigger the
race, a thread had to be part way through initializing a new sample,
such that it was discoverable by the dumping thread, but not yet linked
into its gctx by the time a later dump phase would normally have reset
its state to 'nominal'.

Additionally, lock access to the state field during modification to
transition to the dumping state. It's not apparent that this oversight
could have caused an actual problem due to outer locking that protects
the dumping machinery, but the added locking pedantically follows the
stated locking protocol for the state field.
/external/jemalloc/src/prof.c
5460aa6f6676c7f253bfcb75c028dfd38cae8aaf 23-Sep-2014 Jason Evans <jasone@canonware.com> Convert all tsd variables to reside in a single tsd structure.
/external/jemalloc/src/prof.c
9d8f3d203327a7ee9ba92814e1fd8a7d1b9c421b 12-Sep-2014 Jason Evans <jasone@canonware.com> Fix prof regressions.

Don't use atomic_add_uint64(), because it isn't available on 32-bit
platforms.

Fix forking support functions to manage all prof-related mutexes.

These regressions were introduced by
602c8e0971160e4b85b08b16cf8a2375aa24bc04 (Implement per thread heap
profiling.), which did not make it into any releases prior to these
fixes.
/external/jemalloc/src/prof.c
6e73dc194ee9682d3eacaf725a989f04629718f7 10-Sep-2014 Jason Evans <je@fb.com> Fix a profile sampling race.

Fix a profile sampling race that was due to preparing to sample, yet
doing nothing to assure that the context remains valid until the stats
are updated.

These regressions were caused by
602c8e0971160e4b85b08b16cf8a2375aa24bc04 (Implement per thread heap
profiling.), which did not make it into any releases prior to these
fixes.
/external/jemalloc/src/prof.c
6fd53da030b5e9161a49d6010a8b38499ca2a124 09-Sep-2014 Jason Evans <je@fb.com> Fix prof_tdata_get()-related regressions.

Fix prof_tdata_get() to avoid dereferencing an invalid tdata pointer
(when it's PROF_TDATA_STATE_{REINCARNATED,PURGATORY}).

Fix prof_tdata_get() callers to check for invalid results besides NULL
(PROF_TDATA_STATE_{REINCARNATED,PURGATORY}).

These regressions were caused by
602c8e0971160e4b85b08b16cf8a2375aa24bc04 (Implement per thread heap
profiling.), which did not make it into any releases prior to these
fixes.
/external/jemalloc/src/prof.c
602c8e0971160e4b85b08b16cf8a2375aa24bc04 19-Aug-2014 Jason Evans <jasone@canonware.com> Implement per thread heap profiling.

Rename data structures (prof_thr_cnt_t-->prof_tctx_t,
prof_ctx_t-->prof_gctx_t), and convert to storing a prof_tctx_t for
sampled objects.

Convert PROF_ALLOC_PREP() to prof_alloc_prep(), since precise backtrace
depth within jemalloc functions is no longer an issue (pprof prunes
irrelevant frames).

Implement mallctl's:
- prof.reset implements full sample data reset, and optional change of
sample interval.
- prof.lg_sample reads the current sample interval (opt.lg_prof_sample
was the permanent source of truth prior to prof.reset).
- thread.prof.name provides naming capability for threads within heap
profile dumps.
- thread.prof.active makes it possible to activate/deactivate heap
profiling for individual threads.

Modify the heap dump files to contain per thread heap profile data.
This change is incompatible with the existing pprof, which will require
enhancements to read and process the enriched data.
/external/jemalloc/src/prof.c
3a81cbd2d4f2d8c052f11f4b0b73ee5c84a33d4f 16-Aug-2014 Jason Evans <jasone@canonware.com> Dump heap profile backtraces in a stable order.

Also iterate over per thread stats in a stable order, which prepares the
way for stable ordering of per thread heap profile dumps.
/external/jemalloc/src/prof.c
ab532e97991d190e9368781cf308c60c2319b933 16-Aug-2014 Jason Evans <jasone@canonware.com> Directly embed prof_ctx_t's bt.
/external/jemalloc/src/prof.c
b41ccdb125b312d4522da1a80091a0137773c964 16-Aug-2014 Jason Evans <jasone@canonware.com> Convert prof_tdata_t's bt2cnt to a comprehensive map.

Treat prof_tdata_t's bt2cnt as a comprehensive map of the thread's
extant allocation samples (do not limit the total number of entries).
This helps prepare the way for per thread heap profiling.
/external/jemalloc/src/prof.c
3e310b34eb53eb331981ecda2ea5f10cf6956747 29-May-2014 Chris Peterson <cpeterson@mozilla.com> Fix -Wsign-compare warnings
/external/jemalloc/src/prof.c
6f001059aa33d77a3cb7799002044faf8dd08fc0 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
9d4e13f45a281a2eabe4d3528ab26e5f3903d5a5 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