Commit Graph

129 Commits

Author SHA1 Message Date
L. David Baron
66ddae3bca Initialize the out param from backtrace(). (Bug 549561) r=bsmedberg a2.0=tests 2010-09-21 19:32:48 -07:00
L. David Baron
0104f063dc 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
4af0a6f409 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
8740898d9f 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
29445edb09 Make trace-malloc work again on Linux following mozalloc landing. (Bug 576776) r=cjones 2010-07-16 22:36:34 -07:00
Makoto Kato
2f05a6575f Bug 568467 - trace-malloc support for Windows x64. r=dbaron 2010-06-04 16:53:02 +09:00
Chris Jones
ef614431d7 Bug 560969: Teach trace-malloc about VC10. r=dbaron 2010-04-27 00:43:04 -05:00
L. David Baron
f317634122 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
a8c5a07cbb Bug 551254: Allow reviewed+approved STL headers to be included through <foo>. (<algorithm> and <vector> are provisionally in the list because of their use in libpr0n, but need to be reviewed in followup bug 556700 and bug 556701). r=ehsan,ted,zwol 2010-04-02 12:58:11 -05:00
Chris Jones
4cc7c33107 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
Benjamin Smedberg
ba372f3a4c Followup to bug 398573 - remove REQUIRES from the tree since it is no longer used... automatically generated patch, rs=ted 2009-08-25 08:59:31 -07:00
L. David Baron
f210f9be3d Don't rely on NS_TraceMallocStartupArgs to initialize TLS index. (Bug 442192) r=brendan 2009-03-11 07:51:30 -07:00
Ben Turner
2f25e4d199 Bustage fix for bug 478195. 2009-02-17 21:51:50 -08:00
Robert O'Callahan
2d11f79424 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
c72ef7d248 Bug 456388 - Remove PR_STATIC_CALLBACK and PR_CALLBACK(_DECL) from the tree; r+sr=brendan 2008-10-10 17:04:34 +02:00
Ben Turner
fee386e2e0 Bug 435122 - "Use TraceMalloc to get stack traces of potential deadlocks". r=bsmedberg+dbaron. 2008-06-26 10:12:42 -07:00
L. David Baron
ce9b5c3e85 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
dbaron@dbaron.org
db479f0ae5 Expose trace-malloc stack tracing. b=422847 r=brendan a=NPOTDB 2008-03-14 17:11:37 -07:00
dbaron@dbaron.org
0b4a15ddfa And actually get the right bug number. b=415426 (which is what the previous checkin was for as well) 2008-02-03 11:59:07 -08:00
dbaron@dbaron.org
d05c9ec0d8 Switch back to evil casts, which are the only solution that works across SDK version. b=415252 2008-02-03 11:51:14 -08:00
dbaron@dbaron.org
775c2226ec Match new (more-const) signature for PENUMLOADED_MODULES_CALLBACK and PENUMLOADED_MODULES_CALLBACK64. b=415426 Fixing bustage on Windows tinderbox from SDK upgrade. 2008-02-03 11:34:31 -08:00
dbaron@dbaron.org
b49904959e 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
dbaron@dbaron.org
0926363321 Address brendan's review comments on bug 391141. r=brendan a=not part of release builds 2007-09-27 09:27:12 -07:00
dbaron@dbaron.org
70983c436d 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
brendan@mozilla.org
83b6101d31 Reduce code duplication among platforms, support hooking and unhooking (392009, r=dbaron). 2007-09-24 18:13:17 -07:00
dbaron@dbaron.org
84c375636f Revert previous checkin. 2007-08-19 17:59:57 -07:00
dbaron@dbaron.org
5e0e5baefe Attempt to fix trace-malloc bustage in libxul builds by removing LIBXUL_LIBRARY=1 (fixing tinderbox bustage for newly-enabled test). 2007-08-19 17:50:01 -07:00
dbaron@dbaron.org
051a23c4b6 Port trace-malloc to Mac OS X. b=392118 r+a=brendan 2007-08-14 09:35:46 -07:00
dbaron@dbaron.org
b389fc0c0c Make void signatures match header. b=391766 r+a=brendan 2007-08-10 17:53:28 -07:00
dbaron@dbaron.org
52cad5fe7e Lock around NS_TraceMallocDumpAllocations. b=391766 r+a=brendan 2007-08-10 17:53:02 -07:00
dbaron@dbaron.org
f7090d52d4 Stop using strncpy unnecessarily. b=391766 r+a=brendan 2007-08-10 17:52:35 -07:00
dbaron@dbaron.org
185d0a35f7 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
dbaron@dbaron.org
e9ba17bce0 Hook new[] and delete[] too, since (with VC8 anyway) we're picking up new[] through new, but not picking up delete[]. b=391491 r+a=brendan 2007-08-10 15:21:37 -07:00
dbaron@dbaron.org
7937605426 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
dbaron@dbaron.org
593cd91cf8 Convert trace-malloc to using XPCOM stack walking API. b=374829 r+a=brendan 2007-08-10 15:20:48 -07:00
dbaron@dbaron.org
def4dbe999 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
dbaron@dbaron.org
40b3eebdbb Use thread-local storage for tracing suppression. b=376874 r+a=brendan 2007-08-10 15:19:14 -07:00
dbaron@dbaron.org
57b13d7670 Fix bustage on VC8. b=391141 r=brendan a=DEBUG-only 2007-08-10 14:26:03 -07:00
dbaron@dbaron.org
8888cc609f 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
dbaron@dbaron.org
98b0c638b4 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
dbaron@dbaron.org
c3cd8006d4 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
dbaron@dbaron.org
f21d5e810c Back out startup buffer size change (but leave diagnostic). 2007-04-03 17:53:26 -07:00
dbaron@dbaron.org
731c109c0d Try increasing startup buffer size to see if it fixes tinderbox orange. 2007-04-03 17:39:56 -07:00
dbaron@dbaron.org
74dbf8be3e Fix deadlock in trace-malloc by exiting monitor around call to dladdr. b=363334 r=brendan 2007-04-03 15:14:01 -07:00
hg@mozilla.com
05e5d33a57 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT, 2007-03-22 10:30:00 -07:00
dbaron%dbaron.org
63511c956e Make trace-malloc malloc-hooking work with compilers newer than VC6. b=374645 r=robstrong 2007-03-21 00:38:58 +00:00
dbaron%dbaron.org
71bedcef11 Document changes from bug 113738. 2007-03-01 01:33:54 +00:00
dbaron%dbaron.org
0c76c7aa5d 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
10d5ca630a Make trace-malloc override additional memory allocation functions. b=331742 2007-02-14 07:06:35 +00:00
dbaron%dbaron.org
37ae43f7f7 Fix whitespace error introduced by my previous patch. 2006-11-01 07:22:12 +00:00