-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix TSAN error by adding some indirection to TableItem.
We have taken a lot of care to make sure that we always makes safe use of the TableItem even though it is accessed from multiple threads at once. These accesses includes modificiations of the `priority` and `times_sampled` field which was assumed to be safe as these fields are guaranteed not to be read at the same time as they are changed. HOWEVER, turns out that modifying a single field within a proto actualy invalidates all the fields of the proto so the field access we are doing is not actually safe. This CL modifies TableItem so that it provides read access to the static fields and then keeps the mutable fields isolated from the rest of the proto. This means that we can modify these two fields while concurrently reading from the remaining fields without risking data races. PiperOrigin-RevId: 549590469 Change-Id: Ia369082aba22ea5d78f6c5095c7f89e18219c642
- Loading branch information
1 parent
190eae0
commit 33aba4e
Showing
12 changed files
with
267 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.