[roll] Roll fuchsia [trace-engine] Use release/acquire for rolling_buffer_current_

When tracing in streaming mode, the buffer number being used is
stored in rolling_buffer_current_, but the status of a buffer being
filled is stored separately. At a buffer swap, the filled status is
cleared and then rolling_buffer_current_ is updated to point to the new
buffer, but with relaxed memory ordering another thread could observe
the second write without the first.

That would cause the second thread to believe the new buffer is already
full and trigger an unwanted buffer transfer, which would result in the
previous contents being transferred a second time along with likely many
dropped records.

Using release/acquire ordering ensures that the threads that observe the
new value of rolling_buffer_current_ also observe the new value of the
filled status, i.e. that the buffer is not immediately full.

FIXES: b/294082351
TEST: Starnix boot test with fxrev.dev/891233 included, observe that
trace does not include duplicated events (though depending on buffer
size it may still have some dropped events).

Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/895984
Original-Revision: a0f556eced11ec0d939babbaf20f604d906ccd2b
GitOrigin-RevId: f8227ff3662c862423869601e14cfe0eaa650ccc
Change-Id: I430d2ae0b64e0d9e0112e0a3139a774766358465
1 file changed
tree: 602916a3ddfb2951ace7fc8c39d8ed273c8581e9
  1. git-hooks/
  2. infra/
  3. third_party/
  4. cts
  5. firmware
  6. flower
  7. jiri.lock
  8. MILESTONE
  9. minimal
  10. prebuilts
  11. README.md
  12. stem
  13. test_durations
  14. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.