[roll] Roll fuchsia [kernel][tracing] Fix an issue with mutex spin-tracing.

Fix an issue with kernel spin-tracing used to instrument the spin
phase of adaptive mutexes which could cause the "blocked-after" flag
to be incorrectly reported.

After a thread gives up on spinning on an adaptive mutex, if
spin-tracing is enabled in the build, the thread logs a trace record
indicating how much time was spent spinning on the mutex before it
gave up and decided to block.  There is a flag associated with this
recorded called "blocked-after" which indicates whether or not the
thread needed to become blocked after the spin phase in order to
obtain the mutex.

In the past, if the thread managed to acquire the mutex during the
spin phase, the flag would be clear (no block was needed) and set
otherwise.  The trouble with this approach is that after the thread
gives up on spinning, it needs to obtain the global thread lock before
it actually blocks, and once inside the lock, it makes one final
attempt to obtain the mutex before blocking.  If it succeeds at this
point, it does not actually block, even though the spin-contention
trace event it just produced says that it will block.

Change the code to record the time at which the spinning behavior
ended, but don't actually mark whether the thread "blocked after"
until after we have entered the GTL and determined if we are actually
going to block.

Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/952691
Original-Revision: 671533c2cc473a2b17e4323961202f1b6c217576
GitOrigin-RevId: e99cd63817a66c216fb3d1db6dc20ca9b8a32065
Change-Id: I69c847c51d030a265778dc0b27898dcebeaf7d2b
1 file changed
tree: 921854068d52f6b5c3bcb248d4c01ec1b6da2002
  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.