1. 20 Apr, 2022 2 commits
  2. 10 Nov, 2020 1 commit
  3. 07 Oct, 2020 1 commit
  4. 29 Sep, 2020 1 commit
  5. 14 May, 2020 1 commit
  6. 17 Apr, 2020 1 commit
  7. 10 Sep, 2019 1 commit
  8. 06 Sep, 2019 1 commit
  9. 05 Sep, 2019 2 commits
  10. 06 Aug, 2019 1 commit
  11. 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
  12. 18 Jul, 2019 1 commit
  13. 08 Jul, 2019 2 commits
  14. 27 May, 2019 2 commits
    • Peter Marshall's avatar
      [tracing] Add a test harness for perfetto tracing tests · 9a50c84f
      Peter Marshall authored
      Add test harness so that we can avoid all this boilerplate for common
      tests in the future. Use it for the existing perfetto tracing test.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
      Bug: v8:8339
      Change-Id: Iddc716aade3eef2431bcc7eaa8b8b6502edaaa00
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631418
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61857}
      9a50c84f
    • 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
  15. 23 May, 2019 1 commit
    • Peter Marshall's avatar
      [tracing] Fix perfetto tests · 4861df10
      Peter Marshall authored
      I accidentally broke this with the last CL because the FYI bot does not
      block landing.
      
      Add initialization of perfetto when building with perfetto enabled.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
      Bug: v8:8339
      Change-Id: I10378b72bff731fac6caa75df37a355df4b804dc
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627345
      Auto-Submit: Peter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61783}
      4861df10
  16. 22 May, 2019 2 commits
  17. 20 May, 2019 1 commit
    • 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
  18. 07 May, 2019 1 commit
    • Peter Marshall's avatar
      [tracing] Fix test TraceWriter to expect uninitialized TraceObjects · 077a1658
      Peter Marshall authored
      The TraceObject passed to AppendTraceEvent can be completely
      uninitialized (set to all 0s) in some situations where a flush happens
      between creation and initialization of the TraceObject.
      
      Fix the MockTraceWriter in test-tracing to expect nullptr strings for
      the name of the object so that it does not try to construct an
      std::string from a null char*.
      
      Bug: v8:9214
      Change-Id: Ib4f3b039ab98d5d786991134cb71ecc62f127179
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1598751
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Auto-Submit: Peter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61265}
      077a1658
  19. 03 May, 2019 1 commit
  20. 13 Mar, 2019 1 commit
  21. 21 Feb, 2019 1 commit
    • Peter Marshall's avatar
      [tracing] Fix races in TracingController implementation · 51e80efd
      Peter Marshall authored
      The default TracingController (used by d8 and Node) has some concurrency
      issues. The new test flushes these out, when a second thread logs trace
      events while the main thread calls StopTracing().
      
      - Use an acquire load in UpdateCategoryGroupEnabledFlags() because this
        was racing with GetCategoryGroupEnabled() where a new category is
        added in the slow path. g_category_groups is append-only, but
        reads/writes to g_category_index need to be correctly ordered so that
        new categories are added and only then is the change to the index
        visible. The relaxed load ignored this and caused unsynchronized
        read/write.
      - Use a relaxed load in ~ScopedTracer() to access category_group_enabled
        as this previously used a non-atomic operation which caused a race
        with UpdateCategoryGroupEnabledFlag() which does a relaxed store.
      - Replace TracingController::mode_ with an atomic bool as read/writes to
        mode_ were not synchronized and caused TSAN errors. It only has two
        states and it doesn't seem like we will extend this so just convert it
        to bool.
      - Take the lock around calling trace_object->Initialize in
        AddTraceEvent(), and around trace_buffer_->Flush() in StopTracing().
        These two raced previously as the underlying TraceBufferRingBuffer
        passes out pointers to TraceObjects in a synchronized way, but the
        caller (AddTraceEvent) then writes into the object without
        synchronization. This leads to races when Flush() is called, at which
        time TraceBufferRingBuffer assumes that all the pointers it handed out
        are to valid, initialized TraceObjects - which is not true because
        AddTraceEvent may still be calling Initialize on them. This could be
        the cause of issues in Node.js where the last line of tracing/logging
        sometimes gets cut off. This is kind of a band-aid solution - access
        to the TraceObjects handed out by the ring buffer really needs proper
        synchronization which at this point would require redesign. It's quite
        likely we will replace this with Perfetto in the near future so not
        much point investing in this code right now.
      - Enable TracingCpuProfiler test which was flaky due to these bugs.
      
      Bug: v8:8821
      Change-Id: I141296800c6906ac0e7f3f21dd16d861b07dae62
      Reviewed-on: https://chromium-review.googlesource.com/c/1477283
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarAli Ijaz Sheikh <ofrobots@google.com>
      Cr-Commit-Position: refs/heads/master@{#59752}
      51e80efd
  22. 07 May, 2018 1 commit
  23. 10 Jan, 2018 1 commit
  24. 14 Nov, 2017 1 commit
  25. 03 Jul, 2017 1 commit
    • Jochen Eisinger's avatar
      Reland "Switch tracing to use v8::TracingController" · cc59f8b1
      Jochen Eisinger authored
      Original change's description:
      > Switch tracing to use v8::TracingController
      >
      > BUG=v8:6511
      > R=fmeawad@chromium.org
      >
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Change-Id: I4961e4b61a9ddc98385ed97c3ffcbcaef2d9cba7
      > Reviewed-on: https://chromium-review.googlesource.com/543144
      > Commit-Queue: Jochen Eisinger <jochen@chromium.org>
      > Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#46307}
      
      BUG=v8:6511
      TBR=fmeawad@chromium.org
      
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng;master.tryserver.v8:v8_linux64_tsan_rel
      Change-Id: Ide32b409248dfd466e7c0bae1d8ae61d6a955d98
      Reviewed-on: https://chromium-review.googlesource.com/558865
      Commit-Queue: Jochen Eisinger <jochen@chromium.org>
      Reviewed-by: 's avatarJochen Eisinger <jochen@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46381}
      cc59f8b1
  26. 29 Jun, 2017 2 commits
  27. 08 Dec, 2016 1 commit
  28. 11 Nov, 2016 1 commit
  29. 31 Oct, 2016 1 commit
  30. 12 Oct, 2016 1 commit
  31. 29 Sep, 2016 1 commit
  32. 27 Sep, 2016 3 commits