1. 18 Feb, 2019 1 commit
  2. 07 Feb, 2019 1 commit
  3. 01 Feb, 2019 1 commit
  4. 23 Jan, 2019 3 commits
    • Clemens Hammacher's avatar
      Reland "[wasm] Decouple background compile jobs from NativeModule" · eab3508a
      Clemens Hammacher authored
      This is a reland of 92d9b09c.
      Patch unchanged, errors fixed by https://crrev.com/c/1430059.
      
      Original change's description:
      > [wasm] Decouple background compile jobs from NativeModule
      >
      > Background compile jobs should not keep the NativeModule alive, for two
      > reasons:
      > 1) We sometimes have to wait for background compilation to finish (from
      >    a foreground task!). This introduces unnecessary latency.
      > 2) Giving the background compile tasks shared ownership of the
      >    NativeModule causes the NativeModule (and the CompilationState) to
      >    be freed from background tasks, which is error-prone (see
      >    https://crrev.com/c/1400420).
      >
      > Instead, this CL introduces a BackgroundCompileToken which is held
      > alive by the NativeModule and all background compile jobs. The initial
      > and the final phase of compilation (getting and submitting work)
      > synchronize on this token to check and ensure that the NativeModule is
      > and stays alive. During compilation itself, the mutex is released, such
      > that the NativeModule can die.
      > The destructor of the NativeModule cancels the BackgroundCompileToken.
      > Immediately afterwards, the NativeModule and the CompilationState can
      > die.
      >
      > This change allows to remove two hacks introduced previously: The atomic
      > {aborted_} flag and the {FreeCallbacksTask}.
      >
      > R=mstarzinger@chromium.org
      > CC=titzer@chromium.org
      >
      > Bug: v8:8689, v8:7921
      > Change-Id: I42e06eab3c944b0988286f2ce18e3c294535dfb6
      > Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
      > Reviewed-on: https://chromium-review.googlesource.com/c/1421364
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#59020}
      
      TBR=mstarzinger@chromium.org
      
      Bug: v8:8689, v8:7921
      Change-Id: Iead972ef77c8503da7246cab48e7693b176d8f02
      Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
      Reviewed-on: https://chromium-review.googlesource.com/c/1429862Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59035}
      eab3508a
    • Clemens Hammacher's avatar
      Revert "[wasm] Decouple background compile jobs from NativeModule" · ea513ab8
      Clemens Hammacher authored
      This reverts commit 92d9b09c.
      
      Reason for revert: Crashes on several bots, e.g. https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20UBSan/4237
      
      Original change's description:
      > [wasm] Decouple background compile jobs from NativeModule
      > 
      > Background compile jobs should not keep the NativeModule alive, for two
      > reasons:
      > 1) We sometimes have to wait for background compilation to finish (from
      >    a foreground task!). This introduces unnecessary latency.
      > 2) Giving the background compile tasks shared ownership of the
      >    NativeModule causes the NativeModule (and the CompilationState) to
      >    be freed from background tasks, which is error-prone (see
      >    https://crrev.com/c/1400420).
      > 
      > Instead, this CL introduces a BackgroundCompileToken which is held
      > alive by the NativeModule and all background compile jobs. The initial
      > and the final phase of compilation (getting and submitting work)
      > synchronize on this token to check and ensure that the NativeModule is
      > and stays alive. During compilation itself, the mutex is released, such
      > that the NativeModule can die.
      > The destructor of the NativeModule cancels the BackgroundCompileToken.
      > Immediately afterwards, the NativeModule and the CompilationState can
      > die.
      > 
      > This change allows to remove two hacks introduced previously: The atomic
      > {aborted_} flag and the {FreeCallbacksTask}.
      > 
      > R=​mstarzinger@chromium.org
      > CC=​titzer@chromium.org
      > 
      > Bug: v8:8689, v8:7921
      > Change-Id: I42e06eab3c944b0988286f2ce18e3c294535dfb6
      > Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
      > Reviewed-on: https://chromium-review.googlesource.com/c/1421364
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#59020}
      
      TBR=mstarzinger@chromium.org,clemensh@chromium.org
      
      Change-Id: I724f460f5aa654a9e75d3ce73d351214e69e2d96
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:8689, v8:7921
      Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
      Reviewed-on: https://chromium-review.googlesource.com/c/1429861Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59022}
      ea513ab8
    • Clemens Hammacher's avatar
      [wasm] Decouple background compile jobs from NativeModule · 92d9b09c
      Clemens Hammacher authored
      Background compile jobs should not keep the NativeModule alive, for two
      reasons:
      1) We sometimes have to wait for background compilation to finish (from
         a foreground task!). This introduces unnecessary latency.
      2) Giving the background compile tasks shared ownership of the
         NativeModule causes the NativeModule (and the CompilationState) to
         be freed from background tasks, which is error-prone (see
         https://crrev.com/c/1400420).
      
      Instead, this CL introduces a BackgroundCompileToken which is held
      alive by the NativeModule and all background compile jobs. The initial
      and the final phase of compilation (getting and submitting work)
      synchronize on this token to check and ensure that the NativeModule is
      and stays alive. During compilation itself, the mutex is released, such
      that the NativeModule can die.
      The destructor of the NativeModule cancels the BackgroundCompileToken.
      Immediately afterwards, the NativeModule and the CompilationState can
      die.
      
      This change allows to remove two hacks introduced previously: The atomic
      {aborted_} flag and the {FreeCallbacksTask}.
      
      R=mstarzinger@chromium.org
      CC=titzer@chromium.org
      
      Bug: v8:8689, v8:7921
      Change-Id: I42e06eab3c944b0988286f2ce18e3c294535dfb6
      Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
      Reviewed-on: https://chromium-review.googlesource.com/c/1421364
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59020}
      92d9b09c
  5. 21 Jan, 2019 1 commit
  6. 21 Dec, 2018 3 commits
    • Sigurd Schneider's avatar
      Reland "[deoptimizer] Refactor GenerateDeoptimizationEntries" · 2a72b8ac
      Sigurd Schneider authored
      This is a reland of f63a657e
      
      Original change's description:
      > [deoptimizer] Refactor GenerateDeoptimizationEntries
      >
      > This reduces preprocessor-expanded source size by 64,359 from
      >
      > gen         (   21 files):    71,570 to    1,613,100 (   23x)
      > src         (  624 files):   367,830 to   52,964,659 (  144x)
      > test        (  392 files):   490,924 to   37,360,916 (   76x)
      > third_party (  432 files):   239,085 to    9,547,902 (   40x)
      > total       ( 1521 files): 1,184,093 to  102,461,098 (   87x)
      >
      > to
      >
      > gen         (   21 files):    71,570 to    1,613,100 (   23x)
      > src         (  624 files):   367,837 to   52,919,005 (  144x)
      > test        (  392 files):   490,924 to   37,342,211 (   76x)
      > third_party (  432 files):   239,085 to    9,547,902 (   40x)
      > total       ( 1521 files): 1,184,100 to  102,396,739 (   86x)
      >
      > Bug: v8:8562
      > Change-Id: Iee474e22ababa1e080b8d6359af4d0076903e59a
      > Reviewed-on: https://chromium-review.googlesource.com/c/1384091
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
      > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#58424}
      
      TBR=jarin@chromium.org,ulan@chromium.org
      
      Bug: v8:8562
      Change-Id: I7a8a350414941f49c6155ff43e36e0cb0b2006e5
      Reviewed-on: https://chromium-review.googlesource.com/c/1387497Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58437}
      2a72b8ac
    • Sigurd Schneider's avatar
      Revert "[deoptimizer] Refactor GenerateDeoptimizationEntries" · 4b4175d7
      Sigurd Schneider authored
      This reverts commit f63a657e.
      
      Reason for revert: breaks compile on lite mode:
      
      https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8926535782549686576/+/steps/build/0/steps/compile/0/stdout
      
      
      Original change's description:
      > [deoptimizer] Refactor GenerateDeoptimizationEntries
      > 
      > This reduces preprocessor-expanded source size by 64,359 from
      > 
      > gen         (   21 files):    71,570 to    1,613,100 (   23x)
      > src         (  624 files):   367,830 to   52,964,659 (  144x)
      > test        (  392 files):   490,924 to   37,360,916 (   76x)
      > third_party (  432 files):   239,085 to    9,547,902 (   40x)
      > total       ( 1521 files): 1,184,093 to  102,461,098 (   87x)
      > 
      > to
      > 
      > gen         (   21 files):    71,570 to    1,613,100 (   23x)
      > src         (  624 files):   367,837 to   52,919,005 (  144x)
      > test        (  392 files):   490,924 to   37,342,211 (   76x)
      > third_party (  432 files):   239,085 to    9,547,902 (   40x)
      > total       ( 1521 files): 1,184,100 to  102,396,739 (   86x)
      > 
      > Bug: v8:8562
      > Change-Id: Iee474e22ababa1e080b8d6359af4d0076903e59a
      > Reviewed-on: https://chromium-review.googlesource.com/c/1384091
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
      > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#58424}
      
      TBR=ulan@chromium.org,jarin@chromium.org,sigurds@chromium.org
      
      Change-Id: I06e6f95255a3cea6a428713e9e841781425dffe8
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:8562
      Reviewed-on: https://chromium-review.googlesource.com/c/1387494Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58425}
      4b4175d7
    • Sigurd Schneider's avatar
      [deoptimizer] Refactor GenerateDeoptimizationEntries · f63a657e
      Sigurd Schneider authored
      This reduces preprocessor-expanded source size by 64,359 from
      
      gen         (   21 files):    71,570 to    1,613,100 (   23x)
      src         (  624 files):   367,830 to   52,964,659 (  144x)
      test        (  392 files):   490,924 to   37,360,916 (   76x)
      third_party (  432 files):   239,085 to    9,547,902 (   40x)
      total       ( 1521 files): 1,184,093 to  102,461,098 (   87x)
      
      to
      
      gen         (   21 files):    71,570 to    1,613,100 (   23x)
      src         (  624 files):   367,837 to   52,919,005 (  144x)
      test        (  392 files):   490,924 to   37,342,211 (   76x)
      third_party (  432 files):   239,085 to    9,547,902 (   40x)
      total       ( 1521 files): 1,184,100 to  102,396,739 (   86x)
      
      Bug: v8:8562
      Change-Id: Iee474e22ababa1e080b8d6359af4d0076903e59a
      Reviewed-on: https://chromium-review.googlesource.com/c/1384091Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58424}
      f63a657e
  7. 04 Oct, 2018 1 commit
  8. 17 Aug, 2018 1 commit
  9. 25 Jul, 2018 1 commit
  10. 18 Jun, 2018 1 commit
    • Clemens Hammacher's avatar
      Make CallInterfaceDescriptor isolate-independent · 3cb376dc
      Clemens Hammacher authored
      Currently each isolate stores its own array of
      {CallInterfaceDescriptorData}. This array has size 173, and each entry
      has 40 bytes. That's already 7kB per isolate.
      Additionally, each {CallInterfaceDescriptorData} allocates two
      heap-allocated arrays, which probably add up to more than the static
      size of the {CallInterfaceDescriptorData}. Note that all the
      {CallInterfaceDescriptorData} instances are initialized eagerly on
      isolate creation.
      
      Since {CallInterfaceDescriptor} is totally isolate independent itself,
      this CL refactors the current design to avoid a copy of them per
      isolate, and instead shares them process-wide. Still, we need to free
      the allocated heap arrays when the last isolate dies to avoid leaks.
      This can probably be refactored later by statically initializing more
      and avoiding the heap allocations all together.
      
      This refactoring will also allow us to use {CallInterfaceDescriptor}s
      from wasm background compilation threads, which are not bound to any
      isolate.
      
      R=mstarzinger@chromium.org, titzer@chromium.org
      
      Bug: v8:6600
      Change-Id: If8625b89951eec8fa8986b49a5c166e874a72494
      Reviewed-on: https://chromium-review.googlesource.com/1100879
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53803}
      3cb376dc
  11. 24 Apr, 2018 1 commit
    • Kenton Varda's avatar
      ThreadDataTable: Change global linked list to per-Isolate hash map. · b49206de
      Kenton Varda authored
      For use cases with a large number of threads or a large number of isolates (or
      both), ThreadDataTable can be a major performance bottleneck due to O(n)
      lookup time of the linked list. Switching to a hash map reduces this to O(1).
      
      Example 1: Sandstorm.io, a Node.js app that utilizes "fibers", was observed
      spending the majority of CPU time iterating over the ThreadDataTable.
      See: https://sandstorm.io/news/2016-09-30-fiber-bomb-debugging-story
      
      Example 2: Cloudflare's Workers engine, a high-multi-tenancy web server
      framework built on V8 (but not Node), creates large numbers of threads and
      isolates per-process. It saw a 34x improvement in throughput when we applied
      this patch.
      
      Cloudflare has been using a patch in production since the Workers launch which
      replaces the linked list with a hash map -- but still global.
      
      This commit builds on that but goes further and creates a separate hash map
      and mutex for each isolate, with the table being a member of the Isolate
      class. This avoids any globals and should reduce lock contention.
      
      Bug: v8:5338
      Change-Id: If0d11509afb2e043b888c376e36d3463db931b47
      Reviewed-on: https://chromium-review.googlesource.com/1014407Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Yang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52753}
      b49206de
  12. 17 Apr, 2018 1 commit
  13. 14 Feb, 2018 1 commit
  14. 21 Dec, 2017 1 commit
  15. 19 Dec, 2017 1 commit
  16. 13 Dec, 2017 1 commit
    • Michael Starzinger's avatar
      [simulator] Refactor redirections to be process-wide. · f4dde200
      Michael Starzinger authored
      This refactors the list of redirections of runtime call targets that
      simulators maintain to be process-wide (as opposed to be per Isolate).
      Such redirections are used for static C++ call targets which themselves
      are process-wide, which makes this model a closer fit. Access is already
      properly synchronized via a mutex.
      
      Along the way this also introduces the {SimulatorBase} class as a common
      base class for all simulator implementations.
      
      R=clemensh@chromium.org
      
      Change-Id: Iae8602c44b1b34cb916dde2b22c9403b0496b3d4
      Reviewed-on: https://chromium-review.googlesource.com/823966
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#50074}
      f4dde200
  17. 18 Oct, 2017 1 commit
  18. 13 Oct, 2017 1 commit
  19. 22 Sep, 2017 1 commit
  20. 28 Aug, 2017 1 commit
  21. 13 Jul, 2017 1 commit
  22. 26 Jun, 2017 1 commit
  23. 23 Jun, 2017 1 commit
  24. 13 Jun, 2017 1 commit
  25. 17 Mar, 2017 1 commit
  26. 23 Feb, 2017 1 commit
  27. 30 Jan, 2017 1 commit
  28. 03 Nov, 2016 1 commit
    • lpy's avatar
      [Tracing] Make TracingCategoryObserver v8 internal. · 2525b057
      lpy authored
      This patch removes TracingCategoryObserver API and moves the creation of
      observer inside platform initialization, by assuming that either
      Platform::AddTraceStateObserver is implemented correctly to add observer to
      tracing controller that implemented by embedders, or default tracing controller
      has already been set up and attached to platform before
      v8::V8::InitializePlatform is called.
      
      BUG=v8:5590
      
      Review-Url: https://codereview.chromium.org/2471583004
      Cr-Commit-Position: refs/heads/master@{#40739}
      2525b057
  29. 08 Jul, 2016 1 commit
  30. 17 Jun, 2016 1 commit
    • bmeurer's avatar
      [builtins] Introduce proper Float64Exp operator. · d5f2ac5e
      bmeurer authored
      Import base::ieee754::exp() from FreeBSD msun and introduce a Float64Exp
      TurboFan operator based on that, similar to what we do for Float64Log.
      Rewrite Math.exp() as TurboFan builtin and use that operator to also
      inline Math.exp() into optimized TurboFan functions.
      
      CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel
      BUG=v8:3266,v8:3468,v8:3493,v8:5086,v8:5108,chromium:620786
      R=mvstanton@chromium.org
      
      Committed: https://crrev.com/93e26314afc9da9b5b8bd998688262444ed73260
      Review-Url: https://codereview.chromium.org/2077533002
      Cr-Original-Commit-Position: refs/heads/master@{#37037}
      Cr-Commit-Position: refs/heads/master@{#37047}
      d5f2ac5e
  31. 16 Jun, 2016 2 commits
  32. 26 May, 2016 1 commit
    • lpy's avatar
      Reland: Create libsampler as V8 sampler library. · a0198c0f
      lpy authored
      This patch does five things:
      
      1. Extracts sampler as libsampler to provide sampling functionality support.
      2. Makes SampleStack virtual so embedders can override the behaviour of sample collecting.
      3. Removes sampler.[h|cc].
      4. Moves sampling thread into log.cc as workaround to keep the --prof functionality.
      5. Creates SamplerManager to manage the relationship between samplers and threads.
      
      The reason we port hashmap.h is that in debug mode, STL containers are using
      mutexes from a mutex pool, which may lead to deadlock when using asynchronously
      signal handler.
      
      Currently libsampler is used in V8 temporarily.
      
      BUG=v8:4789
      LOG=n
      
      Committed: https://crrev.com/06cc9b7c176a6223971deaa9fbcafe1a05058c7b
      Cr-Commit-Position: refs/heads/master@{#36527}
      
      Review-Url: https://codereview.chromium.org/1922303002
      Cr-Commit-Position: refs/heads/master@{#36532}
      a0198c0f
  33. 25 May, 2016 2 commits
    • lpy's avatar
      Revert of Create libsampler as V8 sampler library. (patchset #24 id:460001 of... · 636f1e8e
      lpy authored
      Revert of Create libsampler as V8 sampler library. (patchset #24 id:460001 of https://codereview.chromium.org/1922303002/ )
      
      Reason for revert:
      V8 Linux64 TSAN failure because ThreadSanitizer indicated data race.
      
      Original issue's description:
      > Create libsampler as V8 sampler library.
      >
      > This patch does five things:
      >
      > 1. Extracts sampler as libsampler to provide sampling functionality support.
      > 2. Makes SampleStack virtual so embedders can override the behaviour of sample collecting.
      > 3. Removes sampler.[h|cc].
      > 4. Moves sampling thread into log.cc as workaround to keep the --prof functionality.
      > 5. Creates SamplerManager to manage the relationship between samplers and threads.
      >
      > The reason we port hashmap.h is that in debug mode, STL containers are using
      > mutexes from a mutex pool, which may lead to deadlock when using asynchronously
      > signal handler.
      >
      > Currently libsampler is used in V8 temporarily.
      >
      > BUG=v8:4789
      > LOG=n
      >
      > Committed: https://crrev.com/06cc9b7c176a6223971deaa9fbcafe1a05058c7b
      > Cr-Commit-Position: refs/heads/master@{#36527}
      
      TBR=jochen@chromium.org,alph@chromium.org,fmeawad@chromium.org,yangguo@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:4789
      
      Review-Url: https://codereview.chromium.org/2000323007
      Cr-Commit-Position: refs/heads/master@{#36529}
      636f1e8e
    • lpy's avatar
      Create libsampler as V8 sampler library. · 06cc9b7c
      lpy authored
      This patch does five things:
      
      1. Extracts sampler as libsampler to provide sampling functionality support.
      2. Makes SampleStack virtual so embedders can override the behaviour of sample collecting.
      3. Removes sampler.[h|cc].
      4. Moves sampling thread into log.cc as workaround to keep the --prof functionality.
      5. Creates SamplerManager to manage the relationship between samplers and threads.
      
      The reason we port hashmap.h is that in debug mode, STL containers are using
      mutexes from a mutex pool, which may lead to deadlock when using asynchronously
      signal handler.
      
      Currently libsampler is used in V8 temporarily.
      
      BUG=v8:4789
      LOG=n
      
      Review-Url: https://codereview.chromium.org/1922303002
      Cr-Commit-Position: refs/heads/master@{#36527}
      06cc9b7c
  34. 01 Mar, 2016 1 commit