1. 19 Jul, 2022 1 commit
  2. 27 Jun, 2022 1 commit
  3. 10 Jun, 2022 1 commit
  4. 01 Jun, 2022 1 commit
  5. 17 May, 2022 1 commit
  6. 16 May, 2022 1 commit
  7. 13 May, 2022 3 commits
  8. 05 May, 2022 1 commit
  9. 28 Apr, 2022 1 commit
  10. 25 Apr, 2022 1 commit
  11. 22 Apr, 2022 1 commit
  12. 20 Apr, 2022 2 commits
  13. 19 Apr, 2022 2 commits
    • Shu-yu Guo's avatar
      Revert "[builtins] Remap builtins on Linux" · a8b04431
      Shu-yu Guo authored
      This reverts commit b1dd8287.
      
      Reason for revert: Breaking fuschia build https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Fuchsia%20-%20builder/13592/overview
      
      Original change's description:
      > [builtins] Remap builtins on Linux
      >
      > This is a CL similar to
      > https://chromium-review.googlesource.com/c/v8/v8/+/3553006, but on Linux
      > rather than macOS. The goal is to allow builtins to use short builtin
      > calls without paying a memory cost, by remapping rather than copying
      > them.
      >
      > However, while macOS has a system call making this easier, on Linux we
      > don't have one on most kernels. There is the recently-introduced
      > mremap(MREMAP_DONTUNMMAP), which is available in 5.7, but only works on
      > anonymous mappings until 5.13, which is too recent for most Android
      > devices.
      >
      > Instead, we open() the file containing the builtins, and mmap() it at
      > the desired location.
      >
      > Change-Id: I4524f349948b8f48c4536cf392a1cd179662a6cc
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3570426
      > Reviewed-by: Igor Sheludko <ishell@chromium.org>
      > Reviewed-by: Jakob Linke <jgruber@chromium.org>
      > Commit-Queue: Benoit Lize <lizeb@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#80022}
      
      Change-Id: I0093fe84216f8c8fd1a8691c53817e578d92fa40
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3594009
      Auto-Submit: Shu-yu Guo <syg@chromium.org>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Commit-Queue: Shu-yu Guo <syg@chromium.org>
      Owners-Override: Shu-yu Guo <syg@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80028}
      a8b04431
    • Benoît Lizé's avatar
      [builtins] Remap builtins on Linux · b1dd8287
      Benoît Lizé authored
      This is a CL similar to
      https://chromium-review.googlesource.com/c/v8/v8/+/3553006, but on Linux
      rather than macOS. The goal is to allow builtins to use short builtin
      calls without paying a memory cost, by remapping rather than copying
      them.
      
      However, while macOS has a system call making this easier, on Linux we
      don't have one on most kernels. There is the recently-introduced
      mremap(MREMAP_DONTUNMMAP), which is available in 5.7, but only works on
      anonymous mappings until 5.13, which is too recent for most Android
      devices.
      
      Instead, we open() the file containing the builtins, and mmap() it at
      the desired location.
      
      Change-Id: I4524f349948b8f48c4536cf392a1cd179662a6cc
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3570426Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarJakob Linke <jgruber@chromium.org>
      Commit-Queue: Benoit Lize <lizeb@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80022}
      b1dd8287
  14. 07 Apr, 2022 1 commit
  15. 01 Apr, 2022 1 commit
    • Benoit Lize's avatar
      [builtins] Remap embedded builtins into the heap on ARM64 macOS · da1a2d12
      Benoit Lize authored
      For short builtin calls, the builtins are copied on the heap when they
      cannot be put close enough to be in range of relative calls. This costs
      memory, as the embedded builtins are part of the binary, and mapped from
      the binary, and as a consequence shared with all running processes.
      
      Rather than copying the memory, we can remap it at a different address,
      avoiding the memory cost. This CL does that, on ARM64 macOS only for
      now.
      
      This saves at least ~1.4MiB of memory per V8 process. See below the
      output of vmmap <PID>:
      
      [...]
      Memory Tag 255             7408308000-740833c000   [  208K   144K   144K     0K] r-x/rwx SM=ZER
      Memory Tag 255             740833c000-7408340000   [   16K     0K     0K     0K] ---/rwx SM=ZER
      Memory Tag 255             7408344000-7408348000   [   16K     0K     0K     0K] ---/rwx SM=ZER
      Memory Tag 255             7408348000-740837c000   [  208K   144K   144K     0K] r-x/rwx SM=ZER
      Memory Tag 255             740837c000-740fe80000   [123.0M     0K     0K     0K] ---/rwx SM=ZER
      mapped file                740fe80000-740ffe4000   [ 1424K  1328K     0K     0K] r-x/rwx SM=COW          ...pp/Contents/Frameworks/Chromium Framework.framework/Versions/102.0.4958.0/Chromium Framework
      Memory Tag 255             740ffe4000-7410000000   [  112K     0K     0K     0K] ---/rwx SM=ZER
      
      The "208K" regions are 256kiB code pages, minus the header and guard
      pages, meaning that they are code chunks. The mapped file are the
      remapped builtins, showing that they aren't copied, but remapped from
      the binary.
      
      Bug: chromium:1298417
      Change-Id: Ia30a43e671726d01450a7db0ecb7777b34763053
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3553006Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Commit-Queue: Benoit Lize <lizeb@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79716}
      da1a2d12
  16. 07 Mar, 2022 1 commit
  17. 18 Feb, 2022 1 commit
  18. 16 Feb, 2022 2 commits
  19. 04 Feb, 2022 1 commit
  20. 18 Jan, 2022 1 commit
    • Samuel Groß's avatar
      [base] Add VirtualAddressSpace unittests · c992a256
      Samuel Groß authored
      These tests cover the basic VirtualAddressSpace functionality for the
      three different types of address spaces currently available: the root
      space, subspaces, and emulated subspaces.
      
      This CL also includes minor bugfixes in VirtualAddressSpace
      implementations and removes RandomizedVirtualAlloc in platform-win32.cc
      which doesn't seem to do anything useful anymore but prevents page
      allocation hints from working correctly.
      
      Bug: v8:10391
      Change-Id: Ifa260d18fd366516b5a41ab42ce2f1785c57d061
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3386801Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Samuel Groß <saelo@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78666}
      c992a256
  21. 11 Aug, 2021 1 commit
  22. 09 Aug, 2021 1 commit
    • Camillo Bruni's avatar
      Reland "[counters] Fix reentrant timers for V8.Execute" · f688fe08
      Camillo Bruni authored
      This is a reland of fffcbaea
      
      Additional fixes:
      - Relax IsStarted DCHECKs in ElapsedTimer for paused_elapsed
      - Add LogEventStatus enum in the API for better testing
      - Rename Logger::StartEnd enum values to kXXX
      - Add additional NestedTimedHistogramScope tests
      
      Original change's description:
      > [counters] Fix reentrant timers for V8.Execute
      >
      > This CL fixes a long standing issue where reentering TimedHistograms
      > scopes would cause spurious measurements. Only the non-nested scopes
      > yielded correct results.
      >
      > Due to the changed numbers, the V8.Execute histogram is renamed to
      > V8.ExecuteMicroSeconds. Note that this histogram is also guarded
      > behind the --slow-histograms flag due to the additional overhead.
      >
      > Unlike before, it does no longer include time for external callbacks
      > and only measures self time. The following example illustrates the
      > new behaviour:
      >
      > 1. Enter V8:           |--+.......+--| self-time: 4 units (reported)
      > 2. Exit V8 (callback):    |-+...+-|    self-time: 2 units (ignored)
      > 3. Re-enter V8:             |---|      self-time: 3 units (reported)
      >
      > This would result in 2 histogram entries with 4 time units for the first
      > V8 slice and 3 units for the nested part. Note that the callback time
      > itself is ignored.
      >
      > This CL attempts to clean up how TimedHistograms work:
      > - Histogram: the base class
      > - TimedHistograms: used for time-related histograms that are not nested
      > - NestedTimeHistograms: Extends TimedHistograms and is used for nested
      >   histograms
      >
      > This CL changes Histograms to not measure time themselves. Measurements
      > happen in the *HistogramScopes:
      > - BaseTimedHistogramScope: Base functionality
      > - TimedHistogramScope: For non-nested measurements
      > - NestedTimedHistogramScope: For nested measurements
      > - PauseNestedTimedHistogramScope: Ignore time during a given scope.
      >   This is used to pause timers during callbacks.
      >
      > Additional changes:
      > - ExternalCallbackScope now contains a PauseNestedTimedHistogramScope
      >   and always sets VMState<EXTERNAL>
      >
      > Bug: v8:11946
      > Change-Id: I45e4b7ff77b5948b605dd50539044cb26222fa21
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3001345
      > Reviewed-by: Omer Katz <omerkatz@chromium.org>
      > Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
      > Reviewed-by: Victor Gomes <victorgomes@chromium.org>
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#76111}
      
      Bug: v8:11946
      Change-Id: Ic2eef7456fbc245febcf780b23418f6ab0bebdb7
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3080566
      Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
      Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#76180}
      f688fe08
  23. 06 Aug, 2021 1 commit
    • Leszek Swirski's avatar
      Revert "[counters] Fix reentrant timers for V8.Execute" · a12c6fa2
      Leszek Swirski authored
      This reverts commit fffcbaea.
      
      Reason for revert: Breaks in Chromium (e.g. https://ci.chromium.org/p/v8/builders/ci/Linux%20V8%20FYI%20Release%20%28NVIDIA%29)
      
      Original change's description:
      > [counters] Fix reentrant timers for V8.Execute
      >
      > This CL fixes a long standing issue where reentering TimedHistograms
      > scopes would cause spurious measurements. Only the non-nested scopes
      > yielded correct results.
      >
      > Due to the changed numbers, the V8.Execute histogram is renamed to
      > V8.ExecuteMicroSeconds. Note that this histogram is also guarded
      > behind the --slow-histograms flag due to the additional overhead.
      >
      > Unlike before, it does no longer include time for external callbacks
      > and only measures self time. The following example illustrates the
      > new behaviour:
      >
      > 1. Enter V8:           |--+.......+--| self-time: 4 units (reported)
      > 2. Exit V8 (callback):    |-+...+-|    self-time: 2 units (ignored)
      > 3. Re-enter V8:             |---|      self-time: 3 units (reported)
      >
      > This would result in 2 histogram entries with 4 time units for the first
      > V8 slice and 3 units for the nested part. Note that the callback time
      > itself is ignored.
      >
      > This CL attempts to clean up how TimedHistograms work:
      > - Histogram: the base class
      > - TimedHistograms: used for time-related histograms that are not nested
      > - NestedTimeHistograms: Extends TimedHistograms and is used for nested
      >   histograms
      >
      > This CL changes Histograms to not measure time themselves. Measurements
      > happen in the *HistogramScopes:
      > - BaseTimedHistogramScope: Base functionality
      > - TimedHistogramScope: For non-nested measurements
      > - NestedTimedHistogramScope: For nested measurements
      > - PauseNestedTimedHistogramScope: Ignore time during a given scope.
      >   This is used to pause timers during callbacks.
      >
      > Additional changes:
      > - ExternalCallbackScope now contains a PauseNestedTimedHistogramScope
      >   and always sets VMState<EXTERNAL>
      >
      > Bug: v8:11946
      > Change-Id: I45e4b7ff77b5948b605dd50539044cb26222fa21
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3001345
      > Reviewed-by: Omer Katz <omerkatz@chromium.org>
      > Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
      > Reviewed-by: Victor Gomes <victorgomes@chromium.org>
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#76111}
      
      Bug: v8:11946
      Change-Id: I954de1afbabf101fb5d4f52eca0d3b80a723385b
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3077153
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Owners-Override: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#76138}
      a12c6fa2
  24. 05 Aug, 2021 1 commit
    • Camillo Bruni's avatar
      [counters] Fix reentrant timers for V8.Execute · fffcbaea
      Camillo Bruni authored
      This CL fixes a long standing issue where reentering TimedHistograms
      scopes would cause spurious measurements. Only the non-nested scopes
      yielded correct results.
      
      Due to the changed numbers, the V8.Execute histogram is renamed to
      V8.ExecuteMicroSeconds. Note that this histogram is also guarded
      behind the --slow-histograms flag due to the additional overhead.
      
      Unlike before, it does no longer include time for external callbacks
      and only measures self time. The following example illustrates the
      new behaviour:
      
      1. Enter V8:           |--+.......+--| self-time: 4 units (reported)
      2. Exit V8 (callback):    |-+...+-|    self-time: 2 units (ignored)
      3. Re-enter V8:             |---|      self-time: 3 units (reported)
      
      This would result in 2 histogram entries with 4 time units for the first
      V8 slice and 3 units for the nested part. Note that the callback time
      itself is ignored.
      
      This CL attempts to clean up how TimedHistograms work:
      - Histogram: the base class
      - TimedHistograms: used for time-related histograms that are not nested
      - NestedTimeHistograms: Extends TimedHistograms and is used for nested
        histograms
      
      This CL changes Histograms to not measure time themselves. Measurements
      happen in the *HistogramScopes:
      - BaseTimedHistogramScope: Base functionality
      - TimedHistogramScope: For non-nested measurements
      - NestedTimedHistogramScope: For nested measurements
      - PauseNestedTimedHistogramScope: Ignore time during a given scope.
        This is used to pause timers during callbacks.
      
      Additional changes:
      - ExternalCallbackScope now contains a PauseNestedTimedHistogramScope
        and always sets VMState<EXTERNAL>
      
      Bug: v8:11946
      Change-Id: I45e4b7ff77b5948b605dd50539044cb26222fa21
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3001345Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#76111}
      fffcbaea
  25. 03 Aug, 2021 1 commit
    • Bruce Dawson's avatar
      Remove windows.h from win32-headers.h · fb9e1299
      Bruce Dawson authored
      Windows.h causes massive namespace pollution with its defining of many
      macros, it adds to build times, it disables warnings, and it makes it
      easier to write non-portable code.
      
      This change removes windows.h from V8's win32-headers.h. It does this
      by replicating the small number of typedefs that are needed and by
      defining three "proxy" types that are the same size and layout. The
      V8ToWindowsType functions are used to reinterpret_cast between the
      types.
      
      Prior to this change there were over 760 v8-related source files that
      include windows.h. After this change there are 16.
      
      Bug: chromium:796644
      Change-Id: I89efeed47028faae72de2da4f1dae345d8d7746c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3042215
      Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#76064}
      fb9e1299
  26. 05 Jul, 2021 1 commit
  27. 18 Jun, 2021 1 commit
  28. 09 Jun, 2021 1 commit
  29. 30 Apr, 2021 1 commit
  30. 23 Apr, 2021 1 commit
  31. 12 Mar, 2021 1 commit
    • Clemens Backes's avatar
      [logging] Fix printing of single-byte enums · d8c8387a
      Clemens Backes authored
      We still get e.g. ClusterFuzz reports with enums printed as
      non-printable single-character strings (see linked bug).
      This CL fixes this, and also includes the integral enum value for enum
      that come with their own output operator.
      
      This makes error messages strictly better, at the cost of some more code
      per enum which is being used in a CHECK/DCHECK.
      Note that binary size of release builds is not affected, since we do not
      print the values there.
      
      R=nicohartmann@chromium.org
      
      Bug: v8:11384, chromium:1187484
      Change-Id: I066b32f68440096babed9b629c7ffe3f2285cba8
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2756226Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73373}
      d8c8387a
  32. 25 Feb, 2021 1 commit
  33. 05 Jan, 2021 1 commit
  34. 17 Dec, 2020 1 commit
  35. 06 Nov, 2020 1 commit