summaryrefslogtreecommitdiffstats
path: root/mozilla-746112.patch
diff options
context:
space:
mode:
Diffstat (limited to 'mozilla-746112.patch')
-rw-r--r--mozilla-746112.patch121
1 files changed, 35 insertions, 86 deletions
diff --git a/mozilla-746112.patch b/mozilla-746112.patch
index 0370f3c..765f993 100644
--- a/mozilla-746112.patch
+++ b/mozilla-746112.patch
@@ -1,86 +1,35 @@
-diff -up mozilla-release/js/src/gc/Heap.h.746112 mozilla-release/js/src/gc/Heap.h
---- mozilla-release/js/src/gc/Heap.h.746112 2012-10-24 16:32:52.000000000 +0200
-+++ mozilla-release/js/src/gc/Heap.h 2012-10-31 12:44:02.400733198 +0100
-@@ -103,26 +103,31 @@ struct Cell
- };
-
- /*
-- * Page size is 4096 by default, except for SPARC, where it is 8192.
-+ * Page size must be static to support our arena pointer optimizations, so we
-+ * are forced to support each platform with non-4096 pages as a special case.
-+ * Note: The freelist supports a maximum arena shift of 15.
- * Note: Do not use JS_CPU_SPARC here, this header is used outside JS.
- * Bug 692267: Move page size definition to gc/Memory.h and include it
- * directly once jsgc.h is no longer an installed header.
- */
- #if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9))
- const size_t PageShift = 13;
-+const size_t ArenaShift = PageShift;
-+#elif defined(__powerpc__)
-+const size_t PageShift = 16;
-+const size_t ArenaShift = 12;
- #else
- const size_t PageShift = 12;
-+const size_t ArenaShift = PageShift;
- #endif
- const size_t PageSize = size_t(1) << PageShift;
-+const size_t ArenaSize = size_t(1) << ArenaShift;
-+const size_t ArenaMask = ArenaSize - 1;
-
- const size_t ChunkShift = 20;
- const size_t ChunkSize = size_t(1) << ChunkShift;
- const size_t ChunkMask = ChunkSize - 1;
-
--const size_t ArenaShift = PageShift;
--const size_t ArenaSize = PageSize;
--const size_t ArenaMask = ArenaSize - 1;
--
- /*
- * This is the maximum number of arenas we allow in the FreeCommitted state
- * before we trigger a GC_SHRINK to release free arenas to the OS.
-diff -up mozilla-release/js/src/jsgc.cpp.746112 mozilla-release/js/src/jsgc.cpp
---- mozilla-release/js/src/jsgc.cpp.746112 2012-10-24 16:32:54.000000000 +0200
-+++ mozilla-release/js/src/jsgc.cpp 2012-10-31 12:42:50.681735540 +0100
-@@ -194,6 +194,13 @@ const uint32_t Arena::FirstThingOffsets[
-
- #undef OFFSET
-
-+/* Unused memory decommiting requires the arena size match the page size. */
-+static bool
-+DecommitEnabled()
-+{
-+ return PageSize == ArenaSize;
-+}
-+
- #ifdef DEBUG
- void
- ArenaHeader::checkSynchronizedWithFreeList() const
-@@ -677,7 +684,8 @@ Chunk::fetchNextDecommittedArena()
- decommittedArenas.unset(offset);
-
- Arena *arena = &arenas[offset];
-- MarkPagesInUse(arena, ArenaSize);
-+ if (DecommitEnabled())
-+ MarkPagesInUse(arena, ArenaSize);
- arena->aheader.setAsNotAllocated();
-
- return &arena->aheader;
-@@ -2634,7 +2642,7 @@ DecommitArenasFromAvailableList(JSRuntim
- chunk->removeFromAvailableList();
-
- size_t arenaIndex = Chunk::arenaIndex(aheader->arenaAddress());
-- bool ok;
-+ bool ok = true;
- {
- /*
- * If the main thread waits for the decommit to finish, skip
-@@ -2644,7 +2652,8 @@ DecommitArenasFromAvailableList(JSRuntim
- Maybe<AutoUnlockGC> maybeUnlock;
- if (!rt->isHeapBusy())
- maybeUnlock.construct(rt);
-- ok = MarkPagesUnused(aheader->getArena(), ArenaSize);
-+ if (DecommitEnabled())
-+ ok = MarkPagesUnused(aheader->getArena(), ArenaSize);
- }
-
- if (ok) {
+Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h
+===================================================================
+--- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrInterpreter.h
++++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h
+@@ -167,7 +167,7 @@ struct ByteTerm {
+ inputPosition = inputPos;
+ }
+
+- ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos)
++ ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) __attribute__((noinline))
+ : type(type)
+ , m_capture(capture)
+ , m_invert(false)
+@@ -188,7 +188,7 @@ struct ByteTerm {
+ atom.quantityCount = 1;
+ }
+
+- ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos)
++ ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) __attribute__((noinline))
+ : type(type)
+ , m_capture(capture)
+ , m_invert(invert)
+Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h
+===================================================================
+--- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrPattern.h
++++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h
+@@ -171,7 +171,7 @@ struct PatternTerm {
+ quantityCount = 1;
+ }
+
+- PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false)
++ PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) __attribute__((noinline))
+ : type(type)
+ , m_capture(capture)
+ , m_invert(invert)