summaryrefslogtreecommitdiffstats
path: root/mutrace.c
Commit message (Collapse)AuthorAgeFilesLines
* Add support for profiling condition variablesHEADmasterPhilip Withnall2011-09-191-77/+675
| | | | | | | | | This adds a separate hash table of structures for profiling data for each condition variable in the program. Statistics such as the number of waits, signals, number of contended waits (waits while another thread is already waiting), contended signals (signals while no threads are waiting) and contention time are collected and presented in a second table in the summary printout.
* Expand support for rwlocks to count read and write locks separatelyPhilip Withnall2011-09-191-84/+149
| | | | | | | | | | | All counters such as n_locked are now split into two: one for reads and one for writes. Normal mutexes just use the write counters, whereas rwlocks now use both the read and write counters as appropriate. In order to display all this new data, rwlocks are now printed as two lines in the summary table: the first is for the write counters and the second is for the read counters. There is currently no way to print out the sum of any two such counters, or order by this sum.
* Allow user-specified ordering of the summary tablePhilip Withnall2011-09-191-28/+127
| | | | | This is now supported by the --order command line argument or the MUTRACE_SUMMARY_ORDER environment variable.
* Track total contention time for mutexes and rwlocksPhilip Withnall2011-09-191-27/+69
| | | | | | | | | | | | | | | | | This adds the ability to track the total amount of time for which each mutex or rwlock is contended. Effectively, this is the amount of time which is spent blocked inside pthread_mutex_lock() and friends — we don't count time spent inside these functions if the mutex isn't busy, however (i.e. if pthread_mutex_trylock() doesn't return EBUSY). It is possible for the total contention time for a given mutex to exceed the total locked time. This can happen if the OS doesn't re-schedule a thread which is blocked on a mutex until some time after the thread which was holding the mutex unlocks it. This commit replaces the “max.Time[ms]” summary column with a new “cont.Time[ms]” column which lists the total contention time for each mutex. I believe this is more important/useful than the maximum locked time.
* Disable deprecation warning for __malloc_hookPhilip Withnall2011-09-191-0/+3
|
* Print out the summary when SIGUSR1 is receivedPhilip Withnall2011-09-191-11/+41
|
* Fix some typos in output stringsPhilip Withnall2011-09-191-3/+3
|
* Delay the symbols name resolution.Lénaïc Huard2010-02-211-16/+31
| | | | | | | Retrieving the stacktrace is cheap, but resolving symbols name may be expansive. Delaying this process prevents program perturbation and saves process as the symbols name resolution is now done only for the displayed mutexes.
* Implement a mutex free version of backtrace()Lénaïc Huard2010-02-211-1/+31
| | | | | | The glibc version of backtrace() uses a mutex which is also used by C++ exception throwing. Using it in mutrace leads to dead lock when a C++ exception throws.
* Include signal.c on non-x86 archsMichel Alexandre Salim2009-10-071-0/+1
|
* warn if applications have been built without -rdynamicLennart Poettering2009-09-211-7/+6
|
* optionally read debug info for backtracesLennart Poettering2009-09-201-0/+6
|
* show message about used processorsLennart Poettering2009-09-201-0/+14
|
* profile rwlocks, tooLennart Poettering2009-09-201-13/+428
|
* give hint regarding R columnLennart Poettering2009-09-161-3/+7
|
* make clear this is Linux stuffLennart Poettering2009-09-161-0/+4
|
* optionally track RT status of threads using a mutexLennart Poettering2009-09-161-17/+65
|
* show mutex protocolLennart Poettering2009-09-161-7/+30
|
* redirect backtrace() so that we don't enter an endless loop if the user ↵Lennart Poettering2009-09-151-2/+45
| | | | calls backtrace() himself
* add likely/unlikey everywhere to minimize impactLennart Poettering2009-09-151-23/+26
|
* explain in more detail why we don't support jemallocLennart Poettering2009-09-151-0/+10
|
* detect alternative memory allocators and quit earlyLennart Poettering2009-09-151-0/+10
|
* handle mutexes properly that are taken before we are initializedLennart Poettering2009-09-151-0/+65
|
* don't try to load symbols on every single mutex operationLennart Poettering2009-09-151-1/+3
|
* show process name/pid in outputLennart Poettering2009-09-151-5/+21
|
* handle properly if other shared library constructor is not the first one to ↵Lennart Poettering2009-09-151-11/+53
| | | | be called but others already used mutex operations
* add wrapper script for easy invocationLennart Poettering2009-09-151-13/+14
|
* autoconfizationLennart Poettering2009-09-151-1/+1
|
* Merge remote branch 'origin/master'Lennart Poettering2009-09-141-0/+3
|\
| * properly recognize our own symbols in stack trace on older glibcLennart Poettering2009-09-141-0/+3
| |
* | rework dlsym() code and make it entirely compiler cleanLennart Poettering2009-09-141-26/+23
| |
* | use type-safe casts when getting real function pointersLennart Poettering2009-09-141-21/+23
| |
* | add license blurbLennart Poettering2009-09-141-0/+19
| |
* | handle pthread_cond_xxx based mutex operations properlyLennart Poettering2009-09-141-29/+32
|/
* fix ellipsationLennart Poettering2009-09-141-1/+1
|
* If nothing is contended say that explicitlyLennart Poettering2009-09-141-10/+15
|
* fill in configuration from environmentLennart Poettering2009-09-141-23/+59
|
* optionally raise trap when encountering inconsistencyLennart Poettering2009-09-141-0/+15
|
* show mutex type in summary tableLennart Poettering2009-09-141-15/+38
|
* POSIX thinks using trylock() on a mutex you already own is OK, so don't ↵Lennart Poettering2009-09-141-3/+3
| | | | complain about it
* only show the first 10 mutexesLennart Poettering2009-09-141-12/+23
|
* increase hash table sizeLennart Poettering2009-09-141-6/+3
|
* handle recursive mutexes properlyLennart Poettering2009-09-141-6/+20
|
* measure overall runtimeLennart Poettering2009-09-141-31/+43
|
* initial commitLennart Poettering2009-09-141-0/+683