1. 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
  2. 03 May, 2019 1 commit
  3. 13 Mar, 2019 1 commit
  4. 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
  5. 07 May, 2018 1 commit
  6. 10 Jan, 2018 1 commit
  7. 14 Nov, 2017 1 commit
  8. 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
  9. 29 Jun, 2017 2 commits
  10. 08 Dec, 2016 1 commit
  11. 11 Nov, 2016 1 commit
  12. 31 Oct, 2016 1 commit
  13. 12 Oct, 2016 1 commit
  14. 29 Sep, 2016 1 commit
  15. 27 Sep, 2016 3 commits
  16. 26 Sep, 2016 1 commit
  17. 09 Sep, 2016 1 commit
  18. 10 Aug, 2016 1 commit
  19. 04 Aug, 2016 1 commit
  20. 02 Aug, 2016 1 commit
  21. 27 Jul, 2016 1 commit
  22. 26 Jul, 2016 2 commits