1. 31 Aug, 2018 6 commits
    • Bret Sepulveda's avatar
      profview: View source code of functions with samples inline. · b9cb78a7
      Bret Sepulveda authored
      If profiling is done with --log-source-code profview will now display
      a "View source" link for each function in the tree view. Clicking this
      will show a new source viewer, with sampled lines highlighted. See the
      associated bug for screenshots.
      
      This patch also fixes a bug in the profiler where the source info of
      only the first code object for each function would be logged, and
      includes some refactoring.
      
      Bug: v8:6240
      Change-Id: Ib96a9cfc54543d0dc9bef4657cdeb96ce28b223c
      Reviewed-on: https://chromium-review.googlesource.com/1194231
      Commit-Queue: Bret Sepulveda <bsep@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55542}
      b9cb78a7
    • Benedikt Meurer's avatar
      [runtime] Remove unused %GetPrototype. · 33f2012e
      Benedikt Meurer authored
      The %GetPrototype runtime function is not used anymore. Also remove the
      cctests that were introduced to guard the Crankshaft optimizations for
      the %_GetPrototype intrinsic.
      
      Bug: v8:8015
      Change-Id: I4b848f2c8d67209dae002d260a26867299d6b4a5
      Reviewed-on: https://chromium-review.googlesource.com/1199106Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55541}
      33f2012e
    • Benedikt Meurer's avatar
      [ic] Teach KeyedLoadICGeneric about ToName. · 923127f8
      Benedikt Meurer authored
      In the KeyedLoadICGeneric case the engine previously immediately fell
      back to the %KeyedGetProperty runtime function if the key was not a
      Name or a valid array index. This turns out to be really slow if a
      program passes for example objects as keys. Since we already have all
      the logic in place to convert an arbitrary JavaScript value to a Name,
      we can just call into ToName first and then operate on the result of
      that, which is significantly faster since C++ usually doesn't need to
      call back into JavaScript then to convert a JSReceiver into a Name.
      
      This also changes the ToName builtin to use the existing builtin for
      NonPrimitiveToPrimitive, which stays in JavaScript land completely.
      Since there's not really a point in inlining ToName into the call
      sites, the other uses were also changed to call the builtin instead,
      which saves some space and might also help with instruction cache
      utilization (especially when the ToName logic is more involved now).
      
      This improves the performance on the microbenchmark
      
      ```js
      const n = 1e7;
      const obj = {};
      const key = [1,2];
      
      const start = Date.now();
      for (let i = 0; i < n; ++i) {
        if (obj[key] === undefined) obj[key] = key;
      }
      print(`time: ${Date.now() - start} ms.`);
      ```
      
      by up to 36%. On the ARES-6 ML benchmark the steady state improves by up
      to ~7% and the overall mean for ARES-6 ML improves by up to ~6%. Further
      improvements might be possible here if the GetProperty builtin could be
      made faster for common prototype lookups like Symbol.toPrimitive and the
      "valueOf" and "toString" functions.
      
      Bug: v8:6344, v8:6670
      Change-Id: Ic3ac2bc4d4277836ef03039de4eda5c5f66a85da
      Reviewed-on: https://chromium-review.googlesource.com/1199022
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55540}
      923127f8
    • Benedikt Meurer's avatar
      [es2015] Handle proxies in GetProperty builtin. · 87199f52
      Benedikt Meurer authored
      Teach the GetProperty builtin how to perform [[Get]] on JSProxy
      instances by calling into the dedicated ProxyGetProperty builtin
      that we already use for the LOAD_IC / KEYED_LOAD_IC. This is
      important when proxies are used in places were GetProperty builtin
      is used like for example as iterables in for..of loops or in spreads.
      
      On a simple micro-benchmark like the following
      
      ```js
      const proxy = new Proxy([1, 2, 3], {
        get(target, property) { return target[property]; }
      });
      const TESTS = [
          function testForOfProxy() { for (const x of proxy) {} },
          function testSpreadProxy() { return [...proxy]; }
      ];
      
      function test(fn) {
        var result;
        for (var i = 0; i < 1e6; ++i) result = fn();
        return result;
      }
      test(x => x);
      
      for (var j = 0; j < TESTS.length; ++j) test(TESTS[j]);
      for (var j = 0; j < TESTS.length; ++j) {
        var startTime = Date.now();
        test(TESTS[j]);
        print(TESTS[j].name + ':', (Date.now() - startTime), 'ms.');
      }
      ```
      
      improves from around
      
        testForOfProxy: 1672.6 ms.
        testSpreadProxy: 1956.6 ms.
      
      to
      
        testForOfProxy: 408.4 ms.
        testSpreadProxy: 530.8 ms.
      
      on average, which corresponds to a 4-5x performance improvement, even
      for small arrays. On the ARES-6 Air benchmark this completely eliminates
      all calls to the %GetProperty runtime function, and thereby improves the
      steady state mean by 2-3%.
      
      Bug: v8:6344, v8:6557, v8:6559
      Change-Id: Ifebdaff8f3ae5899a33ce408ecd54655247f3a02
      Reviewed-on: https://chromium-review.googlesource.com/1199023Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55539}
      87199f52
    • Jao-ke Chin-Lee's avatar
      [CQ] Remove deleted builder from experimental set. · 0b0f0623
      Jao-ke Chin-Lee authored
      chromeos_daisy_chromium_compile_only_ng has been
      deleted and was removed from Buildbucket in
      https://chromium-review.googlesource.com/c/chromium/src/+/1195731
      
      BUG=v8:8058
      
      Change-Id: I42adaca73f0b04cf553e16f215f92ed2f5a7a010
      Reviewed-on: https://chromium-review.googlesource.com/1198242Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55538}
      0b0f0623
    • Frank Tang's avatar
      Revert "Revert "Reland "[Intl] move Date.prototype.toLocale{,Date,Time}String to C++""" · 273c83db
      Frank Tang authored
      The expectation is changed in https://chromium-review.googlesource.com/c/chromium/src/+/1196032
      
      revert of https://chromium-review.googlesource.com/c/v8/v8/+/1188143
      to reland https://chromium-review.googlesource.com/c/v8/v8/+/1185763
      
      v8:7961
      
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng;luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux_blink_rel
      Change-Id: I461db83b377c31abda72f2ce9c4501fcdd3b2663
      Reviewed-on: https://chromium-review.googlesource.com/1195539Reviewed-by: 's avatarJungshik Shin <jshin@chromium.org>
      Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
      Commit-Queue: Frank Tang <ftang@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55537}
      273c83db
  2. 30 Aug, 2018 27 commits
  3. 29 Aug, 2018 7 commits