feat: track atomic memory access size#116
Open
mariaxarisi wants to merge 3 commits into
Open
Conversation
Introduces a new `coldtrace_atomic_access_entry` struct to record the exact byte size of atomic reads and writes in the binary trace files. - Extends atomic read/write trace entries from 16 to 24 bytes to include `size`. - Modifies TSan subscriber macros in `subs_tsan.c` to extract and serialize the size parameter. - Updates the `trace_dump.py` tool to correctly unpack the new 24-byte format and print the access size. Signed-off-by: mariaxarisi <maria.charisi@huawei.com>
Signed-off-by: mariaxarisi <maria.charisi@huawei.com>
Signed-off-by: mariaxarisi <maria.charisi@huawei.com>
ggeier
approved these changes
Jun 19, 2026
ggeier
left a comment
Collaborator
There was a problem hiding this comment.
please check the value placeholders comment, besides that, great addition!
|
|
||
| EXPECT_SOME(COLDTRACE_WRITE, 0, 1), | ||
| EXPECT_SOME(COLDTRACE_READ, 0, 1), | ||
| EXPECT_VALUE_SIZE(COLDTRACE_ATOMIC_WRITE, 5, sizeof(float)), |
Collaborator
There was a problem hiding this comment.
you're using 0..3 and 5..6, why?
Contributor
Author
There was a problem hiding this comment.
I just chose one number for each atomic variable, 0-3 for uint, 5 for float and 6 for double. Those values are just placeholders, right?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces the ability to trace the memory access size for atomic operations.
What Changed:
coldtrace_atomic_access_entrystructure to correctly save the size data.trace_aread_awrite_size) to verify that atomic sizes are captured correctly.Related Issue: