Commit Graph

69 Commits

Author SHA1 Message Date
Terrence Cole
8c91faa124 Backed out changeset a43eb4a2d2fd 2012-04-10 17:03:25 -07:00
Terrence Cole
23e2dd5dc5 Bug 744192 - Assert that Vectors do not contain implicitly postbarriered types; r=luke
Since vectors move their memory around outside the control of the GC, it is not
valid to store an implicitly post-barriered item in a Vector.
2012-04-10 16:43:54 -07:00
Terrence Cole
dfd9f312e5 Bug 744052 - Restructure HashTable::checkOverflow for easier reading; r=luke
When I added this function, I just copied the existing logical structure.  It
makes more sense here to check overflowed and return early, since we can do this
now.
2012-04-10 09:51:48 -07:00
Terrence Cole
9a178239bc Bug 743885 - Fix OOM handling regression in HashTable; r=luke
Introduced by me in bug 722946.
2012-04-09 19:07:11 -07:00
Daniel Holbert
5d8052de2c Bug 742438: Fix straggling bool-vs-NULL comparison after HashSet::put return-type change. r=terrence 2012-04-04 11:18:18 -07:00
Terrence Cole
9eae5154cd Bug 740153 - Don't expose Entry directly through HashMap; r=luke
HashMap and HashSet only expose Entries through Ptr and Range, except for one
variant of put. They also don't expose the default size they use if you call
init() without an argument. These weirdnesses seem to be interface carried over
from the old jsdhash.

The first oddness is unused and can be removed, the second should simply get
exposed to make it easier to wrap HashMap and HashSet.

--HG--
extra : rebase_source : e1432a9af189229f379158ba0529956ddbf5f234
2012-03-30 11:01:58 -07:00
Terrence Cole
0d9d3bda35 Bug 722946 - Add method to HashTable::Enum for inline rekeying; r=luke
It is possible in several places to have unconstrained client objects as the key
of a HashMap/HashSet. For generational and compacting GC, we will need to move
these objects in memory. This means we will need to remove and re-insert these
keys in a new location, during GC. Because we cannot safely allocate memory for
this, we need a specialized algorithm inside the HashTable itself.
2012-03-14 13:48:59 -07:00
Ehsan Akhgari
83186bf501 Backout changeset ea6be5f60c42 (bug 722946) for breaking Windows builds 2012-03-14 14:29:58 -04:00
Terrence Cole
f8733065ed Bug 722946 - Add method to HashTable for inline rekeying/removal; r=luke
It is possible in several places to have unconstrained client objects as the key
of a HashMap/HashSet.  For generational and compacting GC, we will need to move
these objects in memory.  This means we will need to remove and re-insert these
keys in a new location, during GC.  Because we cannot safely allocate memory
for this, we need a specialized algorithm inside the HashTable itself.
2012-02-03 15:43:34 -08:00
Christian Holler
1c16cd9f04 Bug 733493 - Improve JS shell OOM testing code, now with 100% less bustage. r=jorendorff 2012-03-10 15:53:03 -05:00
Gary Kwong
38ac40f69f Backed out changeset 6169d8aa7a9d, a=tbplFire 2012-03-10 12:12:54 -08:00
Christian Holler
4cec72af96 Bug 733493 - Improve JS shell OOM testing code, r=jorendorff 2012-03-10 11:50:26 -08:00
Igor Bukanov
f0bddf0e88 bug 728250 - remove JSPrincipals::codebase. r=:luke,:bz
In just 2 cases where JSPrincipals::codebase is used it can be reconstructed from the values stored in the associated nsJSPrincipal. In addition the patch makes nsJSprincipals to inherit both from nsIPrincipal and JSPrincipals allowing to use static_cast to convert between nsIPrincipal and JSPrincipals pointers and to drop many cases of manual JSPrincipal reference counting.
2012-03-09 10:48:50 +01:00
Jason Orendorff
bb1b25e0ad Add static assertions as requested in bug 726298 comment 2 and 4.
--HG--
extra : rebase_source : 3edf2446076dae08c16b121de18505174c84f370
2012-03-01 12:48:47 -06:00
Jason Orendorff
d52fe19668 Fix hilarious bug in js_malloc: it fails once every 2^32 allocations in DEBUG builds. Bug 730270, r=luke. 2012-03-01 09:01:45 -06:00
Justin Lebar
62dbeeb1ab Bug 731789 - Rename mfbt/StdInt.h to mfbt/StandardInteger.h, so stdint types work from cpp files inside mfbt. r=waldo 2012-02-29 22:56:43 -05:00
David Mandelin
d385e9a7d7 Bug 731492: Remove obsolete typedef JSPackedBool, r=luke
--HG--
extra : rebase_source : 95423985f55547755a988ba19629678997bfa553
2012-02-28 19:03:57 -08:00
Igor Bukanov
d93ff2cec2 Bug 731618 - remove JSContext * parameter from heap iteration API. r=:Billm 2012-02-29 21:23:53 +01:00
Nicholas Nethercote
afab5f33f9 Bug 729403 (part 2, take 2) - Add js/runtime/gc-marker memory reporter. r=wmccloskey.
--HG--
extra : rebase_source : c48aacddd186be0de3c74153f5e5e4049d09a87b
2012-02-26 20:20:15 -08:00
Nicholas Nethercote
f66bf6865a Bug 729403 (part 1, take 2) - Add Vector::sizeOf{In,Ex}cludingThis(). r=luke.
--HG--
extra : rebase_source : d745c1b1b9ca30c6836c31b03ded4dcab22a2565
2012-02-26 20:18:13 -08:00
Phil Ringnalda
93fdd4cb81 Back out a7255af10a2a and da193f5b526b (bug 729403) for xpcshell assertions in test_TelemetryPing.js 2012-02-26 18:39:06 -08:00
Nicholas Nethercote
252040f7c7 Bug 729403 (part 2) - Add js/runtime/gc-marker memory reporter. r=wmccloskey.
--HG--
extra : rebase_source : 9f078515b971e3de4156bb3edd3f8aea74c9fa8f
2012-02-21 21:43:45 -08:00
Nicholas Nethercote
08c4146a69 Bug 729403 (part 1) - Add Vector::sizeOf{In,Ex}cludingThis(). r=luke.
--HG--
extra : rebase_source : 850abf71178c5a23198561560d00ecd970db0cc1
2012-02-21 20:58:40 -08:00
Nicholas Nethercote
26f5d80631 Bug 722595 - Add memory reporters for misc things hanging off JS objects. r=bhackett.
--HG--
extra : rebase_source : 211b35134923f4cb99625bb240b96e81f0f28b4b
2012-01-30 18:12:03 -08:00
Nicholas Nethercote
f8d13343dd Bug 721628 (part 5) - Use size_t instead of int64_t in some JS memory reporting structs. r=luke.
--HG--
extra : rebase_source : c3e13b8042b8914ae16cee38b0299f6164ba9222
2012-01-29 14:13:18 -08:00
Nicholas Nethercote
a95d674a91 Bug 721628 (part 4) - Use better names for various JS memory reporting things. r=Ms2ger.
--HG--
extra : rebase_source : 4edc916c571906329075b6be68c245267f9b61d0
2012-01-29 14:11:32 -08:00
Nicholas Nethercote
cdf1a57711 Bug 721628 (part 3) - Rename several size type-inference-related measurement functions and types. r=bhackett.
--HG--
extra : rebase_source : e66bc2d787c31de93ff80280597543cf47924967
2012-01-26 19:09:31 -08:00
Nicholas Nethercote
dd32d38d63 Bug 715453 - Remove computedSize from nsMallocSizeOfFun. r=jlebar,bhackett.
--HG--
extra : rebase_source : a65039a407daab45360a5b375b53cbf1bc05b7f6
2012-01-25 00:52:51 -08:00
Nicholas Nethercote
f9f7183ee8 Bug 720219 (part 5) - Clean up JS type object measurement. r=bhackett.
--HG--
extra : rebase_source : 4d972fd2dd17181bf6facd077e71b05c6cc72307
2012-01-23 15:50:59 -08:00
Nicholas Nethercote
cfcdfc66fe Bug 720219 (part 1) - Clean up JS object measurement. r=bhackett.
--HG--
extra : rebase_source : ff9aa7da84814e6868fef88b56bcb038389d5fb9
2012-01-23 15:35:37 -08:00
Luke Wagner
73a1588f02 Bug 675078 - rm JSThreadData and JSThread (JSRuntime is now officially single-threaded) (r=igor,rs=mccr8)
--HG--
extra : rebase_source : f6d2c2c6083f4589691ede571159bfd7e7ef8701
2011-07-18 14:54:48 -07:00
Bill McCloskey
6ee3ac4d49 Bug 720853 - Add read barrier for atom table (r=luke) 2012-01-24 18:32:56 -08:00
Matt Brubeck
0978981988 Back out 79deba022227 (bug 675078) because of Win debug mochitest-other failures 2012-01-24 17:32:30 -08:00
Luke Wagner
0d7b41f9b5 Bug 675078 - rm JSThreadData and JSThread (JSRuntime is now officially single-threaded) (r=igor) 2011-07-18 14:54:48 -07:00
Jason Orendorff
e646683875 Bug 717278 - Vector should have const and non-const begin(). r=luke. 2012-01-20 06:11:42 -06:00
Brian Hackett
105cdf7a2a Fix non-threadsafe builds, no bug. r=jorendorff 2012-01-11 08:21:26 -08:00
Ms2ger
ba150c988a Bug 714264 - Part c: Move IterateData / CollectCompartmentStatsForRuntime / GetExplicitNonHeapForRuntime to js/MemoryMetrics.h; r=njn
This patch also removes those APIs exposed in js/MemoryMetrics.h that aren't
used anymore.
2012-01-11 09:23:08 +01:00
Ms2ger
4c9257d038 Bug 714264 - Part b: Move CompartmentStats to MemoryMetrics.h; r=njn
The name member is implemented as a void*, because it needs to remain an
nsCString, and as such the logic to get the name also remains in XPConnect.
2012-01-11 09:23:08 +01:00
Marco Bonardo
6d541babbe Merge last green PGO from mozilla-inbound to mozilla-central 2012-01-03 12:36:26 +01:00
Ms2ger
c06f7f2913 Bug 714580 - Remove extra parens from JS_ASSERT_IF; r=Waldo 2012-01-02 21:55:34 +01:00
Brian Hackett
95d4e2f5d9 Backed out changeset 4282a285d381 (bug 707049 backout). 2011-12-31 07:32:04 -07:00
Ms2ger
a0619211ee Backout 0d642e4e08cf (bug 707049); requested by evilpie. 2011-12-31 15:13:01 +01:00
Brian Hackett
157daeeaa6 Add dynamic analysis for identifying moving GC hazards, autorooter classes, some VM rooters, bug 707049. r=billm 2011-12-30 20:12:45 -07:00
Jeff Walden
a6c3bde2ab Bug 714264 - Move declarations around such that it's possible to include jsprvtd.h before Vector.h or HashTable.h. r=luke
--HG--
extra : rebase_source : e981944be5edf5c772df986d0898494b9bc53a3e
2012-01-02 16:34:25 -06:00
Jeff Walden
6f39713d32 Use < rather than != when comparing a bunch of pointers to sentinel end-pointer values, as a small hedge against things going awry and skipping past the sentinel. No bug, r=firebot
--HG--
extra : rebase_source : 567f70397ec9ef006c55c01f3acde305ab527b56
2011-12-29 15:50:33 -06:00
Hub Figuière
6801abcb82 Bug 714169 - Fix warning in HashTable.h by using |continue;| instead of |;|. r=jwalden
--HG--
extra : rebase_source : 176f652ee0e2c23b2c995b51814e4e1fd1ae0149
2011-12-29 13:37:04 -08:00
Ms2ger
d261b42142 Bug 692277 - Part a: Introduce an unstable public API for JS memory measurements to be used in XPCJSRuntime; r=njn sr=dmandelin 2011-12-24 09:27:39 +01:00
Luke Wagner
e6d7fc7950 Bug Bug 692274, part 4 - Rewrite parsing, emitting and decompiling of let to fix scoping properly (r=jorendorff) 2011-10-07 12:02:50 -07:00
Jeff Walden
6fc5b5e274 Bug 712129 - Implement MOZ_STATIC_ASSERT and MOZ_STATIC_ASSERT_IF. r=luke 2011-12-19 16:58:30 -05:00
Jeff Walden
68b1495a0b Bug 712129 - Add more assertion macro flavors to mfbt, and make the JS engine use mfbt's implementations where appropriate. r=cjones
--HG--
extra : rebase_source : 6b94db05e74b18a3938a28cbc0f520eb4e01fbb0
2011-12-19 15:54:12 -05:00