ENHANCED THREAD STEPPING
First Claim
1. A computer implemented method for debugging a multithreaded program, comprising:
- receiving a first request to execute a current line of code for a first thread of the multithread program actively being debugged, wherein executing the current line of code requires access, by the first thread, to a shared resource shared by a plurality of threads of the multithreaded program;
initiating a debug timer with a first predetermined time limit; and
upon determining that the debug timer expires before the current line of code in the first thread is executed by the debugger;
recording an indication that the debug timer expired for the first thread while waiting for access to the shared resource, andreducing the amount of time reflected by the first predetermined time limit.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments of the invention provide debugging techniques for multithreaded programs. For example, a debugger may reduce the time required to release inactive threads that hold resources needed by an active thread. For example, if a timer expires before a line of code finishes executing, the debugger assumes that the active thread requires a resource locked by an inactive thread and releases other threads. During subsequent execution of the line of code, the debugger reduces the timer length of the timer. In doing so, inactive threads are released sooner, thereby reducing the wait time a user experiences when debugging lines of code.
55 Citations
20 Claims
-
1. A computer implemented method for debugging a multithreaded program, comprising:
-
receiving a first request to execute a current line of code for a first thread of the multithread program actively being debugged, wherein executing the current line of code requires access, by the first thread, to a shared resource shared by a plurality of threads of the multithreaded program; initiating a debug timer with a first predetermined time limit; and upon determining that the debug timer expires before the current line of code in the first thread is executed by the debugger; recording an indication that the debug timer expired for the first thread while waiting for access to the shared resource, and reducing the amount of time reflected by the first predetermined time limit. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer implemented method for debugging a multithreaded program, comprising:
-
receiving a first request to execute a current line of code for a first thread of the multithread program actively being debugged, wherein executing the current line of code requires access, by the first thread, to a shared resource shared by a plurality of threads of the multithreaded program; prior to the executing the current line of code, receiving a message that a second thread has exclusive access to the shared resource, wherein the second thread is suspended from being scheduled for execution as a result of the first thread actively being debugged; releasing at least the second thread for execution; executing the second thread at least until the shared resource is freed by the second thread; accessing, by the first thread being actively debugged, the shared resource; and subsequently, executing the line of code for the first thread.
-
-
9. A computer readable storage medium containing a program, which, when executed performs an operation for debugging a multithreaded program, the operation comprising:
-
receiving a first request to execute a current line of code for a first thread of the multithread program actively being debugged, wherein executing the current line of code requires access, by the first thread, to a shared resource shared by a plurality of threads of the multithreaded program; initiating a debug timer with a first predetermined time limit; and upon determining that the debug timer expires before the current line of code in the first thread is executed by the debugger; recording an indication that the debug timer expired for the first thread while waiting for access to the shared resource, and reducing the amount of time reflected by the first predetermined time limit. - View Dependent Claims (10, 11, 12, 13, 14, 15)
-
-
16. A system, comprising:
-
a processor; and a memory containing a debugging program, which when executed by the processor performs an operation for debugging a multithreaded program, the operation comprising; receiving a first request to execute a current line of code for a first thread of the multithread program actively being debugged, wherein executing the current line of code requires access, by the first thread, to a shared resource shared by a plurality of threads of the multithreaded program, initiating a debug timer with a first predetermined time limit, and upon determining that the debug timer expires before the current line of code in the first thread is executed by the debugger; recording an indication that the debug timer expired for the first thread while waiting for access to the shared resource; reducing the amount of time reflected by the first predetermined time limit; and releasing at least a second thread, of the plurality, for execution wherein the second thread has exclusive access to the shared resource. - View Dependent Claims (17, 18, 19, 20)
-
Specification