1. A computer-implemented method of building a context-aware communication graph, the method comprising: detecting an access of a memory location by a first instruction of a first thread; updating a context associated with the first thread; and in response to determining that a second instruction of a second thread different from the first thread was a last thread to write to the memory location: adding an edge to the context-aware communication graph, the edge including the context associated with the first thread, a sink identifying the first instruction, a source identifying the second instruction, and a context associated with the second thread.