79 Commits

Author SHA1 Message Date
dbaron%dbaron.org
51bbcb002e Expose trace-malloc stack tracing. b=422847 r=brendan a=NPOTDB
git-svn-id: svn://10.0.0.236/trunk@247882 18797224-902f-48f8-a5cc-f745e15eee43
2008-03-15 00:11:37 +00:00
dbaron%dbaron.org
da7588ce54 Fix race saving/restoring malloc hooks by going back to overriding malloc, etc., plus some additional cleanup. b=392009 r+a1.9=brendan
git-svn-id: svn://10.0.0.236/trunk@236881 18797224-902f-48f8-a5cc-f745e15eee43
2007-09-28 22:39:59 +00:00
dbaron%dbaron.org
b1b339d6d7 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
git-svn-id: svn://10.0.0.236/trunk@236675 18797224-902f-48f8-a5cc-f745e15eee43
2007-09-25 20:33:37 +00:00
brendan%mozilla.org
337a22147a Reduce code duplication among platforms, support hooking and unhooking (392009, r=dbaron).
git-svn-id: svn://10.0.0.236/trunk@236629 18797224-902f-48f8-a5cc-f745e15eee43
2007-09-25 01:13:17 +00:00
dbaron%dbaron.org
ac08a83d0d Port trace-malloc to Mac OS X. b=392118 r+a=brendan
git-svn-id: svn://10.0.0.236/trunk@232045 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-14 16:35:46 +00:00
dbaron%dbaron.org
6a28cb214e Make void signatures match header. b=391766 r+a=brendan
git-svn-id: svn://10.0.0.236/trunk@231882 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-11 00:53:28 +00:00
dbaron%dbaron.org
2335ab2dfa Lock around NS_TraceMallocDumpAllocations. b=391766 r+a=brendan
git-svn-id: svn://10.0.0.236/trunk@231881 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-11 00:53:02 +00:00
dbaron%dbaron.org
29aa7b0cfd Stop using strncpy unnecessarily. b=391766 r+a=brendan
git-svn-id: svn://10.0.0.236/trunk@231880 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-11 00:52:35 +00:00
dbaron%dbaron.org
26da747fbf Add suppression code around calls to original allocation functions to handle things like new[] calling new. b=391491 r+a=brendan
git-svn-id: svn://10.0.0.236/trunk@231870 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-10 22:22:07 +00:00
dbaron%dbaron.org
b40323d967 Define the __libc_* on Windows to something that does automatic suppression, like on Linux. b=391477 r+a=brendan
git-svn-id: svn://10.0.0.236/trunk@231868 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-10 22:21:13 +00:00
dbaron%dbaron.org
d9000559b5 Convert trace-malloc to using XPCOM stack walking API. b=374829 r+a=brendan
git-svn-id: svn://10.0.0.236/trunk@231867 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-10 22:20:49 +00:00
dbaron%dbaron.org
e136c43f44 Start reducing the scope of locking in trace-malloc, and convert the PRMonitor to a PRLock. b=376874 r+a=brendan
git-svn-id: svn://10.0.0.236/trunk@231866 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-10 22:19:32 +00:00
dbaron%dbaron.org
4fbbc2d9f3 Use thread-local storage for tracing suppression. b=376874 r+a=brendan
git-svn-id: svn://10.0.0.236/trunk@231865 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-10 22:19:14 +00:00
dbaron%dbaron.org
9a03bda17c Improve performance when trace-malloc is built but not used by adding a fast-path around the locking. b=150015 r=brendan a=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@231853 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-10 21:24:32 +00:00
dbaron%dbaron.org
67edb9b293 Replace printf that fires all the time with an assertion for what I really want to check.
git-svn-id: svn://10.0.0.236/trunk@224119 18797224-902f-48f8-a5cc-f745e15eee43
2007-04-04 01:35:35 +00:00
dbaron%dbaron.org
59f8b44d9f 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.
git-svn-id: svn://10.0.0.236/trunk@224116 18797224-902f-48f8-a5cc-f745e15eee43
2007-04-04 01:06:34 +00:00
dbaron%dbaron.org
ef2f01ab07 Back out startup buffer size change (but leave diagnostic).
git-svn-id: svn://10.0.0.236/trunk@224115 18797224-902f-48f8-a5cc-f745e15eee43
2007-04-04 00:53:26 +00:00
dbaron%dbaron.org
7be4d8b36a Try increasing startup buffer size to see if it fixes tinderbox orange.
git-svn-id: svn://10.0.0.236/trunk@224113 18797224-902f-48f8-a5cc-f745e15eee43
2007-04-04 00:39:56 +00:00
dbaron%dbaron.org
abd11cb32c Fix deadlock in trace-malloc by exiting monitor around call to dladdr. b=363334 r=brendan
git-svn-id: svn://10.0.0.236/trunk@224106 18797224-902f-48f8-a5cc-f745e15eee43
2007-04-03 22:14:01 +00:00
dbaron%dbaron.org
503c8f5296 Make trace-malloc dumps not print '(nil)' instead of an address. b=331743 (fixing regression from previous patch)
git-svn-id: svn://10.0.0.236/trunk@220108 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-14 07:07:51 +00:00
dbaron%dbaron.org
9940bb454e Make trace-malloc override additional memory allocation functions. b=331742
git-svn-id: svn://10.0.0.236/trunk@220107 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-14 07:06:35 +00:00
dbaron%dbaron.org
d23efae1c1 Fix relocations that need to be resolved at runtime when building with default visibility as hidden and wrapping system includes. b=358558 r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@214339 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-29 16:11:26 +00:00
dbaron%dbaron.org
58755e3e9c Partial 64-bit and x86_64 porting. b=331743 r=brendan
git-svn-id: svn://10.0.0.236/trunk@193031 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-27 07:29:32 +00:00
dbaron%dbaron.org
1f8a8bbc2f Revert old fix for 230336 in favor of better fix elsewhere.
git-svn-id: svn://10.0.0.236/trunk@192977 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-25 04:16:00 +00:00
dbaron%dbaron.org
c4c9b3f3da Fix C++ comments that I introduced.
git-svn-id: svn://10.0.0.236/trunk@192911 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-24 08:32:09 +00:00
dbaron%dbaron.org
ee0c4c2b8e Workaround brokenness of __builtin_frame_address(0) on gcc 4.1 (as shipped with FC5, at least). b=331436 r=brendan
git-svn-id: svn://10.0.0.236/trunk@192881 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-23 23:21:27 +00:00
dbaron%dbaron.org
f92b553d1b Use __builtin_frame_address instead of setjmp to get the frame pointer. b=323853 r=brendan
git-svn-id: svn://10.0.0.236/trunk@192599 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-19 01:27:17 +00:00
timeless%mozdev.org
64f8fa0d06 Bug 295159 trace-malloc build crashes in glibc initialization
patch by sascha@schumann.cx r=timeless sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@184552 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-13 22:39:05 +00:00
gandalf%firefox.pl
e4a289d62e Bug 288823: Trace-malloc fails to compile on windows; p=bugzilla@mcsmurf.de,r+sr=dbaron,a=brendan
git-svn-id: svn://10.0.0.236/trunk@174468 18797224-902f-48f8-a5cc-f745e15eee43
2005-06-11 12:52:23 +00:00
dbaron%dbaron.org
da7dc81064 For functions in the binary, output something compatible with addr2line. b=230336 r=brendan
git-svn-id: svn://10.0.0.236/trunk@171358 18797224-902f-48f8-a5cc-f745e15eee43
2005-03-30 01:54:54 +00:00
gerv%gerv.net
8b69962ee3 Bug 236613: change to MPL/LGPL/GPL tri-license.
git-svn-id: svn://10.0.0.236/trunk@155500 18797224-902f-48f8-a5cc-f745e15eee43
2004-04-25 21:07:34 +00:00
cls%seawood.org
3fbe4d6c86 Remove troublesome libiberty dependency by using __cxa_demangle instead of cplus_demangle. (redux)
Bug #232763 r=dbaron sr=brendan


git-svn-id: svn://10.0.0.236/trunk@152657 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-11 07:16:11 +00:00
brendan%mozilla.org
e70349e80d Get my NS_TrackAllocation patch in before cls moves files.
git-svn-id: svn://10.0.0.236/trunk@152644 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-11 04:15:17 +00:00
alecf%flett.org
936cd4dfe8 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


git-svn-id: svn://10.0.0.236/trunk@151250 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-13 16:35:45 +00:00
dbaron%dbaron.org
5230556c2f Remove pc tests in stack walking code that prevent it from working on Fedora Core 1. b=227396 r=bryner
git-svn-id: svn://10.0.0.236/trunk@150851 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-03 19:16:31 +00:00
dbaron%dbaron.org
124929e726 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
git-svn-id: svn://10.0.0.236/trunk@144013 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-21 00:28:05 +00:00
alecf%flett.org
62d9309b9d oops, didn't mean to check that in
git-svn-id: svn://10.0.0.236/trunk@143834 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-18 02:14:15 +00:00
alecf%flett.org
4940983ac2 oops, minor cleanup on the UI to distinguish between callsite and allocation listings for the "top" or "normal" callsites
again, not part of normal build


git-svn-id: svn://10.0.0.236/trunk@143833 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-18 02:13:46 +00:00
alecf%flett.org
13b0423066 ugh, take two - remove PR_ASSERT, tabs, and extra ^M's
git-svn-id: svn://10.0.0.236/trunk@143298 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-04 20:53:57 +00:00
alecf%flett.org
8c9811e251 spacetrace updates (not part of build)
- use arenas for hashtable allocation - reduces spacetrace's mem usage tremendously for large files
- code cleanup & wrapping
- UI cleanup - headers & such
- fix nsTraceMalloc to at least support long stacks, so that we don't barf if we have trouble reading the stacks


git-svn-id: svn://10.0.0.236/trunk@143293 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-04 20:15:10 +00:00
brendan%mozilla.org
e359510677 Fix up comments, overlong lines, NULL in C code, slight code simplification in log_filename (r/sr=blythe/dbaron).
git-svn-id: svn://10.0.0.236/trunk@133734 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-13 04:40:17 +00:00
timeless%mac.com
69ae314807 Bug 106386 rid source of misspellings
r=db48x sr=blake a=asa


git-svn-id: svn://10.0.0.236/trunk@116832 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-19 04:30:17 +00:00
blythe%netscape.com
552180e203 Fix Bug 115189
Trace-Malloc records line number information on platforms which have it.
r=dp sr=alecf


git-svn-id: svn://10.0.0.236/trunk@111713 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-09 19:03:01 +00:00
dp%netscape.com
51a42e0f6f bug 113738 Cost of malloc into trace-malloc log r=blythe, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@110504 18797224-902f-48f8-a5cc-f745e15eee43
2001-12-15 00:24:12 +00:00
blythe%netscape.com
aee7b180fa Fix bug 113958, win32 nsTraceRefcnt support.
r=dbaron, sr=brendan


git-svn-id: svn://10.0.0.236/trunk@110301 18797224-902f-48f8-a5cc-f745e15eee43
2001-12-11 22:26:47 +00:00
blythe%netscape.com
29a382dcb9 Fix bug 114149, trace-malloc output platform specific
r=dp, sr=brendan


git-svn-id: svn://10.0.0.236/trunk@110297 18797224-902f-48f8-a5cc-f745e15eee43
2001-12-11 22:21:50 +00:00
dp%netscape.com
26a73785b5 bug 113833 preventing initalization of trace malloc stuff unless
--trace-malloc command line is given. sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@109983 18797224-902f-48f8-a5cc-f745e15eee43
2001-12-07 06:41:55 +00:00
blythe%netscape.com
00f8bb71ce Bug 112953, non debug trace-malloc on win32.
r=dp,sr=brendan
NOT part of normal build.
Change hinges on another change to nsprpub/gmakefile.win that should land
by those in charge of that module shortly.


git-svn-id: svn://10.0.0.236/trunk@109789 18797224-902f-48f8-a5cc-f745e15eee43
2001-12-06 02:36:02 +00:00
blythe%netscape.com
158afbdc12 Fix bug 112196
win32 symbols now work for trace-malloc
r=dbaron,sr=brendan


git-svn-id: svn://10.0.0.236/trunk@109041 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-27 22:54:05 +00:00
blythe%netscape.com
5b0bd4a484 Fix bug 110807, newlines on win32 trace-malloc tools
sr=brendan,r=dbaron
NOT in normal build


git-svn-id: svn://10.0.0.236/trunk@108916 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-26 21:10:45 +00:00