summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/internal/prof.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid variable length arrays and remove declarations within codeMike Hommey2012-04-291-1/+2
| | | | | | | | | | | | MSVC doesn't support C99, and building as C++ to be able to use them is dangerous, as C++ and C99 are incompatible. Introduce a VARIABLE_ARRAY macro that either uses VLA when supported, or alloca() otherwise. Note that using alloca() inside loops doesn't quite work like VLAs, thus the use of VARIABLE_ARRAY there is discouraged. It might be worth investigating ways to check whether VARIABLE_ARRAY is used in such context at runtime in debug builds and bail out if that happens.
* Fix more prof_tdata resurrection corner cases.Jason Evans2012-04-291-5/+7
|
* Handle prof_tdata resurrection.Jason Evans2012-04-291-3/+15
| | | | | Handle prof_tdata resurrection during thread shutdown, similarly to how tcache and quarantine handle resurrection.
* Fix a PROF_ALLOC_PREP() error path.Jason Evans2012-04-251-1/+3
| | | | | Fix a PROF_ALLOC_PREP() error path to initialize the return value to NULL.
* Fix heap profiling bugs.Jason Evans2012-04-221-9/+34
| | | | | | | | | | | 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()).
* Update prof defaults to match common usage.Jason Evans2012-04-171-1/+2
| | | | | | | | | 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.
* Implement Valgrind support, redzones, and quarantine.Jason Evans2012-04-111-3/+3
| | | | | | | | | | | | | Implement Valgrind support, as well as the redzone and quarantine features, which help Valgrind detect memory errors. Redzones are only implemented for small objects because the changes necessary to support redzones around large and huge objects are complicated by in-place reallocation, to the point that it isn't clear that the maintenance burden is worth the incremental improvement to Valgrind support. Merge arena_salloc() and arena_salloc_demote(). Refactor i[v]salloc() to expose the 'demote' option.
* Remove ephemeral mutexes.Jason Evans2012-03-241-5/+11
| | | | | | | | | | | 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().
* Implement tsd.Jason Evans2012-03-231-27/+15
| | | | | | | | | | | | | 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.
* Invert NO_TLS to JEMALLOC_TLS.Jason Evans2012-03-191-1/+1
|
* Use UINT64_C() rather than LLU for 64-bit constants.Jason Evans2012-03-051-1/+1
|
* Rename prn to prng.Jason Evans2012-03-021-3/+3
| | | | | Rename prn to prng so that Windows doesn't choke when trying to create a file named prn.h.
* Remove the opt.lg_prof_bt_max option.Jason Evans2012-02-141-20/+10
| | | | | | | | 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.
* Remove the opt.lg_prof_tcmax option.Jason Evans2012-02-141-2/+3
| | | | | | | 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.
* Remove magic.Jason Evans2012-02-131-4/+0
| | | | | | Remove structure magic, because 1) it is no longer conditional, and 2) it stopped being very effective at detecting memory corruption several years ago.
* Reduce cpp conditional logic complexity.Jason Evans2012-02-111-4/+11
| | | | | | | | | | | | | | | | | | | | | | 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.
* Fix off-by-one backtracing issues.Jason Evans2011-08-121-68/+54
| | | | | | | | | | | | Rewrite prof_alloc_prep() as a cpp macro, PROF_ALLOC_PREP(), in order to remove any doubt as to whether an additional stack frame is created. Prior to this change, it was assumed that inlining would reduce the total number of frames in the backtrace, but in practice behavior wasn't completely predictable. Create imemalign() and call it from posix_memalign(), memalign(), and valloc(), so that all entry points require the same number of stack frames to be ignored during backtracing.
* Move repo contents in jemalloc/ to top level.Jason Evans2011-04-011-0/+561