[roll] Roll fuchsia [kernel] Add writes_enabled_ to KTrace

Adds a writes_enabled_ boolean that keeps track of whether writes are
currently enabled. Also adds methods to Enable and Disable writes.

The method to DisableWrites is a bit tricky, since it performs two
separate functions:
1. It sets writes_enabled_ to false; this is pretty straightforward.
2. It disables interrupts on the current core. This prevents the
   current thread from being migrated across CPUs. We could potentially
   suffice with disabling preemption, but the mp_sync_exec target we
   use requires interrupts to be disabled.
2. It sends an IPI to every other core and waits for it to return. Since
   writes occur with interrupts disabled, a core's ability to process
   an IPI can be taken as evidence that it is not currently writing
   a trace record. Furthermore, mp_sync_exec issues a memory barrier,
   ensuring that any future attempt to write to the trace buffer
   correctly sees that writes are disabled.

Original-Bug: 404539312
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1249205
Original-Revision: d64c1571f4db525fb3bafa8b8f0ddd73220baa5d
GitOrigin-RevId: 09355b958f31ca0f0d86e82038aefccc321644a4
Change-Id: Ic92f66555918247e09636de73c7a1f9d3c5f50f6
1 file changed
tree: a0d4346670209143517b20561ff67461c5be4e72
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cts
  6. firmware
  7. flower
  8. jiri.lock
  9. MILESTONE
  10. minimal
  11. prebuilts
  12. README.md
  13. stem
  14. test_durations
  15. 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 in one of the communication channels documented at get involved.

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.