Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide multiple options for trading off concurrent intra-word initial write fidelity with memory and performance #271

Open
derekbruening opened this issue Nov 28, 2014 · 3 comments

Comments

@derekbruening
Copy link
Contributor

From [email protected] on January 14, 2011 16:38:34

packing 2 shadow bits together results in a race if two threads access
adjacent bytes within the same word. this would only be a problem if the
bytes are unintialized and the two threads both write to them: one could
end up remaining uninitialized, leading to false positives

ways to eliminate the race:
a) lock around multi-op for sub-word access in multi-threaded app ("lock
bts" and "lock btr": pretty expensive)
b) byte-to-byte shadowing
c) thread serialization
d) hybrid mapping? but would need sub-word info for majority of memory?

I plan to implement a series of choices for multi-threaded:

  1. byte-to-byte: no races but 4x as much memory; suitable for 64-bit and
    many 32-bit apps.
    byte-to-byte should give some perf improvements too.
    dynamic byte-to-byte, switch to 2-bit synch if run out of mem?
  2. byte-to-2-bits with synch (probably thread serialization):
    no races but slow; suitable for those 32-bit apps that care about both
    races and memory
  3. byte-to-2-bits with no synch: my current impl, suitable for apps that
    want to save memory but aren't worried about potential false negatives
    from concurrent intra-word initial writes

for byte-to-byte register shadows need more TLS: should do DR TLS stuff
first so no resource limits on Windows

Original issue: http://code.google.com/p/drmemory/issues/detail?id=271

@derekbruening
Copy link
Contributor Author

From [email protected] on January 14, 2011 13:47:21

that should be "potential false positives" in #3

@derekbruening
Copy link
Contributor Author

From [email protected] on June 03, 2014 06:50:41

Issue 1557 has been merged into this issue.

@derekbruening
Copy link
Contributor Author

From [email protected] on June 03, 2014 06:52:50

Issue 1557 has been merged into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant