Detecting a stalled routine
DCFirst Claim
1. A method for detecting whether a routine has stalled, comprising:
- accessing existing code for a first routine;
automatically modifying said existing code by changing said existing code and adding new code; and
using said new code and said changed existing code to determine if said first routine has stalled, wherein said step of automatically modifying comprises;
adding object code for a timing mechanism to said existing code,adding a first instruction to said existing code for said first routine, said first instruction causes a starting of said timing mechanism for said first routine, said first instruction is object code, andadding a second instruction to said existing object code for said first routine, said second instruction causes a stopping of said timing mechanism for said first routine, said second instruction is object code.
3 Assignments
Litigations
0 Petitions
Accused Products
Abstract
A system is disclosed that can determine whether a routine is stalled. The system does not require the developer of the routine to add code for the purpose of detecting whether the routine is stalled. Furthermore, the system can be used to monitor various routines at different levels of granularity, such as at the thread level, method level, or other levels. One embodiment of the present invention allows a user to specify a method and an expected time frame. Code for that method is modified to add additional code that implements a timing mechanism. The timing mechanism is used to detect when a thread enters that method and does not return within an approximation of the expected time frame. Other embodiments are also within the scope of the present invention.
-
Citations
39 Claims
-
1. A method for detecting whether a routine has stalled, comprising:
-
accessing existing code for a first routine; automatically modifying said existing code by changing said existing code and adding new code; and using said new code and said changed existing code to determine if said first routine has stalled, wherein said step of automatically modifying comprises; adding object code for a timing mechanism to said existing code, adding a first instruction to said existing code for said first routine, said first instruction causes a starting of said timing mechanism for said first routine, said first instruction is object code, and adding a second instruction to said existing object code for said first routine, said second instruction causes a stopping of said timing mechanism for said first routine, said second instruction is object code. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A method for detecting whether a routine has stalled, comprising:
-
accessing existing code for a first routine; automatically modifying said existing code by changing said existing code and adding new and using said new code and said changed existing code to determine if said first routine has stalled, wherein said existing code is modified prior to starting execution of said existing code, said existing code is object code and said new code is object code; and receiving a user created rule, said rule identifies said first routine and an interval, said step of automatically modifying is performed in response to said rule, said first routine is considered to be stalled after a determination that said first routine has been running for at least as long as said interval.
-
-
11. A method for detecting whether a routine has stalled, comprising:
-
accessing existing code for a first routine; automatically modifying said existing code to include new code; and using said new code to determine if said first routine has stalled, said step of using comprises; receiving an indication that said first routine has started, starting a timing mechanism in response to said step of receiving, receiving an indication that said first routine has completed if said first routine has completed, stopping said timing mechanism in response to receiving said indication that said first routine has completed, accessing a current time, verifying that said first routine is not known to be stalled or completed, accessing a due time, determining whether due time is earlier than said current time, said timing mechanism is overdue if said due time is earlier than said current time, and reporting said first routine as stalled if said timing mechanism is not stopped prior to a determination that said timing mechanism is overdue.
-
-
12. A method for detecting whether a routine has stalled, comprising:
-
receiving an indication that a particular routine has started, said particular routine is one of a plurality of routines that comprise a process; starting a timing mechanism for said particular routine in response to said indication that said particular routine has started; calculating a due time based on a current time and a time interval; receiving an indication that said particular routine has completed, if said particular routine has completed; determining whether said indication that said particular routine has completed is provided prior to said due time, said indication that said particular routine has completed is overdue if provided after said due time; and reporting said particular routine as stalled if said indication that said particular routine has completed is not provided prior to being overdue. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19)
-
-
20. A method for detecting whether a routine has stalled, comprising:
-
receiving an indication that a particular routine has started, said particular routine is one of a plurality of routines that comprise a process; receiving an indication that said particular routine has completed, if said particular routine has completed; and reporting said particular routine as stalled if said indication that said particular routine has completed is not provided prior to being overdue, said particular routine is an instance of a defined routine, said step of reporting includes determining and reporting how many instances of said defined routine were stalled at a specified time.
-
-
21. A method for detecting whether a routine has stalled, comprising:
-
receiving an indication that a particular routine has started, said particular routine is one of a plurality of routines that comprise a process; receiving an indication that said particular routine has completed, if said particular routine has completed; and reporting said particular routine as stalled if said indication that said particular routine has completed is not provided prior to being overdue, said particular routine is an instance of a defined routine, said step of reporting includes receiving a customizable specified time period and reporting how many instances of said defined routine were stalled during said specified time period.
-
-
22. A method for detecting whether a method has stalled, comprising:
-
receiving an indication that a particular method of an object is running; automatically determining whether said method has stalled by detecting whether a thread entered said method and did not return within an approximation of an expected time frame; determining whether said particular method has been previously reported as being stalled; and changing said reporting to no longer indicate that said particular method is stalled if it is determined that said particular method has been reported as being stalled and said particular method is no longer stalled. - View Dependent Claims (23)
-
-
24. A method for detecting whether a routine has stalled, comprising the steps of:
-
receiving an indication that a first routine has started; starting a timing mechanism in response to said indication that said first routine has started; receiving an indication that said first routine has completed, if said first routine has completed; stopping said timing mechanism in response to receiving said indication that said first routine has completed; and reporting said first routine as stalled if said timing mechanism is not stopped prior to a determination that said timing mechanism is overdue, said first routine is an instance of a defined routine, said step of reporting includes incrementing a counter that represents a number of instances of said defined routine that are stalled and reporting said number of instances of said defined routine that are stalled. - View Dependent Claims (25, 26)
-
-
27. A method for detecting whether a routine has stalled, comprising the steps of:
-
receiving an indication that a first routine has started; starting a timing mechanism in response to said indication that said first routine has started; receiving an indication that said first routine has completed, if said first routine has completed; stopping said timing mechanism in response to receiving said indication that said first routine has completed; and reporting said first routine as stalled if said timing mechanism is not stopped prior to a determination that said timing mechanism is overdue, said first routine is an instance of a defined routine, said step of reporting includes receiving a customizable specified time period and reporting how many instances of said defined were stalled during said specified time period.
-
-
28. One or more processor readable storage devices having processor readable code embodied on said processor readable storage devices, said processor readable code for programming one or more processors to perform a method comprising:
-
accessing existing code for a first method; automatically modifying said existing code for said first method by changing said existing code and adding new code; and using said new code and said changed existing code to determine if said first method has stalled, wherein said step of automatically modifying comprises, adding object code for a timing mechanism to said existing code, adding a first instruction to said existing code for said first method, said first instruction causes a starting of said timing mechanism for said first method, said first instruction is object code, and adding a second instruction to said existing object code for said first method, said second instruction causes a stopping of said timing mechanism for said first method, said second instruction is object code. - View Dependent Claims (29, 30, 31)
-
-
32. An apparatus, comprising:
-
one or more storage devices; and one or more processors in communication with said one or more storage devices, said one or more processors perform a method comprising; accessing object code for a first routine, automatically changing said object code and adding new code, and using said changed object code and said new code to determine if said first routine has stalled, wherein said step of automatically modifying comprises, adding object code for a timing mechanism to said object code, adding a first instruction to said object code for said first routine, said first instruction causes a starting of said timing mechanism for said first routine, said first instruction is object code, and adding a second instruction to said object code for said first routine, said second instruction causes a stopping of said timing mechanism for said first routine, said second instruction is object code. - View Dependent Claims (33)
-
-
34. One or more processor readable storage devices having processor readable code embodied on said processor readable storage devices, said processor readable code for programming one or more processors to perform a method comprising:
-
receiving an indication that a particular routine has started; starting a timing mechanism for said particular routine in response to said indication that said particular routine has started; calculating a due time based on a current time and a time interval; receiving an indication that said particular routine has completed, if said particular routine has completed; determining if said indication that said particular routine has completed is provided prior to said due time, said indication that said particular routine has completed is overdue if provided after said due time; and reporting said particular routine as stalled if said indication that said particular routine has completed is not provided prior to being overdue.
-
-
35. One or more processor readable storage devices having processor readable code embodied on said processor readable storage devices, said processor readable code for programming one or more processors to perform a method comprising:
-
receiving an indication that a particular routine has started; receiving an indication that said particular routine has completed, if said particular routine has completed; and reporting said particular routine as stalled if said indication that said particular routine has completed is not provided prior to being overdue, said particular routine is an instance of a defined routine, said step of reporting includes incrementing a counter that represents a number of instances of said defined routine that are currently stalled and reporting said number of instances of said defined routine that are currently stalled.
-
-
36. An apparatus, comprising:
-
one or more storage devices; and one or more processors in communication with said one or more storage devices, said one or more processors perform a method comprising; receiving an indication that a particular routine is running, said particular routine is one of a plurality of routines that comprise a process, automatically determining that said particular routine has not stalled, determining that said particular routine has been previously reported as being stalled, and changing said reporting to no longer indicate that said particular routine is stalled. - View Dependent Claims (37, 38)
-
-
39. A method for detecting whether a routine has stalled, comprising:
-
receiving an indication that a particular routine has started, said particular routine is one of a plurality of routines that comprise a process; receiving an indication that said particular routine has completed, if said particular routine has completed; and reporting said particular routine as stalled if said indication that said particular routine has completed is not provided prior to being overdue, said particular routine is an instance of a defined routine, said step of reporting includes incrementing a counter that represents a number of instances of said defined routine that are currently stalled and reporting said number of instances of said defined routine that are currently stalled.
-
Specification