Open GoogleCodeExporter opened 9 years ago
can we do it w/o a specific knowledge about the function "write"?
Original comment by konstant...@gmail.com
on 11 Apr 2012 at 1:00
> can we do it w/o a specific knowledge about the function "write"?
Yes, we can. I just meant initialization of addressable variables (the write is
solely to make it addressable).
Even if a var is addressable, initialization can't race, because it's address
it not yet taken.
Actually some other subsequent accesses may not be instrumented as well. For
example:
int x = 0; // store, can't race
...
x++; // store, can't yet race
...
write(..., &x); // only here it actually becomes "addressable"
...
x++; // store, this one can race
However, it will require more complex flow analysis, and it's not clear what
gain it will provide (if any). So that second part is
optional/low-prio/abandoned. However, the first part (int x = 0) must be easy
to do and can provide visible gain.
Original comment by dvyu...@google.com
on 11 Apr 2012 at 7:17
Original issue reported on code.google.com by
dvyu...@google.com
on 7 Apr 2012 at 12:52