[roll] Roll fuchsia [kernel][ktrace] Fix race condition in ktrace record creation

This change fixes a bug in ktrace that could manifest as a failed
debug assert.  See fxbug.dev/120711 for details.

Remove unused PendingCommit::observed_grpmask_ field.

Replace grpmask_and_inflight_writes_ with a new field, write_state_
that encodes both the in-flight count and a writes-enabled bit.
Because we emit group-less name records at trace initialization, group
mask alone is insufficient to control whether writes are enabled.

Move the group mask into its own dedicated atomic field that's checked
by writers before attempting to increment.

Change KTraceState::IncPendingWrite to only increment if writes are
enabled and return false otherwise.  KTraceState::Reserve will now
fail with ZX_ERR_BAD_STATE if called when tracing is stopped.

Original-Fixed: 120711
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/801688
Original-Revision: 20911e10ff06d2a1563749e1cd92a4a4f65314a2
GitOrigin-RevId: bacf0b546faecbfa296dc29a95b011e285cf0656
Change-Id: I315d5c09cf52a11d4a6b2bade60099529d91e4fb
1 file changed
tree: 0d8250b3f6a94ac706b14f22e49cefbbed6fea38
  1. git-hooks/
  2. infra/
  3. third_party/
  4. cts
  5. firmware
  6. flower
  7. jiri.lock
  8. minimal
  9. prebuilts
  10. README.md
  11. stem
  12. test_durations
  13. 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.