Patent ID: 9569341
Date: 2017-02-14
CPC Classifications: G06F

Claim:
1. A computer-implemented method for prioritizing function execution, the method comprising: identifying a plurality of selected functions and a plurality of other functions that are reachable from one or more of the selected functions, the selected functions and the plurality of other functions that are reachable from one or more of the selected functions being defined in source code of a subject snapshot of a code base; obtaining data representing a call graph of the source code of the code base, wherein the call graph has nodes and directed links, each node representing a function in the source code, and wherein each link between each pair of nodes represents that a first function of the pair calls a second function of the pair; automatically computing, for each selected function of the plurality of selected functions, a respective associated first set of reachable functions, each function of the first set of reachable functions being reachable from the selected function along a path in the call graph having at most N steps, wherein N is a predetermined constant representing a minimum number of steps within the call graph; automatically computing, for each selected function of the plurality of selected functions, a respective associated second set of reachable functions, each function of the second set of reachable functions being reachable from the selected function along a path in the call graph having more than N steps and less than M steps, wherein M is a predetermined constant representing a maximum number of steps within the call graph and wherein M is 2 or more steps larger than N; identifying a plurality of subject functions in the subject snapshot; automatically computing a first partition D1 having all selected functions whose respective associated first set of reachable functions has at least one of the subject functions; and automatically computing a second partition D2 having selected functions not in D1 and whose respective associated second set of reachable functions has at least one of the subject functions; automatically assigning the selected functions belonging to D1 a higher priority than the selected functions belonging to D2; and automatically executing the functions belonging to D1 in an order based on respective priorities assigned to the functions belonging to D1, wherein assigning the higher priority to the functions belonging to D1 specifies that all functions of D1 will be executed before any functions belonging to D2 are executed.