On Thu, Oct 22, 2015 at 3:45 PM, Ed Ahlsen-Girard <eagir...@cox.net> wrote:
> I have noticed a performance hit since the switch was flipped. Firefox
> stays at the top of top most of the time, and its CPU percentages have
> spiked to 175% if multiple tabs were being opened. dmesg below the sig.

Can you try if the attached patch is an improvement?

Ciao!
David
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/mozilla-firefox/Makefile,v
retrieving revision 1.282
diff -u -p -u -p -r1.282 Makefile
--- Makefile    19 Oct 2015 08:09:23 -0000      1.282
+++ Makefile    22 Oct 2015 07:47:38 -0000
@@ -8,7 +8,7 @@ MOZILLA_VERSION =       41.0.2
 MOZILLA_BRANCH =       release
 MOZILLA_PROJECT =      firefox
 MOZILLA_CODENAME =     browser
-REVISION =             0
+REVISION =             1
 BROKEN-sparc64 =       xpcshell SIGBUS during fake
 EXTRACT_SUFX =         .tar.xz
 
Index: patches/patch-js_src_jit_CodeGenerator_cpp
===================================================================
RCS file: patches/patch-js_src_jit_CodeGenerator_cpp
diff -N patches/patch-js_src_jit_CodeGenerator_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-js_src_jit_CodeGenerator_cpp  22 Oct 2015 07:47:38 -0000
@@ -0,0 +1,37 @@
+$OpenBSD$
+
+There's a call to AutoWritableJitCode into updateBaseAddress, and
+it's called for each cache when creating an IonScript.
+Avoid reprotecting JIT code by moving the copyCacheEntries call
+inside the scope of the AutoWritableJitCode in CodeGenerator::link.
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=1215573
+https://hg.mozilla.org/mozilla-central/rev/75c673cd65ea
+
+--- js/src/jit/CodeGenerator.cpp.orig  Wed Oct 14 23:41:41 2015
++++ js/src/jit/CodeGenerator.cpp       Thu Oct 22 09:25:30 2015
+@@ -8027,6 +8027,11 @@ CodeGenerator::link(JSContext* cx, CompilerConstraintL
+             }
+         }
+ #endif
++        // for generating inline caches during the execution.
++        if (runtimeData_.length())
++            ionScript->copyRuntimeData(&runtimeData_[0]);
++        if (cacheList_.length())
++            ionScript->copyCacheEntries(&cacheList_[0], masm);
+     }
+
+     JitSpew(JitSpew_Codegen, "Created IonScript %p (raw %p)",
+@@ -8044,12 +8049,6 @@ CodeGenerator::link(JSContext* cx, CompilerConstraintL
+     if (PerfEnabled())
+         perfSpewer_.writeProfile(script, code, masm);
+ #endif
+-
+-    // for generating inline caches during the execution.
+-    if (runtimeData_.length())
+-        ionScript->copyRuntimeData(&runtimeData_[0]);
+-    if (cacheList_.length())
+-        ionScript->copyCacheEntries(&cacheList_[0], masm);
+ 
+     // for marking during GC.
+     if (safepointIndices_.length())
Index: patches/patch-js_src_jit_IonCaches_cpp
===================================================================
RCS file: patches/patch-js_src_jit_IonCaches_cpp
diff -N patches/patch-js_src_jit_IonCaches_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-js_src_jit_IonCaches_cpp      22 Oct 2015 07:47:38 -0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+
+There's a call to AutoWritableJitCode into updateBaseAddress, and
+it's called for each cache when creating an IonScript.
+Avoid reprotecting JIT code by moving the copyCacheEntries call
+inside the scope of the AutoWritableJitCode in CodeGenerator::link.
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=1215573
+https://hg.mozilla.org/mozilla-central/rev/75c673cd65ea
+
+--- js/src/jit/IonCaches.cpp.orig      Wed Oct 14 23:41:41 2015
++++ js/src/jit/IonCaches.cpp   Thu Oct 22 09:15:16 2015
+@@ -374,7 +374,6 @@ IonCache::linkAndAttachStub(JSContext* cx, MacroAssemb
+ void
+ IonCache::updateBaseAddress(JitCode* code, MacroAssembler& masm)
+ {
+-    AutoWritableJitCode awjc(code);
+     fallbackLabel_.repoint(code, &masm);
+     initialJump_.repoint(code, &masm);
+     lastJump_.repoint(code, &masm);

Reply via email to