1. 06 Aug, 2020 1 commit
    • Clemens Backes's avatar
      [platform] Use more tasks for jobs · 044ddd31
      Clemens Backes authored
      Wasm recently switched from spawning a number of background tasks for
      compilation to just using a single job (via the pretty new
      {Platform::PostJob} API). This caused major regressions in several
      benchmarks running in d8, because the {DefaultPlatform} is only using
      half of the available worker threads for executing jobs with "user
      visible" priority.
      
      This CL changes this to use all available worker threads for "user
      blocking" or "user visible" jobs, and two threads for "best effort"
      jobs. The limit of two threads for best effort is identical to what
      chromium does with best effort *tasks*. For user blocking and user
      visible, chromium does not impose any limit, so we also remove the
      limitation to half of the threads from d8.
      
      Drive-by: Use {NewDefaultJobHandle} for constructing {DefaultJobHandle}.
      
      R=mlippautz@chromium.org
      CC=ahaas@chromium.org, gab@chromium.org, etiennep@chromium.org
      
      Bug: chromium:1113234, chromium:1101340
      Change-Id: I9280e649a1cf3832c562ff7251e8bda0103af111
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339481Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Commit-Queue: Hannes Payer <hpayer@chromium.org>
      Auto-Submit: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69265}
      044ddd31
  2. 20 Jul, 2020 1 commit
  3. 25 Jun, 2020 1 commit
  4. 04 Jun, 2020 1 commit
  5. 08 May, 2020 1 commit
  6. 06 May, 2020 1 commit
    • Clemens Backes's avatar
      [platform] Bump maximum number of worker threads · a0059e71
      Clemens Backes authored
      The number of worker threads in the default platform is currently capped
      at 8. At runtime, it's also capped by the number of actual cores
      available.
      Since d8 is often used for benchmarking (both internally and
      externally), this CL slightly increases the maximum to 16. At least wasm
      compilation is known to scale beyond 8 threads. If this increase does
      not cause any problems on bots, we might increase further in the future.
      
      R=mlippautz@chromium.org
      
      Change-Id: I04e138c51d7dc26c38b9384c8ea67a883c976050
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2182454
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67586}
      a0059e71
  7. 05 May, 2020 1 commit
  8. 24 Apr, 2020 1 commit
  9. 17 Apr, 2020 1 commit
  10. 06 Apr, 2020 1 commit
  11. 04 Mar, 2020 1 commit
  12. 24 Jan, 2020 1 commit
  13. 08 Jan, 2020 1 commit
  14. 02 Jan, 2020 1 commit
  15. 08 Nov, 2019 1 commit
  16. 16 Sep, 2019 1 commit
    • Clemens Hammacher's avatar
      Fix two warnings issued by g++ · fa0ec09f
      Clemens Hammacher authored
      A local build with g++ 8.3.0 failed with two warnings. This CL fixes
      them.
      The errors were:
      
      1) error: 'char* strncat(char*, const char*, size_t)' output truncated
         before terminating nul copying as many bytes from a string as its
         length [-Werror=stringop-truncation]
      2) error: 'char* strncpy(char*, const char*, size_t)' specified bound
         depends on the length of the source argument
         [-Werror=stringop-overflow=]
      
      R=petermarshall@chromium.org
      
      Bug: v8:9396
      Change-Id: I175a72435becd694e4151a64e538084ec17d8500
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1803636Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63788}
      fa0ec09f
  17. 13 Sep, 2019 2 commits
  18. 10 Sep, 2019 2 commits
    • Michael Lippautz's avatar
      [heap] Provide async GC for JS · aa7c6e22
      Michael Lippautz authored
      Reuse the existing builtin and extension infrastructure to provide a
      garbage collection mechanism that allows for asynchronous execution.
      
      On --expose-gc, this changes the gc call to parse parameters the
      following:
      (1) Parse options when encountering an options object with known properties.
      (2) No parameters is parsed as
          {type: 'major', execution: 'sync'}.
      (3) Truthy parameter that is not setting options is parsed as
          {type: 'minor', execution: 'sync'}.
      
      (2) and (3) preserve backwards compatibility for existing callers as this may be
      used widely across various test and benchmarking infrastructures.
      
      Valid options:
      - type: 'major' or 'minor' for full GC and Scavenge, respectively.
      - execution: 'sync' or 'async' for synchronous and asynchronous
        execution respectively.
      
      Returns a Promise that resolves when GC is done when asynchronous execution
      is requested, and undefined otherwise.
      
      Note: This is implemented as builtin to avoid having any stack at all. This
      information is also passed to the embedder to allow skipping stack scanning.
      
      Change-Id: Ie5c9b6f0d55238abfeb9051ffa1837501d474934
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1793143
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63659}
      aa7c6e22
    • Clemens Hammacher's avatar
      Replace base::make_unique by std::make_unique · 859b2d77
      Clemens Hammacher authored
      Since we switched to C++14 now, we can use {std::make_unique} instead
      of our own {base::make_unique} from {template-utils.h}.
      
      R=mstarzinger@chromium.org, yangguo@chromium.org
      
      Bug: v8:9687
      No-Try: true
      Change-Id: I660eb30038bbb079cee93c7861cd87ccd134f01b
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1789300
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63642}
      859b2d77
  19. 06 Sep, 2019 1 commit
  20. 05 Sep, 2019 2 commits
  21. 06 Aug, 2019 1 commit
  22. 05 Aug, 2019 1 commit
    • Peter Marshall's avatar
      [tracing] Fix TracingCpuProfiler test for Perfetto · 5ab7510e
      Peter Marshall authored
      Update the TracingCpuProfiler test to work properly with perfetto.
      
      Roll perfetto to get fixes for bugs encountered with starting/stopping
      tracing rapidly, which happens in the test for the tracing profiler.
      
      Add a check that the DataSource::Register call was successful to flush
      out any errors there (although they are fixed by the perfetto roll).
      
      Emit a fake trace event when stopping tracing in order to avoid
      losing the final trace event that the user provided. Remove the ad-hoc
      fake final trace events that the cctests for perfetto added.
      
      Add a test StartAndStopRepeated which flushes out the issues fixed by
      the perfetto roll.
      
      TBR=yangguo@chromium.org
      
      Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
      Bug: v8:8339
      Change-Id: I042d7385486bf42c86f1631406974693868a477f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1731006
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63083}
      5ab7510e
  23. 30 Jul, 2019 1 commit
  24. 18 Jul, 2019 1 commit
  25. 08 Jul, 2019 2 commits
  26. 27 May, 2019 2 commits
    • Peter Marshall's avatar
      [tracing] Add a way to test perfetto traces. · d365f62e
      Peter Marshall authored
      Add a new abstract class TraceEventListener which is just an interface
      for consuming trace events. This separates the V8-specific stuff that
      an actual perfetto consumer needs to do e.g. handling the has_more flag
      and signalling back to the controller with a semaphore.
      
      This is a change from the previous plan of making the PerfettoConsumer
      class sub-classable to implement custom consumption of trace events.
      This will be difficult when the consumer is created outside of the
      PerfettoTracingController as we can't hook up the
      consumer_finished_semaphore_ that belongs to the controller.
      
      Now the PerfettoTracingController is responsible for the Consumer life-
      cycle and hides it entirely from callers. We add the
      AddTraceEventListener() method to allow callers to register a listener
      either for testing or a JSON listener for real tracing.
      
      This lets us write tests that can store all the trace events in memory
      without first converting them to JSON, letting us write test more
      easily. There's an example test add to test-tracing - more tests using
      this style will follow.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
      Bug: v8:8339
      Change-Id: I2d2b0f408b1c7bed954144163e1968f40d772c1b
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1628789
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Auto-Submit: Peter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61854}
      d365f62e
    • Clemens Hammacher's avatar
      [cleanup] Replace simple typedefs by using · a335f2ae
      Clemens Hammacher authored
      This replaces all typedefs that define types and not functions by the
      equivalent "using" declaration.
      
      This was done mostly automatically using this command:
      ag -l '\btypedef\b' src test | xargs -L1 \
           perl -i -p0e 's/typedef ([^*;{}]+) (\w+);/using \2 = \1;/sg'
      
      Patchset 2 then adds some manual changes for typedefs for pointer types,
      where the regular expression did not match.
      
      R=mstarzinger@chromium.org
      TBR=yangguo@chromium.org, jarin@chromium.org
      
      Bug: v8:9183
      Change-Id: I6f6ee28d1793b7ac34a58f980b94babc21874b78
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631409
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61849}
      a335f2ae
  27. 23 May, 2019 2 commits
    • Peter Marshall's avatar
      [tracing] Add a perfetto consumer base class · 9a2e4693
      Peter Marshall authored
      Split the JSONConsumer into a base case and subclass so that we can
      implement different consumers without needing to repeat the code that
      deals with the finished semaphore and endpoint setters/getters.
      
      This makes it possible to add a test consumer that just holds the trace
      events in memory in a later CL.
      
      This CL re-uses the existing perfetto-consumer.h file to some extent,
      but it was accidentally leftover from a previous CL where we stopped
      using it and switched to the JSON consumer instead.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
      Bug: v8:8339
      Change-Id: I56c305833c8937da76a8e6defbe7a52c59b25106
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1621938
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61799}
      9a2e4693
    • Peter Marshall's avatar
      Reland "[tracing] Add a configurable output stream for perfetto tracing" · d5688b1f
      Peter Marshall authored
      This is a reland of a03ed626
      
      Removed the added test which was failing on win32. The test was unrelated
      to the CL; we can add it later.
      
      Original change's description:
      > [tracing] Add a configurable output stream for perfetto tracing
      >
      > Add the ability to provide perfetto with an output stream for the JSON
      > consumer rather than hardcode it. D8 will use this interface exclusively
      > once the old trace controller is removed.
      >
      > Also add a test for scope-managed trace events and their duration - this
      > was leftover from a previous CL.
      >
      > Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
      > Bug: v8:8339
      > Change-Id: I1c45e17e528b549a4cfdaecabd33c7ac4ab4af77
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1611801
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#61753}
      
      TBR=jgruber@chromium.org, ulan@chromium.org
      
      Bug: v8:8339
      Change-Id: I3442a4d111e12947c107e7d0c226ae934acd06e4
      Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627334Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61780}
      d5688b1f
  28. 22 May, 2019 2 commits
  29. 20 May, 2019 2 commits
    • Peter Marshall's avatar
      [tracing] Use ChromeTracePacket to save binary size with perfetto · 76f85199
      Peter Marshall authored
      Previously, compiling with perfetto would add 2.3 MiB to the d8 release
      binary. With this change it's 472 KiB.
      
      This is because trace:lite pulls in many more compiled proto classes
      than we need, e.g. a bunch of stuff under ftrace/ which is only used
      on Android.
      
      Chrome uses a 'mirror proto' ChromeTrackPacket to only provide
      compiled protos for the types of packets it will actually see, which on
      non-android devices does not include anything under ftrace/.
      
      We use the same trick here in the JSON consumer.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
      Bug: v8:8339
      Change-Id: Iae1f74eec3bd93b18e9f069701fc016440d3ce5e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1619759
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Auto-Submit: Peter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61662}
      76f85199
    • Peter Marshall's avatar
      [tracing] Convert COMPLETE events to BEGIN/END pairs for perfetto · d5c4d577
      Peter Marshall authored
      COMPLETE events are being deprecated and don't work well with perfetto
      because we can't give out a handle into the buffer like we used to so
      that the caller can update the existing event with the duration.
      
      BEGIN/END pairs should be used instead to add two separate trace events
      to the buffer which can be associated with one another by the trace
      processor e.g. the trace viewer UI.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
      Bug: v8:8339
      Change-Id: Ib73c19d77ad58456ce23d15f0b658c26f3dc3d53
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1615257Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61641}
      d5c4d577
  30. 16 May, 2019 2 commits
    • Peter Marshall's avatar
      [tracing] Roll perfetto · 59cbcb7f
      Peter Marshall authored
      Roll perfetto to get the fix for a TSAN race.
      
      We need to override a new method on the producer, ClearIncrementalState.
      It is only called if the producer opts into it, which we do not so we
      add UNREACHABLE() in the implementation.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
      Bug: v8:8339
      Change-Id: I782989f32b511e98479f6637148e3bdd78a6578a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1615461Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61584}
      59cbcb7f
    • Peter Marshall's avatar
      [tracing] Don't delete TraceWriters in Perfetto · d2061b34
      Peter Marshall authored
      Perfetto has a mechanism for getting trace data from buffers held alive
      by TraceWriters. We enable this with the SetSMBScrapingEnabled() call.
      
      This means we don't need to delete TraceWriter objects and can just leak
      them for now, and eventually use thread-local destructors to ensure they
      are eventually deleted on thread exit.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
      Bug: v8:8339
      Change-Id: I690bc435c48db6d91eab2fbc7a49ec9feae3b45a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1607653
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61575}
      d2061b34
  31. 10 May, 2019 1 commit