Multi-threaded break-point
First Claim
1. A method of synchronizing execution of a multi-thread program, comprising the computer-executed steps:
- executing the multi-thread program, wherein the multi-thread program comprises a plurality of threads;
halting execution of a first thread at a synchronization break-point;
while the first thread is halted, continuing execution of other of the plurality of threads that have not yet reached the synchronization break-point;
thereafter determining that a synchronization break condition has been satisfied, while said first thread remains halted, wherein said synchronization break condition includes at least one condition from the set consisting of;
(a) determining that a pre-determined number of the plurality of threads have reached the synchronization break-point, (b) determining that a pre-determined amount of time has elapsed since said first thread reached the synchronization break-point, and (c) determining that a user-specified thread has reached the synchronization break-point; and
responsive to determining that a synchronization break condition has been satisfied, halting execution of all threads of said multi-thread program.
1 Assignment
0 Petitions
Accused Products
Abstract
A way to synchronize threads in a multi-threaded program. In the preferred embodiment, a debugger provides a break-point that does not interrupt the user when the first thread reaches it; instead, the debugger halts this thread at the break-point and waits for other threads to accumulate at the break-point before the debugger notifies the user. The user can specify a condition under which this notification should occur; for example, when a specific thread or a certain number of threads have accumulated at the break-point. Once the condition is satisfied, the debugger suspends other threads that have not reached the break-point. The debugger then provides for synchronized stepping or running of the threads that are halted at the break-point.
171 Citations
32 Claims
-
1. A method of synchronizing execution of a multi-thread program, comprising the computer-executed steps:
-
executing the multi-thread program, wherein the multi-thread program comprises a plurality of threads;
halting execution of a first thread at a synchronization break-point;
while the first thread is halted, continuing execution of other of the plurality of threads that have not yet reached the synchronization break-point;
thereafter determining that a synchronization break condition has been satisfied, while said first thread remains halted, wherein said synchronization break condition includes at least one condition from the set consisting of;
(a) determining that a pre-determined number of the plurality of threads have reached the synchronization break-point, (b) determining that a pre-determined amount of time has elapsed since said first thread reached the synchronization break-point, and (c) determining that a user-specified thread has reached the synchronization break-point; and
responsive to determining that a synchronization break condition has been satisfied, halting execution of all threads of said multi-thread program. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
halting any of the other threads that subsequently reach the synchronization break-point before said step of determining that a break condition has been satisfied.
-
-
3. The method of claim 1, wherein the break condition further comprises:
determining that a pre-determined number of the plurality of threads have reached the synchronization break-point.
-
4. The method of claim 3, wherein the predetermined number is user-specified.
-
5. The method of claim 1, wherein the break condition further comprises:
determining that a pre-determined amount of time has elapsed since said first thread reached the synchronization break-point.
-
6. The method of claim 5, wherein the pre-determined amount of time is user-specified.
-
7. The method of claim 1, wherein the break condition further comprises:
determining that a user-specified thread has reached the synchronization break-point.
-
8. The method of claim 1, further comprising:
executing a next statement after the synchronization break-point in a last thread that was halted.
-
9. The method of claim 1, further comprising:
executing a next statement after the synchronization break-point in all threads that were halted.
-
10. The method of claim 1, further comprising:
resuming execution of the other threads that have not reached the synchronization break-point.
-
11. An apparatus comprising:
-
a processor;
a memory coupled to the processor;
a multi-threaded program resident in memory and executing on the processor, the program comprising a plurality of threads; and
a debug controller, resident in the memory and executing on the processor, wherein the debug controller is configured to execute a portion of the multi-threaded program for debugging, wherein the debug controller, when read and executed by the processor, comprises steps of;
executing the multi-thread program, wherein the multi-thread program comprises a plurality of threads, halting execution of a first thread at a synchronization break-point, while the first thread is halted, continuing execution of other of the plurality of threads that have not yet reached the synchronization break-point;
thereafter determining that a synchronization break condition has been satisfied, while said first thread remains halted, wherein said synchronization break condition includes at least one condition from the set consisting of;
(a) determining that a pre-determined number of the plurality of threads have reached the synchronization break-point, (b) determining that a pre-determined amount of time has elapsed since said first thread reached the synchronization break-point, and (c) determining that a user-specified thread has reached the synchronization break-point; and
responsive to determining that a synchronization break condition has been satisfied, halting execution of all threads of said multi-threaded program. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20, 21)
halting any of the other threads that subsequently reach the synchronization break-point before said step of determining that a break condition has been satisfied.
-
-
13. The apparatus of claim 11, wherein the break condition further comprises:
determining that a pre-determined number of the plurality of threads have reached the synchronization break-point.
-
14. The apparatus of claim 13, wherein the predetermined number is user-specified.
-
15. The apparatus of claim 11, wherein the break condition further comprises:
determining that a pre-determined amount of time has elapsed since said first thread reached the synchronization break-point.
-
16. The apparatus of claim 15, wherein the pre-determined amount of time is user-specified.
-
17. The apparatus of claim 11, wherein the break condition further comprises:
determining that a user-specified thread has reached the synchronization break-point.
-
18. The apparatus of claim 11, further comprising:
executing a next statement after the synchronization break-point in a last thread that was halted.
-
19. The apparatus of claim 11, further comprising:
executing a next statement after the synchronization break-point in all threads that were halted.
-
20. The apparatus of claim 11, further comprising:
resuming execution of the other threads that have not reached the synchronization break-point.
-
21. The apparatus of claim 11, further comprising a break-point table, wherein the break-point table defines the synchronization break-points.
-
22. A program product, comprising:
-
a debug controller configured to execute a portion of multi-thread program for debugging, the program comprising a plurality of threads, and the debug controller is configured to execute a portion of the multi-threaded program for debugging, wherein the debug controller, when read and executed by the processor, comprises steps of;
executing the multi-thread program, wherein the multi-thread program comprises a plurality of threads, halting execution of a first thread at a synchronization break-point, while the first thread is halted, continuing execution of other of the plurality of threads that have not yet reached the synchronization break-point;
thereafter determining that a synchronization break condition has been satisfied, while said first thread remains halted, wherein said synchronization break condition includes at least one condition from the set consisting of;
(a) determining that a pre-determined number of the plurality of threads have reached the synchronization break-point, (b) determining that a predetermined amount of time has elapsed since said first thread reached the synchronization break-point, and (c) determining that a user-specified thread has reached the synchronization break-point; and
; and
responsive to determining that a break condition has been satisfied, halting execution of all threads of said multi-thread program. - View Dependent Claims (23, 24, 25, 26, 27, 28, 29, 30, 31, 32)
halting any of the other threads that subsequently reach the synchronization break-point before said step of determining that a break condition has been satisfied.
-
-
24. The program product of claim 22, wherein the break condition further comprises:
determining that a pre-determined number of the plurality of threads have reached the synchronization break-point.
-
25. The program product of claim 24, wherein the predetermined number is user-specified.
-
26. The program product of claim 22, wherein the break condition further comprises:
determining that a pre-determined amount of time has elapsed since said first thread reached the synchronization break-point.
-
27. The program product of claim 26, where in the pre-determined amount of time is user-specified.
-
28. The program product of claim 22, wherein the break condition further comprises:
determining that a user-specified thread has reached the synchronization break-point.
-
29. The program product of claim 22, further comprising:
executing a next statement after the synchronization break-point in a last thread that was halted.
-
30. The program product of claim 22, further comprising:
executing a next statement after the synchronization break-point in all threads that were halted.
-
31. The program product of claim 22, further comprising:
resuming execution of the other threads that have not reached the synchronization break-point.
-
32. The program product of claim 22, further comprising a break-point table, wherein the break-point table defines the synchronization break-point.
Specification