]> git.ipfire.org Git - thirdparty/gcc.git/commit
gcov: Fix counter update method selection
authorSebastian Huber <sebastian.huber@embedded-brains.de>
Mon, 29 Dec 2025 23:41:38 +0000 (00:41 +0100)
committerSebastian Huber <sebastian.huber@embedded-brains.de>
Tue, 6 Jan 2026 23:23:50 +0000 (00:23 +0100)
commitbd0d3ba672870be1dfd5b58ddd0dbb95b4f80c04
tree883f2aef3fa77d513f4c0b1d8719e2e238ef73a2
parent8cd878a2f0a56059cac99c260771c283091d0601
gcov: Fix counter update method selection

The counter update method selection had some issues.

For PROFILE_UPDATE_ATOMIC, if atomic updates are not supported, then
fallback to single mode, however, use partial atomic updates if
available.  Issue warnings.

For PROFILE_UPDATE_PRFER_ATOMIC, if atomic updates are not supported,
then fallback to single mode, however, use partial atomic updates if
available.  Do not issue warnings.

gcc/ChangeLog:

* tree-profile.cc (tree_profiling): Do not use atomic operations
if they are not available.  Try to use at least partial atomic
updates as a fallback.
gcc/tree-profile.cc