Eric Rahm
cf65aeb92a
Bug 1322735 - Remove MOZ_STACKWALKING define. r=glandium
...
With frame pointer omission disabled we should always have usable stacks on Windows. This allows us to remove the MOZ_STACKWALKING define as it will always be enabled.
MozReview-Commit-ID: 54xs3Hf1r4P
2016-12-20 15:11:36 -08:00
Phil Ringnalda
d24ca1e4dc
Backed out 3 changesets (bug 1322735) for ASan leaks and xpcshell/selftest.py failures
...
CLOSED TREE
Backed out changeset 01cfc71ce542 (bug 1322735)
Backed out changeset 84c729c41230 (bug 1322735)
Backed out changeset b419aaefae95 (bug 1322735)
2017-01-10 20:17:34 -08:00
Eric Rahm
60ffec900a
Bug 1322735 - Remove MOZ_STACKWALKING define. r=glandium
...
With frame pointer omission disabled we should always have usable stacks on Windows. This allows us to remove the MOZ_STACKWALKING define as it will always be enabled.
MozReview-Commit-ID: 54xs3Hf1r4P
2016-12-20 15:11:36 -08:00
Joel Maher
9a9c1e6704
Bug 1324024 - unable to see fprintf on assertion due to stdout vs stderr. r=ted
...
MozReview-Commit-ID: EswlrLCWps4
2016-12-19 11:31:01 -05:00
Andrew McCreight
bc7b235b3a
Bug 1316527 - Return 0 when GetSerialNumber fails to find an existing serial number. r=froydnj
...
NS_LogCOMPtrAddRef and NS_LogCOMPtrRelease always pass false to
GetSerialNumber, because they pass in everything they get without
regard to whether it is being logged or not, so they don't want to
create a serial number if none exists. This causes the assertions
added in bug 1309051 to be hit. To work around this, I hoist the
assertion into the other callers of this method. Two of them already
had this check, but it was non-fatal.
This also makes the asserts not happen in release builds, as I decided
it doesn't really matter what happens if somebody tries to use it
there.
2016-11-16 12:38:54 -08:00
Andrew McCreight
62cc46f834
Bug 1309051 - Ensure GetSerialNumber is consistent with aCreate. r=froydnj
...
MozReview-Commit-ID: 92N6vcV2NhP
2016-10-10 15:57:03 -07:00
Andrew McCreight
12806f0eec
Bug 1308995, part 5 - Use early return in NS_LogCtor/Dtor. r=froydnj
...
This is an unrelated change to fix an issue that was bothering me.
MozReview-Commit-ID: Cxw9WhHfSAf
2016-10-10 13:34:53 -07:00
Andrew McCreight
a3065caf6d
Bug 1308995, part 4 - Rename mAllStats to mStats. r=froydnj
...
There's only one stats field now.
MozReview-Commit-ID: 9XZLQNrhrIU
2016-10-10 13:24:05 -07:00
Andrew McCreight
77c1593407
Bug 1308995, part 3 - Get rid of mNewStats. r=froydnj
...
Nobody asks for the new stats, only the total ones, so there's no need
for two sets of statistics.
MozReview-Commit-ID: AO0ue9MPn3N
2016-10-10 13:22:37 -07:00
Andrew McCreight
0b4e27e173
Bug 1308995, part 2 - Remove nsTraceRefcnt::StatisticsType arguments. r=froydnj
...
Only about:bloat used NEW_STATS, so act like we have ALL_STATS
everywhere. A later patch will remove the mNewStats field.
MozReview-Commit-ID: LUJBpS3iYht
2016-10-10 10:56:09 -07:00
Andrew McCreight
dd533a0e4d
Bug 1308995, part 1 - Remove unused DumpStatistics::aOut argument. r=froydnj
...
Only about:bloat used this argument.
MozReview-Commit-ID: HXIUPVwl5ID
2016-10-10 10:53:08 -07:00
Andrew McCreight
f19a90f779
Bug 1308652, part 2 - Only allow nsTraceRefcnt::DumpStatistics to be called once. r=froydnj
...
DumpStatistics does not track any objects that are created or
destroyed while it is running, which means that any subsequent calls
to it will produce incorrect results. This can lead to incorrect
positive or negative leaks being reported. See 1271182.
Now that about:bloat has been removed, DumpStatistics should only be
called once, during shutdown.
MozReview-Commit-ID: IjMkExeBRBr
2016-10-10 11:55:15 -07:00
Andrew McCreight
91425cfe94
Bug 1289215 - Mismatched sizes assertion in nsTraceRefcnt.cpp should be fatal. r=froydnj
2016-07-27 10:11:40 -07:00
Andrew McCreight
bf4fade0a5
Bug 1284599, part 2 - Add some more comments for #endif. r=froydnj
...
This doesn't add comments for all of them, just some of those spread
out over many lines. The lack of these comments made writing part 1
more annoying.
2016-07-05 12:03:18 -07:00
Andrew McCreight
16dd3428e4
Bug 1284599, part 1 - Get rid of NS_IMPL_REFCNT_LOGGING. r=froydnj
...
This is unconditionally true, going back to maybe the removal of #ifdef WINCE code.
2016-07-05 12:03:18 -07:00
Nathan Froyd
6abed02e04
Bug 1281257 - part 2 - make WalkTheStackCached an internal implementation detail; r=erahm
...
Nothing needs to call this outside nsTraceRefcnt, and given the
potential memory concerns, keeping it private is a better idea anyway.
2016-06-23 17:21:27 -04:00
Nathan Froyd
0dc7b6ac18
Bug 1281257 - part 1 - remove nsTraceRefcnt::DemangleSymbol; r=erahm
...
This function is unused, and the symbol demangling should all be handled
someplace else.
2016-06-23 17:21:27 -04:00
Vladimir Vukicevic
6802eaebc7
Bug 1221160 - fix AutoTraceLogLock deadlock on Windows; r=froydnj
...
From e3a1e57c0c8be8214a12e31c6e4950a676efd9bc Mon Sep 17 00:00:00 2001
MozReview-Commit-ID: JrPiE7eixpy
2015-11-03 15:13:09 -05:00
Nathan Froyd
94ffbb34fe
Bug 1251895 - don't race on nsTraceRefcnt's object serial number tables; r=mccr8
...
GetSerialNumber accesses global state through gSerialNumbers. We call
GetSerialNumber under a lock when doing normal object refcount logging.
However, we call GetSerialNumber outside of a lock when we're tracing
individual classes for nsCOMPtr refcount logging, even if we don't
actually care about nsCOMPtr refcount logging. We should call it under
a lock always.
2016-02-29 15:04:36 -05:00
Andrew McCreight
4fbf86290f
Bug 1245673 - Remove useless NS_INT32_TO_PTR from DumpSerialNumbers. r=froydnj
2016-02-10 10:29:20 -08:00
Andrew McCreight
22d3703bbf
Bug 1243949 - Fatally assert when we fail to create an XPCOM log. r=froydnj
2016-02-10 10:29:20 -08:00
Ehsan Akhgari
282cebd5d6
Bug 1196430 follow-up: Hide the usage of gCodeAddressService behind #ifdef MOZ_STACKWALKING
...
This is needed to fix the build bustage on B2G Desktop Windows.
Landed on a CLOSED TREE
2015-09-11 00:06:40 -04:00
Nathan Froyd
9e5ec5630b
Bug 1196430 - part 8 - use less reinterpret_cast in nsTraceRefcnt.cpp; r=mccr8
2015-08-26 22:57:32 -04:00
Nathan Froyd
b92b9e475c
Bug 1196430 - part 5 - dump allocation stacks for leaked objects in XPCOM_MEM_LOG_CLASSES; r=mccr8
2015-08-26 19:10:22 -04:00
Nathan Froyd
2a67ff0e21
Bug 1196430 - part 4 - record allocation stacks for classes in XPCOM_MEM_LOG_CLASSES; r=mccr8
2015-08-26 18:47:03 -04:00
Nathan Froyd
f738ba1dfb
Bug 1196430 - part 3 - remove unnecessary nsString.h include from nsTraceRefcnt.cpp; r=mccr8
2015-08-26 18:28:35 -04:00
Nathan Froyd
b8ad2a4984
Bug 1196430 - part 2 - give SerialNumberRecord a proper constructor; r=mccr8
...
Using C++ style is so much nicer for these sorts of things. This change
also paves the way for easily using non-POD things in SerialNumberRecord.
2015-08-26 18:25:35 -04:00
Nathan Froyd
ed0266927b
Bug 1196430 - part 1 - rename serialNumberRecord to SerialNumberRecord; r=mccr8
...
This is a small cleanup to make the class name conform to coding standards.
2015-08-26 18:24:13 -04:00
Andrew McCreight
4c36df2ab7
Bug 1190483 - Followup to address review comment.
2015-08-14 10:04:41 -07:00
Andrew McCreight
eeeda54b49
Bug 1190483 - Add a way to record a DMD log late in shutdown. r=erahm
2015-08-14 10:00:04 -07:00
Juan Gomez
89035d527e
Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj
2015-07-03 18:29:00 -07:00
Nathan Froyd
8e7df9d000
Bug 1174344 - make error message for mismatched leak log entries more helpful; r=mccr8
2015-06-29 16:36:32 -04:00
Ryan VanderMeulen
7aba9d7002
Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage.
2015-06-25 19:48:42 -04:00
Juan Gomez
7323e89a40
Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj
2015-06-24 14:11:00 -04:00
Benoit Girard
ef41ed062b
Bug 1172216 - Move nsStackwalk to mozglue. r=glandium
2015-06-10 16:32:45 -04:00
Eric Rahm
5b59cf4e0b
Bug 1165515 - Part 1: Convert PR_LOG to MOZ_LOG. r=froydnj
2015-05-21 13:22:04 -07:00
Andrew McCreight
ec2822bfba
Bug 1157304 - Make the empty classname assertion in BloatEntry fatal. r=froydnj
2015-04-27 10:28:19 -04:00
Andrew McCreight
f4063bda0c
Bug 1116550 - Part 2: Print out negative values for leaks when there are more dtors than ctors. r=froydnj
2015-04-22 17:20:00 -04:00
Andrew McCreight
caabab45da
Bug 1116550 - Part 1: Turn HaveLeaks and Clear into methods. r=froydnj
2015-04-22 17:18:00 -04:00
Andrew McCreight
5f859d9d8c
Bug 1156982 - Add separators to BloatView output. r=froydnj
...
This will ensure we properly parse class names containing spaces.
Note that if a class name somehow ends up containing operator| then this will end up again silently failing.
2015-04-22 11:06:50 -07:00
Andrew McCreight
98da2f9bf6
Bug 1156977 - Assert when aClassName is empty in BloatEntry. r=froydnj
2015-04-22 08:56:30 -07:00
Ehsan Akhgari
ea41d8de48
Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
...
This patch was automatically generated using the following script:
function convert() {
echo "Converting $1 to $2..."
find . \
! -wholename "*/.git*" \
! -wholename "obj-ff-dbg*" \
-type f \
\( -iname "*.cpp" \
-o -iname "*.h" \
-o -iname "*.c" \
-o -iname "*.cc" \
-o -iname "*.idl" \
-o -iname "*.ipdl" \
-o -iname "*.ipdlh" \
-o -iname "*.mm" \) | \
xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}
convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Markus Stange
65e4126b14
Bug 1137963 - Use a spin lock for TraceRefCnt. r=waldo, r=froydnj
2015-03-17 00:18:25 -04:00
Andrew McCreight
f338b8b483
Bug 1138616, part 3 - Add a faster bloatlog-only mode. r=dbaron
2015-03-04 16:13:54 -08:00
Andrew McCreight
8aaa6e1f90
Bug 1138616, part 2 - Inline BloatEntry::AddRef and ::Release. r=dbaron
2015-03-04 16:13:54 -08:00
Andrew McCreight
8c7eb3e4ca
Bug 1138616, part 1 - Remove nsTraceRefcntStats::mAddRefs and ::mReleases. r=dbaron
2015-03-04 16:13:54 -08:00
Andrew McCreight
0ddd7242a6
Bug 1073594, part 4 - Remove nsTraceRefcntStats::mObjsOutstanding{Total, Squared}. r=dbaron
...
They are now unused.
2015-03-04 14:07:59 -08:00
Andrew McCreight
7704551617
Bug 1073594, part 3 - Remove the mean and stddev for BloatLog object counts. r=dbaron
2015-03-04 14:07:59 -08:00
Andrew McCreight
2d910988a4
Bug 1073594, part 2 - Remove nsTraceRefcntStats::mRefsOutstanding{Total, Squared}. r=dbaron
...
They are now unused.
2015-03-04 14:07:59 -08:00
Andrew McCreight
9dd6cc7592
Bug 1073594, part 1 - Remove mean and stddev for BloatView addrefs and releases. r=dbaron
2015-03-04 14:07:59 -08:00