Bug 988789 - Ionmonkey: rework the instruction cache flushing, fix irregexp support, rs=bustage
authorDouglas Crosher <dtc-moz@scieneer.com>
Sat, 17 May 2014 23:03:48 +1000
changeset 183665 60af9546d564a6323d1a057f8c21f724fcc55633
parent 183664 68947f7d04ec429dbb26730f7299e5b1f5fd24dc
child 183666 020e705e89ba3120ae235fa565b99323d92de570
push id26799
push userphilringnalda@gmail.com
push dateSun, 18 May 2014 00:55:16 +0000
treeherdermozilla-central@00ef3a7d7aa7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs988789
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 988789 - Ionmonkey: rework the instruction cache flushing, fix irregexp support, rs=bustage
js/src/irregexp/NativeRegExpMacroAssembler.cpp
--- a/js/src/irregexp/NativeRegExpMacroAssembler.cpp
+++ b/js/src/irregexp/NativeRegExpMacroAssembler.cpp
@@ -27,16 +27,19 @@
 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "irregexp/NativeRegExpMacroAssembler.h"
 
 #include "irregexp/RegExpStack.h"
 #include "jit/IonLinker.h"
+#ifdef JS_ION_PERF
+# include "jit/PerfSpewer.h"
+#endif
 #include "vm/MatchPairs.h"
 
 using namespace js;
 using namespace js::irregexp;
 using namespace js::jit;
 
 /*
  * This assembler uses the following register assignment convention:
@@ -428,20 +431,25 @@ NativeRegExpMacroAssembler::GenerateCode
         masm.bind(&exit_with_exception_label_);
 
         // Exit with an error result to signal thrown exception.
         masm.mov(ImmWord(RegExpRunStatus_Error), temp0);
         masm.jump(&return_temp0);
     }
 
     Linker linker(masm);
+    AutoFlushICache afc("RegExp");
     JitCode *code = linker.newCode<NoGC>(cx, JSC::REGEXP_CODE);
     if (!code)
         return RegExpCode();
 
+#ifdef JS_ION_PERF
+    writePerfSpewerJitCodeProfile(code, "RegExp");
+#endif
+
     for (size_t i = 0; i < labelPatches.length(); i++) {
         const LabelPatch &v = labelPatches[i];
         JS_ASSERT(!v.label);
         Assembler::patchDataWithValueCheck(CodeLocationLabel(code, v.patchOffset),
                                            ImmPtr(code->raw() + v.labelOffset),
                                            ImmPtr(0));
     }