Enhancing weak consistency
First Claim
1. A method to discover errors in a parallel application comprising a plurality of threads executed on a computing system, comprising:
- scanning, by a debugger, a program code of the parallel application;
setting a respective breakpoint in the program code of the parallel application at each;
(i) sync instruction in the program code, and (ii) instruction determined to stall execution of the program code, wherein the debugger is configured to switch execution from a first thread of the plurality of threads of the parallel application to a second thread of the plurality of threads of the parallel application upon encountering one of the breakpoints in the program code;
executing, by the debugger, the first thread comprising;
upon determining that a first instruction in the first thread specifies to store a first value at a first memory address;
setting a current value stored in the first memory address as an old value for the first memory address in a container for the first thread;
executing the first instruction to store the first value at the first memory address; and
setting the first value as a new value for the first memory address in the container for the first thread, wherein the container for the first thread specifies a new value and an old value for each of a plurality of memory addresses including the first memory address; and
executing, by the debugger, a second thread, comprising;
restoring each old value for the plurality of memory addresses in the container for the first thread to the respective memory address specified in the container for the first thread; and
restoring a new value for each of a plurality of memory addresses specified in a container for the second thread to the respective memory address specified in the container for the second thread.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods to discover weak consistency errors in an application, by executing, by a debugger, a first thread of the application, by, determining that a first instruction in the first thread specifies to store a first value at a first memory address, setting a current value stored in the first memory address as an old value for the first memory address in a container for the first thread, executing the first instruction to store the first value at the first memory address, and setting the first value as a new value for the first memory address in the container for the first thread. The debugger then executes a second thread of the application, by restoring old values in the containers for all other threads and restoring a new value for each memory address specified in a container for the second thread to its respective memory address.
-
Citations
7 Claims
-
1. A method to discover errors in a parallel application comprising a plurality of threads executed on a computing system, comprising:
-
scanning, by a debugger, a program code of the parallel application; setting a respective breakpoint in the program code of the parallel application at each;
(i) sync instruction in the program code, and (ii) instruction determined to stall execution of the program code, wherein the debugger is configured to switch execution from a first thread of the plurality of threads of the parallel application to a second thread of the plurality of threads of the parallel application upon encountering one of the breakpoints in the program code;executing, by the debugger, the first thread comprising; upon determining that a first instruction in the first thread specifies to store a first value at a first memory address; setting a current value stored in the first memory address as an old value for the first memory address in a container for the first thread; executing the first instruction to store the first value at the first memory address; and setting the first value as a new value for the first memory address in the container for the first thread, wherein the container for the first thread specifies a new value and an old value for each of a plurality of memory addresses including the first memory address; and executing, by the debugger, a second thread, comprising; restoring each old value for the plurality of memory addresses in the container for the first thread to the respective memory address specified in the container for the first thread; and restoring a new value for each of a plurality of memory addresses specified in a container for the second thread to the respective memory address specified in the container for the second thread. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
Specification