Commit Graph

93 Commits

Author SHA1 Message Date
Mike Hommey
18cd2850ec Bug 658995 part 2 - Use static destructors instead of atexit(). r=bsmedberg 2011-06-15 07:32:03 +02:00
Matt Brubeck
542052b358 Back out 6b23b52e68d6 - e92f98e8a335 (bug 632404, 552864, 658995) because of Tp4 regression. 2011-06-15 09:00:28 -07:00
Mike Hommey
fccd5731e6 Bug 658995 part 2 - Use static destructors instead of atexit(). r=bsmedberg 2011-06-15 07:32:03 +02:00
L. David Baron
6c715ff5ec Initialize the out param from backtrace(). (Bug 549561) r=bsmedberg a2.0=tests 2010-09-21 19:32:48 -07:00
L. David Baron
bae6ccebf1 Add environment variable NS_TRACE_MALLOC_DISABLE_STACKS for disabling the stack-walking part of trace-malloc to improve performance of tinderbox test machines. (Bug 549561) r=bsmedberg a2.0=tests 2010-08-19 09:37:59 -04:00
L. David Baron
db7505cc9b Avoid a lock/unlock pair for each call to |calltree|. (Bug 549561) r=bsmedberg a2.0=tests 2010-08-19 09:37:59 -04:00
Pirkka Kärenlampi
7f66d4ca23 Bug 586944. Make 'backtrace' static to fix issues with the symbol being overriden by system libraries. r=dbaron,a=bsmedberg 2010-08-19 21:35:08 +12:00
L. David Baron
4a7c7eab32 Make trace-malloc malloc hooks work with 64-bit Mac OS X by adjusting types. (Bug 558097, maybe) 2010-04-08 17:21:03 -07:00
Chris Jones
76a23485f7 Bug 529134: Initialize tracemalloc in NS_LogInit() to ensure that tracemalloc is always thread safe. r=bsmedberg r=dbaron 2009-12-29 16:45:59 -06:00
L. David Baron
250d1527f9 Don't rely on NS_TraceMallocStartupArgs to initialize TLS index. (Bug 442192) r=brendan 2009-03-11 07:51:30 -07:00
Ben Turner
47baa0fa73 Bustage fix for bug 478195. 2009-02-17 21:51:50 -08:00
Robert O'Callahan
a7eacba780 Bug 478195 - '[Mac] Same-thread deadlock with trace-malloc (causing random red on OS X 10.5.2 mozilla-central leak test build)'. r=dbaron. 2009-02-17 21:11:29 -08:00
Arpad Borsos
1b55360c07 Bug 456388 - Remove PR_STATIC_CALLBACK and PR_CALLBACK(_DECL) from the tree; r+sr=brendan 2008-10-10 17:04:34 +02:00
L. David Baron
05245c83af Fix broken --shutdown-leaks argument handling on Windows by copying the argument out of argv rather than holding a pointer to it. b=433708 r=pavlov 2008-05-14 11:57:32 -07:00
9a778504b9 Expose trace-malloc stack tracing. b=422847 r=brendan a=NPOTDB 2008-03-14 17:11:37 -07:00
ec7f25b1f6 Fix race saving/restoring malloc hooks by going back to overriding malloc, etc., plus some additional cleanup. b=392009 r+a1.9=brendan 2007-09-28 15:39:59 -07:00
0ee54c81c4 Suppress tracing around calls into original allocators, in case they recur back into our hooks. Fixes most of leak *stats* regression from bug 392009. r+a1.9=brendan 2007-09-25 13:33:37 -07:00
67e7b3c69d Reduce code duplication among platforms, support hooking and unhooking (392009, r=dbaron). 2007-09-24 18:13:17 -07:00
a63fe68680 Port trace-malloc to Mac OS X. b=392118 r+a=brendan 2007-08-14 09:35:46 -07:00
c787064ba0 Make void signatures match header. b=391766 r+a=brendan 2007-08-10 17:53:28 -07:00
96b741af7f Lock around NS_TraceMallocDumpAllocations. b=391766 r+a=brendan 2007-08-10 17:53:02 -07:00
c419659799 Stop using strncpy unnecessarily. b=391766 r+a=brendan 2007-08-10 17:52:35 -07:00
ecec5fd6ab Add suppression code around calls to original allocation functions to handle things like new[] calling new. b=391491 r+a=brendan 2007-08-10 15:22:07 -07:00
fbdc0b76cb Define the __libc_* on Windows to something that does automatic suppression, like on Linux. b=391477 r+a=brendan 2007-08-10 15:21:13 -07:00
21952d5e17 Convert trace-malloc to using XPCOM stack walking API. b=374829 r+a=brendan 2007-08-10 15:20:48 -07:00
47708ab0fa Start reducing the scope of locking in trace-malloc, and convert the PRMonitor to a PRLock. b=376874 r+a=brendan 2007-08-10 15:19:32 -07:00
f53e441157 Use thread-local storage for tracing suppression. b=376874 r+a=brendan 2007-08-10 15:19:14 -07:00
ebfba2a3ed Improve performance when trace-malloc is built but not used by adding a fast-path around the locking. b=150015 r=brendan a=bzbarsky 2007-08-10 14:24:32 -07:00
0d0bfc3a46 Replace printf that fires all the time with an assertion for what I really want to check. 2007-04-03 18:35:35 -07:00
5009b4d172 The tinderbox problem was due to insufficient STARTUP_TMBUFSIZE, so re-increase the buffer size to 64K (from 16K) and comment out my debugging code. 2007-04-03 18:06:34 -07:00
231a265cb8 Back out startup buffer size change (but leave diagnostic). 2007-04-03 17:53:26 -07:00
577a479f32 Try increasing startup buffer size to see if it fixes tinderbox orange. 2007-04-03 17:39:56 -07:00
e07b114d0a Fix deadlock in trace-malloc by exiting monitor around call to dladdr. b=363334 r=brendan 2007-04-03 15:14:01 -07:00
dbaron@dbaron.org
9c24c1dfd6 Make trace-malloc dumps not print '(nil)' instead of an address. b=331743 (fixing regression from previous patch) 2007-02-14 07:07:51 +00:00
dbaron@dbaron.org
8dbb17b8ae Make trace-malloc override additional memory allocation functions. b=331742 2007-02-14 07:06:35 +00:00
dbaron@dbaron.org
e71a5c8b41 Fix relocations that need to be resolved at runtime when building with default visibility as hidden and wrapping system includes. b=358558 r=bsmedberg 2006-10-29 16:11:26 +00:00
dbaron@dbaron.org
e5fa18ef75 Partial 64-bit and x86_64 porting. b=331743 r=brendan 2006-03-27 07:29:32 +00:00
dbaron@dbaron.org
644c6c0fe5 Revert old fix for 230336 in favor of better fix elsewhere. 2006-03-25 04:16:00 +00:00
dbaron@dbaron.org
23eb069efa Fix C++ comments that I introduced. 2006-03-24 08:32:09 +00:00
dbaron@dbaron.org
9af7e4411b Workaround brokenness of __builtin_frame_address(0) on gcc 4.1 (as shipped with FC5, at least). b=331436 r=brendan 2006-03-23 23:21:27 +00:00
dbaron@dbaron.org
0bc0709651 Use __builtin_frame_address instead of setjmp to get the frame pointer. b=323853 r=brendan 2006-03-19 01:27:17 +00:00
timeless@mozdev.org
789bc03ed9 Bug 295159 trace-malloc build crashes in glibc initialization
patch by sascha@schumann.cx r=timeless sr=dbaron
2005-11-13 22:39:05 +00:00
gandalf@firefox.pl
0509327e61 Bug 288823: Trace-malloc fails to compile on windows; p=bugzilla@mcsmurf.de,r+sr=dbaron,a=brendan 2005-06-11 12:52:23 +00:00
dbaron@dbaron.org
7418d65ba5 For functions in the binary, output something compatible with addr2line. b=230336 r=brendan 2005-03-30 01:54:54 +00:00
gerv@gerv.net
8e710656a3 Bug 236613: change to MPL/LGPL/GPL tri-license. 2004-04-25 21:07:34 +00:00
cls@seawood.org
a674911efb Remove troublesome libiberty dependency by using __cxa_demangle instead of cplus_demangle. (redux)
Bug #232763 r=dbaron sr=brendan
2004-02-11 07:16:11 +00:00
brendan@mozilla.org
a7e39e16db Get my NS_TrackAllocation patch in before cls moves files. 2004-02-11 04:15:17 +00:00
alecf@flett.org
feeeabb027 minor updates to spacetrace:
- show progress while loading the events file
- show more detailed leak summary
no review, this is a debug-only tool and I'm only changing console output
2004-01-13 16:35:45 +00:00
dbaron@dbaron.org
76c5478495 Remove pc tests in stack walking code that prevent it from working on Fedora Core 1. b=227396 r=bryner 2004-01-03 19:16:31 +00:00
dbaron@dbaron.org
130faef3d0 Be sure to call NS_TraceMallocStartup so we know (on Unix) not to waste time logging everything once we know there is no command-line argument. b=113833 r+sr=brendan 2003-06-21 00:28:05 +00:00