1. A method for detecting false sharing, the method comprising: running code on a plurality of cores, wherein the code comprises a first instrumentation, and wherein running the code on the plurality of cores comprises: fetching, by a first core of the plurality of cores from a main memory, a first cache line; storing the first cache line in a first cache of a plurality of cache lines; fetching, by a second core of the plurality of cores from the main memory, a second cache line; and storing the second cache line in a second cache of the plurality of cache lines; tracking cache invalidations in the code while running the code to produce tracked invalidations in accordance with the first instrumentation, wherein tracking the cache invalidations comprises: tracking a number of write accesses to the plurality of cache lines; determining whether to track cache accesses to the plurality of cache lines in accordance with the number of write accesses; and tracking cache accesses to the plurality of cache lines by a plurality of tasks in response to determining to track cache accesses; and reporting false sharing in accordance with the tracked invalidations to produce a false sharing report.