1. 18 Jun, 2021 1 commit
  2. 17 Mar, 2021 1 commit
  3. 20 Jan, 2021 1 commit
  4. 24 Sep, 2020 1 commit
  5. 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
  6. 14 Sep, 2020 1 commit
  7. 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
  8. 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
  9. 20 Aug, 2020 1 commit
    • Dominik Inführ's avatar
      [logging] Make Log::IsEnabled() atomic · 41d2e5c9
      Dominik Inführ authored
      With concurrent allocation background threads invoke Log::IsEnabled()
      as well. Fix data race here by making is_enabled_ atomic, such that
      IsEnabled() remains cheap.
      
      After locking the mutex in MessageBuilder, IsEnabled() needs to be
      checked again in case an old value was read. Otherwise we might log
      even though logging was already disabled on another thread.
      
      The other direction where a log message isn't logged is deemed
      acceptable.
      
      Bug: v8:10315
      Change-Id: I32c9dd2e9879fbdb4ca94e080a16ddd875de7c30
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2362948
      Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69495}
      41d2e5c9
  10. 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
  11. 03 Jun, 2020 1 commit
  12. 14 Sep, 2019 1 commit
  13. 24 May, 2019 1 commit
  14. 23 May, 2019 1 commit
  15. 20 May, 2019 1 commit
  16. 17 May, 2019 2 commits
  17. 04 Apr, 2019 1 commit
  18. 27 Nov, 2018 1 commit
  19. 12 Oct, 2018 1 commit
  20. 20 Sep, 2018 1 commit
  21. 11 Sep, 2018 1 commit
  22. 10 Aug, 2018 1 commit
    • Bret Sepulveda's avatar
      Escape backslashes when logging. · f642de00
      Bret Sepulveda authored
      Log::MessageBuilder was already escaping most unsafe characters when
      they were being logged, but plain backslashes were not. Merely updating
      the existing escaping path was not sufficient, as recursion would cause
      escape codes to be doubly escaped. This patches refactors the API to
      ensure incoming text is escaped exactly once.
      
      Bug: v8:8039
      Change-Id: Id48aabf29fb6153189ae4a1ad7dfaaf4b41b62ad
      Reviewed-on: https://chromium-review.googlesource.com/1169049Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Commit-Queue: Bret Sepulveda <bsep@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55038}
      f642de00
  23. 03 May, 2018 2 commits
  24. 23 Mar, 2018 1 commit
  25. 21 Mar, 2018 1 commit
  26. 20 Dec, 2017 1 commit
  27. 14 Nov, 2017 1 commit
  28. 30 Oct, 2017 1 commit
  29. 24 Oct, 2017 1 commit
  30. 20 Oct, 2017 4 commits
  31. 13 Oct, 2017 1 commit
  32. 28 Jul, 2017 1 commit
  33. 20 Feb, 2017 1 commit