1. 21 Apr, 2021 1 commit
  2. 22 Mar, 2021 1 commit
  3. 11 Mar, 2021 1 commit
  4. 25 Feb, 2021 1 commit
    • Leszek Swirski's avatar
      [profiler] Clean up CodeEvent tags · 9a31804b
      Leszek Swirski authored
      Clean-up and slightly unify the CodeEvent tags:
      
        * Remove INTERPRETED_FUNCTION_TAG. It was only used for interpreter
          trampoline copies, which are used for
          --interpreted-frames-native-stack.  However, even actual bytecode
          compilation doesn't use INTERPRETED_FUNCTION_TAG, so we can remove
          it for simplicity.
      
        * The tag used by the above is now the same as for the bytecode
          creation event, i.e. EVAL_TAG, SCRIPT_TAG, FUNCTION_TAG or
          LAZY_COMPILE, depending on whether this was a script, and eval, an
          eager or a lazy compile (respectively.
      
        * Baseline was also using INTERPRETED_FUNCTION_TAG, so now it does the
          same thing as above.
      
        * Existing code is now logged as FUNCTION_TAG rather than
          LAZY_COMPILE, because we lost the laziness information.
      
        * The SCRIPT_TAG is set based on the SharedFunctionInfo flags, not
          the compilation flags, so that eager inner functions are labelled as
          FUNCTION_TAG rather than SCRIPT_TAG.
      
      Bug: v8:11420,v8:11429
      Change-Id: I0286002674255ff4ba8f5d865df372a3e2975b16
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2713104Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73047}
      9a31804b
  5. 10 Feb, 2021 2 commits
  6. 27 Jan, 2021 1 commit
  7. 20 Jan, 2021 1 commit
  8. 17 Dec, 2020 1 commit
  9. 10 Dec, 2020 1 commit
  10. 08 Dec, 2020 3 commits
    • Clemens Backes's avatar
      Reland "[wasm] Pass the script ID to code logging" · a58a5e59
      Clemens Backes authored
      This is a reland of ab4d9717.
      The original CL did a std::move before the final use of the NativeModule.
      PS2 removes that.
      
      TBR=petermarshall@chromium.org, thibaudm@chromium.org
      
      Original change's description:
      > [wasm] Pass the script ID to code logging
      >
      > We didn't pass a script ID with the code creation events for profiling.
      > This made DevTools lose the connection to the wasm script, hence
      > jumping from the profiler entry to the source did not work.
      >
      > This CL changes the timing of code logging a bit such that the script is
      > always allocated before logging. In the queue of code to be logged we
      > then also store the script ID, and finally set it on the {CodeEntry}
      > object.
      >
      > R=thibaudm@chromium.org
      >
      > Bug: chromium:1125986
      > Change-Id: I2248c1d520bc819436bbe732373f7a3446b64f48
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2575057
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#71654}
      
      Bug: chromium:1125986
      Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng
      Change-Id: I2a7c5fe04fff726836b1279e3d05b1702a4efb76
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2578980Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71663}
      a58a5e59
    • Clemens Backes's avatar
      Revert "[wasm] Pass the script ID to code logging" · 8d013ea1
      Clemens Backes authored
      This reverts commit ab4d9717.
      
      Reason for revert: UBSan issues: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20UBSan/14184/overview
      
      Original change's description:
      > [wasm] Pass the script ID to code logging
      >
      > We didn't pass a script ID with the code creation events for profiling.
      > This made DevTools lose the connection to the wasm script, hence
      > jumping from the profiler entry to the source did not work.
      >
      > This CL changes the timing of code logging a bit such that the script is
      > always allocated before logging. In the queue of code to be logged we
      > then also store the script ID, and finally set it on the {CodeEntry}
      > object.
      >
      > R=​thibaudm@chromium.org
      >
      > Bug: chromium:1125986
      > Change-Id: I2248c1d520bc819436bbe732373f7a3446b64f48
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2575057
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#71654}
      
      TBR=petermarshall@chromium.org,clemensb@chromium.org,thibaudm@chromium.org
      
      Change-Id: I03c90c77b55e770797a6d66b1d778992a047e07a
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:1125986
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2575070Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71660}
      8d013ea1
    • Clemens Backes's avatar
      [wasm] Pass the script ID to code logging · ab4d9717
      Clemens Backes authored
      We didn't pass a script ID with the code creation events for profiling.
      This made DevTools lose the connection to the wasm script, hence
      jumping from the profiler entry to the source did not work.
      
      This CL changes the timing of code logging a bit such that the script is
      always allocated before logging. In the queue of code to be logged we
      then also store the script ID, and finally set it on the {CodeEntry}
      object.
      
      R=thibaudm@chromium.org
      
      Bug: chromium:1125986
      Change-Id: I2248c1d520bc819436bbe732373f7a3446b64f48
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2575057
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71654}
      ab4d9717
  11. 02 Dec, 2020 1 commit
  12. 26 Nov, 2020 1 commit
  13. 19 Nov, 2020 1 commit
    • Seth Brenith's avatar
      Avoid overflow when profiling builtins · ab52d525
      Seth Brenith authored
      The basic block instrumentation currently uses 32-bit integers, which
      could overflow during a long profiling session. I considered upgrading
      them to 64-bit integers, but generating the correct instrumentation code
      for various architectures would be rather non-trivial. Instead, this
      change uses 64-bit floating-point values, which are simple and also have
      the nice behavior that they saturate rather than overflowing.
      
      Bug: v8:10470
      Change-Id: I60f7456cb750091809803c03a85dd348dc614b58
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2545573Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#71297}
      ab52d525
  14. 13 Oct, 2020 1 commit
  15. 24 Sep, 2020 1 commit
  16. 17 Sep, 2020 1 commit
    • Dominik Inführ's avatar
      [logging] Make Logger::SetUp and TearDownAndGetLogFile thread-safe · 433b4984
      Dominik Inführ authored
      While so far this should only happen in tests in test-log.cc, it can
      happen that background threads using Logger::is_logging() race with
      Logger::TearDownAndGetLogFile().
      
      Fix the race by protecting is_logging_ with the mutex that is also used
      for writing log messages. Logger::is_logging_ now becomes relaxed
      atomic, such that code for logging isn't required to lock the mutex
      to check whether logging is enabled.
      
      Also remove Log::IsEnabled() in favor of Logger::is_logging() to avoid
      checking both flags since both are the same.
      
      Bug: v8:10315
      Change-Id: Ic14e7f74334eb8a8438abad82ad227d1e6752bb8
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2416488
      Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69973}
      433b4984
  17. 14 Sep, 2020 2 commits
  18. 09 Sep, 2020 2 commits
    • Sathya Gunasekaran's avatar
      Revert "Reland "[test][d8] Add d8.log.getAndStop helper"" · 92236da2
      Sathya Gunasekaran authored
      This reverts commit 23531d82.
      
      Reason for revert: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/33007?
      
      Original change's description:
      > Reland "[test][d8] Add d8.log.getAndStop helper"
      > 
      > This is a reland of 95aa697b
      > 
      > Original change's description:
      > > [test][d8] Add d8.log.getAndStop helper
      > >
      > > The new helper function allows us to write tests for log parsing
      > > without the need to first generating a log file. This makes it easier
      > > to spot errors when the log format changes.
      > >
      > > - Add d8 global variable
      > > - Add file_name accessor to Logger and Log classes
      > > - Change OS::LogFileOpenMode to w+ / wb+
      > > - Use separate Log::WriteLogHeader method
      > > - Remove unused logger_ instance variable from Log
      > >
      > > Bug: v8:10644
      > > Change-Id: Ifc7e35aa4e91b3f01f0847843263946e085944c3
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2387563
      > > Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      > > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > > Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#69715}
      > 
      > Bug: v8:10644
      > 
      > TBR=verwaest@chromium.org
      > 
      > Change-Id: I54741344834d88a376b74e2e3a2047e880a94624
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2396081
      > Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69769}
      
      TBR=mlippautz@chromium.org,cbruni@chromium.org,gsathya@chromium.org,verwaest@chromium.org
      
      Change-Id: I493315e0d6498f0fa9bed3409725bb52d554b53a
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:10644
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2400982Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
      Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69770}
      92236da2
    • Camillo Bruni's avatar
      Reland "[test][d8] Add d8.log.getAndStop helper" · 23531d82
      Camillo Bruni authored
      This is a reland of 95aa697b
      
      Original change's description:
      > [test][d8] Add d8.log.getAndStop helper
      >
      > The new helper function allows us to write tests for log parsing
      > without the need to first generating a log file. This makes it easier
      > to spot errors when the log format changes.
      >
      > - Add d8 global variable
      > - Add file_name accessor to Logger and Log classes
      > - Change OS::LogFileOpenMode to w+ / wb+
      > - Use separate Log::WriteLogHeader method
      > - Remove unused logger_ instance variable from Log
      >
      > Bug: v8:10644
      > Change-Id: Ifc7e35aa4e91b3f01f0847843263946e085944c3
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2387563
      > Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69715}
      
      Bug: v8:10644
      
      TBR=verwaest@chromium.org
      
      Change-Id: I54741344834d88a376b74e2e3a2047e880a94624
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2396081
      Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69769}
      23531d82
  19. 07 Sep, 2020 2 commits
    • Camillo Bruni's avatar
      Revert "[test][d8] Add d8.log.getAndStop helper" · 8bf237dd
      Camillo Bruni authored
      This reverts commit 95aa697b.
      
      Reason for revert: breaks under tsan
      
      Original change's description:
      > [test][d8] Add d8.log.getAndStop helper
      > 
      > The new helper function allows us to write tests for log parsing
      > without the need to first generating a log file. This makes it easier
      > to spot errors when the log format changes.
      > 
      > - Add d8 global variable
      > - Add file_name accessor to Logger and Log classes
      > - Change OS::LogFileOpenMode to w+ / wb+
      > - Use separate Log::WriteLogHeader method
      > - Remove unused logger_ instance variable from Log
      > 
      > Bug: v8:10644
      > Change-Id: Ifc7e35aa4e91b3f01f0847843263946e085944c3
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2387563
      > Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69715}
      
      TBR=mlippautz@chromium.org,cbruni@chromium.org,gsathya@chromium.org,verwaest@chromium.org
      
      Change-Id: Iad47d2f1e3391cae3c2f8c9e6c904c43925e1671
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:10644
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2396080Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69717}
      8bf237dd
    • Camillo Bruni's avatar
      [test][d8] Add d8.log.getAndStop helper · 95aa697b
      Camillo Bruni authored
      The new helper function allows us to write tests for log parsing
      without the need to first generating a log file. This makes it easier
      to spot errors when the log format changes.
      
      - Add d8 global variable
      - Add file_name accessor to Logger and Log classes
      - Change OS::LogFileOpenMode to w+ / wb+
      - Use separate Log::WriteLogHeader method
      - Remove unused logger_ instance variable from Log
      
      Bug: v8:10644
      Change-Id: Ifc7e35aa4e91b3f01f0847843263946e085944c3
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2387563
      Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69715}
      95aa697b
  20. 17 Aug, 2020 1 commit
  21. 22 Jul, 2020 1 commit
    • Seth Brenith's avatar
      Profile-guided optimization of builtins · 922983df
      Seth Brenith authored
      Design doc:
      https://docs.google.com/document/d/1szInbXZfaErWW70d30hJsOLL0Es-l5_g8d2rXm1ZBqI/edit?usp=sharing
      
      V8 can already collect data about how many times each basic block in the
      builtins is run. This change enables using that data for profile-guided
      optimization. New comments in BUILD.gn describe how to use this feature.
      
      A few implementation details worth mentioning, which aren't covered in
      the design doc:
      
      - BasicBlockProfilerData currently contains an array of RPO numbers.
        However, this array is always just [0, 1, 2, 3, ...], so this change
        removes that array. A new DCHECK in BasicBlockInstrumentor::Instrument
        ensures that the removal is valid.
      
      - RPO numbers, while useful for printing data that matches with the
        stringified schedule, are not useful for matching profiling data with
        blocks that haven't been scheduled yet. This change adds a new array
        of block IDs in BasicBlockProfilerData, so that block counters can be
        used for PGO.
      
      - Basic block counters need to be written to a file so that they can be
        provided to a subsequent run of mksnapshot, but the design doc doesn't
        specify the transfer format or what file is used. In this change, I
        propose using the existing v8.log file for that purpose. Block count
        records look like this:
      
        block,TestLessThanHandler,37,29405
      
        This line indicates that block ID 37 in TestLessThanHandler was run
        29405 times. If multiple lines refer to the same block, the reader
        adds them all together. I like this format because it's easy to use:
        - V8 already has robust logic for creating the log file, naming it to
          avoid conflicts in multi-process situations, etc.
        - Line order doesn't matter, and interleaved writes from various
          logging sources are fine, given that V8 writes each line atomically.
        - Combining multiple sources of profiling data is as simple as
          concatenating their v8.log files together.
      
      - It is a good idea to avoid making any changes based on profiling data
        if the function being compiled doesn't match the one that was
        profiled, since it is common to use profiling data downloaded from a
        central lab which is updated only periodically. To check whether a
        function matches, I propose using a hash of the Graph state right
        before scheduling. This might be stricter than necessary, as some
        changes to the function might be small enough that the profile data is
        still relevant, but I'd rather err on the side of not making incorrect
        changes. This hash is also written to the v8.log file, in a line that
        looks like this:
      
        builtin_hash,LdaZeroHandler,3387822046
      
      Bug: v8:10470
      Change-Id: I429e5ce5efa94e01e7489deb3996012cf860cf13
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2220765
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69008}
      922983df
  22. 07 Jul, 2020 2 commits
  23. 14 May, 2020 1 commit
    • Leszek Swirski's avatar
      [offthread] Add off thread deserialization · 595609fb
      Leszek Swirski authored
      Add a new OffThreadObjectDeserializer, which can deserialize a snapshot
      into an OffThreadIsolate.
      
      This involves templating the Deserializer base class on Isolate, and
      amending OffThreadHeap to be able to create Reservations same as the
      main-thread Heap can. Various off-thread incompatible methods are
      stubbed out as UNREACHABLE in OffThreadIsolate overloads.
      
      There is currently no API entry into the off-thread deserialization, but
      under --stress-background-compile it now runs the CodeDeserializer (i.e.
      code cache deserialization) in a background thread.
      
      Bug: chromium:1075999
      
      Change-Id: I2453f51ae31df4d4b6aa94b0804a9d6d3a03781e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2172741
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67799}
      595609fb
  24. 07 May, 2020 1 commit
  25. 13 Feb, 2020 1 commit
  26. 11 Feb, 2020 1 commit
  27. 10 Jan, 2020 2 commits
  28. 07 Jan, 2020 1 commit
  29. 02 Jan, 2020 1 commit
  30. 24 Sep, 2019 1 commit
  31. 14 Sep, 2019 1 commit
  32. 13 Sep, 2019 1 commit