<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[169092] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/169092">169092</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2014-05-19 18:53:56 -0700 (Mon, 19 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Take care of some ARM64 test failures
https://bugs.webkit.org/show_bug.cgi?id=133090

Reviewed by Geoffrey Garen.

PerformanceTests/SunSpider: 

* profiler-test.yaml: Skip these on not-x86.

Source/JavaScriptCore: 
        
Constant blinding on ARM64 cannot use the scratch register.

* assembler/MacroAssembler.h:
(JSC::MacroAssembler::convertInt32ToDouble):
(JSC::MacroAssembler::branchPtr):
(JSC::MacroAssembler::storePtr):
(JSC::MacroAssembler::store64):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::scratchRegisterForBlinding):

Tools: 

* Scripts/run-jsc-stress-tests: Make it easier to conditionally skip things.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkPerformanceTestsSunSpiderChangeLog">trunk/PerformanceTests/SunSpider/ChangeLog</a></li>
<li><a href="#trunkPerformanceTestsSunSpiderprofilertestyaml">trunk/PerformanceTests/SunSpider/profiler-test.yaml</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreassemblerMacroAssemblerh">trunk/Source/JavaScriptCore/assembler/MacroAssembler.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreassemblerMacroAssemblerARM64h">trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptsrunjscstresstests">trunk/Tools/Scripts/run-jsc-stress-tests</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkPerformanceTestsSunSpiderChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/SunSpider/ChangeLog (169091 => 169092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/SunSpider/ChangeLog        2014-05-20 01:09:37 UTC (rev 169091)
+++ trunk/PerformanceTests/SunSpider/ChangeLog        2014-05-20 01:53:56 UTC (rev 169092)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2014-05-19  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        Take care of some ARM64 test failures
+        https://bugs.webkit.org/show_bug.cgi?id=133090
+
+        Reviewed by Geoffrey Garen.
+
+        * profiler-test.yaml: Skip these on not-x86.
+
</ins><span class="cx"> 2014-03-14  Maciej Stachowiak  &lt;mjs@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Replace &quot;Apple Computer, Inc.&quot; with &quot;Apple Inc.&quot; in copyright headers
</span></span></pre></div>
<a id="trunkPerformanceTestsSunSpiderprofilertestyaml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/SunSpider/profiler-test.yaml (169091 => 169092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/SunSpider/profiler-test.yaml        2014-05-20 01:09:37 UTC (rev 169091)
+++ trunk/PerformanceTests/SunSpider/profiler-test.yaml        2014-05-20 01:53:56 UTC (rev 169092)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-# Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+# Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> #
</span><span class="cx"> # Redistribution and use in source and binary forms, with or without
</span><span class="cx"> # modification, are permitted provided that the following conditions
</span><span class="lines">@@ -25,4 +25,9 @@
</span><span class="cx"> # with the runProfiler command.
</span><span class="cx"> 
</span><span class="cx"> - path: tests/sunspider-1.0
</span><del>-  cmd: runProfiler
</del><ins>+  cmd: |
+      if $architecture =~ /x86/
+          runProfiler
+      else
+          skip
+      end
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (169091 => 169092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-05-20 01:09:37 UTC (rev 169091)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-05-20 01:53:56 UTC (rev 169092)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2014-05-19  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        Take care of some ARM64 test failures
+        https://bugs.webkit.org/show_bug.cgi?id=133090
+
+        Reviewed by Geoffrey Garen.
+        
+        Constant blinding on ARM64 cannot use the scratch register.
+
+        * assembler/MacroAssembler.h:
+        (JSC::MacroAssembler::convertInt32ToDouble):
+        (JSC::MacroAssembler::branchPtr):
+        (JSC::MacroAssembler::storePtr):
+        (JSC::MacroAssembler::store64):
+        * assembler/MacroAssemblerARM64.h:
+        (JSC::MacroAssemblerARM64::scratchRegisterForBlinding):
+
</ins><span class="cx"> 2014-05-19  Tanay C  &lt;tanay.c@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Removing some check-webkit-style warnings from ./dfg
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreassemblerMacroAssemblerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/assembler/MacroAssembler.h (169091 => 169092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/assembler/MacroAssembler.h        2014-05-20 01:09:37 UTC (rev 169091)
+++ trunk/Source/JavaScriptCore/assembler/MacroAssembler.h        2014-05-20 01:53:56 UTC (rev 169092)
</span><span class="lines">@@ -1140,7 +1140,7 @@
</span><span class="cx"> 
</span><span class="cx">     void convertInt32ToDouble(Imm32 imm, FPRegisterID dest)
</span><span class="cx">     {
</span><del>-        if (shouldBlind(imm)) {
</del><ins>+        if (shouldBlind(imm) &amp;&amp; haveScratchRegisterForBlinding()) {
</ins><span class="cx">             RegisterID scratchRegister = scratchRegisterForBlinding();
</span><span class="cx">             loadXorBlindedConstant(xorBlindConstant(imm), scratchRegister);
</span><span class="cx">             convertInt32ToDouble(scratchRegister, dest);
</span><span class="lines">@@ -1176,7 +1176,7 @@
</span><span class="cx"> 
</span><span class="cx">     Jump branchPtr(RelationalCondition cond, RegisterID left, ImmPtr right)
</span><span class="cx">     {
</span><del>-        if (shouldBlind(right)) {
</del><ins>+        if (shouldBlind(right) &amp;&amp; haveScratchRegisterForBlinding()) {
</ins><span class="cx">             RegisterID scratchRegister = scratchRegisterForBlinding();
</span><span class="cx">             loadRotationBlindedConstant(rotationBlindConstant(right), scratchRegister);
</span><span class="cx">             return branchPtr(cond, left, scratchRegister);
</span><span class="lines">@@ -1186,7 +1186,7 @@
</span><span class="cx">     
</span><span class="cx">     void storePtr(ImmPtr imm, Address dest)
</span><span class="cx">     {
</span><del>-        if (shouldBlind(imm)) {
</del><ins>+        if (shouldBlind(imm) &amp;&amp; haveScratchRegisterForBlinding()) {
</ins><span class="cx">             RegisterID scratchRegister = scratchRegisterForBlinding();
</span><span class="cx">             loadRotationBlindedConstant(rotationBlindConstant(imm), scratchRegister);
</span><span class="cx">             storePtr(scratchRegister, dest);
</span><span class="lines">@@ -1196,7 +1196,7 @@
</span><span class="cx"> 
</span><span class="cx">     void store64(Imm64 imm, Address dest)
</span><span class="cx">     {
</span><del>-        if (shouldBlind(imm)) {
</del><ins>+        if (shouldBlind(imm) &amp;&amp; haveScratchRegisterForBlinding()) {
</ins><span class="cx">             RegisterID scratchRegister = scratchRegisterForBlinding();
</span><span class="cx">             loadRotationBlindedConstant(rotationBlindConstant(imm), scratchRegister);
</span><span class="cx">             store64(scratchRegister, dest);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreassemblerMacroAssemblerARM64h"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64.h (169091 => 169092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64.h        2014-05-20 01:09:37 UTC (rev 169091)
+++ trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64.h        2014-05-20 01:53:56 UTC (rev 169092)
</span><span class="lines">@@ -2408,7 +2408,12 @@
</span><span class="cx">         return ARM64Assembler::maxJumpReplacementSize();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RegisterID scratchRegisterForBlinding() { return getCachedDataTempRegisterIDAndInvalidate(); }
</del><ins>+    RegisterID scratchRegisterForBlinding()
+    {
+        // We *do not* have a scratch register for blinding.
+        RELEASE_ASSERT_NOT_REACHED();
+        return getCachedDataTempRegisterIDAndInvalidate();
+    }
</ins><span class="cx"> 
</span><span class="cx">     static bool canJumpReplacePatchableBranchPtrWithPatch() { return false; }
</span><span class="cx">     static bool canJumpReplacePatchableBranch32WithPatch() { return false; }
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (169091 => 169092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-05-20 01:09:37 UTC (rev 169091)
+++ trunk/Tools/ChangeLog        2014-05-20 01:53:56 UTC (rev 169092)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2014-05-19  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        Take care of some ARM64 test failures
+        https://bugs.webkit.org/show_bug.cgi?id=133090
+
+        Reviewed by Geoffrey Garen.
+
+        * Scripts/run-jsc-stress-tests: Make it easier to conditionally skip things.
+
</ins><span class="cx"> 2014-05-19  David Kilzer  &lt;ddkilzer@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] REGRESSION (r168910): webkitdirs.pm: Be more forgiving when parsing --sdk, --device and --sim
</span></span></pre></div>
<a id="trunkToolsScriptsrunjscstresstests"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/run-jsc-stress-tests (169091 => 169092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/run-jsc-stress-tests        2014-05-20 01:09:37 UTC (rev 169091)
+++ trunk/Tools/Scripts/run-jsc-stress-tests        2014-05-20 01:53:56 UTC (rev 169092)
</span><span class="lines">@@ -176,6 +176,40 @@
</span><span class="cx">     exit 1
</span><span class="cx"> end
</span><span class="cx"> 
</span><ins>+# Try to determine architecture. Return nil on failure.
+def machOArchitectureCode
+    otoolLines = `otool -aSfh #{Shellwords.shellescape($jscPath.to_s)}`.split(&quot;\n&quot;)
+    otoolLines.each_with_index {
+        | value, index |
+        if value =~ /magic/ and value =~ /cputype/
+            return otoolLines[index + 1].split[1].to_i
+        end
+    }
+    $stderr.puts &quot;Warning: unable to determine architecture.&quot;
+    nil
+end
+
+def determineArchitecture
+    code = machOArchitectureCode
+    return nil unless code
+    is64BitFlag = 0x01000000
+    case code
+    when 7
+        &quot;x86&quot;
+    when 7 | is64BitFlag
+        &quot;x86-64&quot;
+    when 12
+        &quot;arm&quot;
+    when 12 | is64BitFlag
+        &quot;arm64&quot;
+    else
+        $stderr.puts &quot;Warning: unable to determine architecture from code: #{code}&quot;
+        nil
+    end
+end
+
+$architecture = determineArchitecture
+
</ins><span class="cx"> $numFailures = 0
</span><span class="cx"> 
</span><span class="cx"> EAGER_OPTIONS = [&quot;--thresholdForJITAfterWarmUp=10&quot;, &quot;--thresholdForJITSoon=10&quot;, &quot;--thresholdForOptimizeAfterWarmUp=20&quot;, &quot;--thresholdForOptimizeAfterLongWarmUp=20&quot;, &quot;--thresholdForOptimizeSoon=20&quot;, &quot;--thresholdForFTLOptimizeAfterWarmUp=20&quot;, &quot;--thresholdForFTLOptimizeSoon=20&quot;]
</span><span class="lines">@@ -478,6 +512,7 @@
</span><span class="cx"> end
</span><span class="cx"> 
</span><span class="cx"> def addRunCommand(kind, command, outputHandler, errorHandler)
</span><ins>+    $didAddRunCommand = true
</ins><span class="cx">     plan = Plan.new($benchmarkDirectory, command, baseOutputName(kind), outputHandler, errorHandler)
</span><span class="cx">     if $numProcessors &gt; 1 and $runCommandOptions[:isSlow]
</span><span class="cx">         $runlist.unshift plan
</span><span class="lines">@@ -490,7 +525,8 @@
</span><span class="cx"> # $benchmark), in which case those run commands have already been executed. Otherwise
</span><span class="cx"> # returns false, in which case you're supposed to add your own run commands.
</span><span class="cx"> def parseRunCommands
</span><del>-    didRun = false
</del><ins>+    oldDidAddRunCommand = $didAddRunCommand
+    $didAddRunCommand = false
</ins><span class="cx"> 
</span><span class="cx">     Dir.chdir($outputDir) {
</span><span class="cx">         File.open($benchmarkDirectory + $benchmark) {
</span><span class="lines">@@ -506,12 +542,13 @@
</span><span class="cx">                 end
</span><span class="cx">                 next unless doesMatch
</span><span class="cx">                 eval $~.post_match
</span><del>-                didRun = true
</del><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    didRun
</del><ins>+    result = $didAddRunCommand
+    $didAddRunCommand = result or oldDidAddRunCommand
+    result
</ins><span class="cx"> end
</span><span class="cx"> 
</span><span class="cx"> def slow!
</span><span class="lines">@@ -797,6 +834,7 @@
</span><span class="cx"> end
</span><span class="cx"> 
</span><span class="cx"> def skip
</span><ins>+    $didAddRunCommand = true
</ins><span class="cx">     puts &quot;Skipping #{$collectionName}/#{$benchmark}&quot;
</span><span class="cx"> end
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>