There is provided a computer-implemented method of performing ownership acquire policy selection. The method includes compiling an atomic section to generate an instrumented executable. The instrumented executable is configured to generate a runtime abort graph describing a plurality of computer memory accesses made by the instrumented executable. The method also includes selecting each of a plurality of policies based on the runtime abort graph. The plurality of policies include a first policy and a second policy. The first policy is different from the second policy. The method further includes compiling the atomic section to generate a modified executable. The modified executable is configured to perform the computer memory accesses according to the selected policies.
展开▼