IP Library Granted Patent US 11,093,368
Granted Patent B2
US 11,093,368 · App. 16/743,903 · Granted Aug 17, 2021

Diffing a subject replayable execution trace against a comparison replayable execution trace

Inventor: Jordi Mola (Bellevue, WA)
Assignee: MICROSOFT TECHNOLOGY LICENSING, LLC
G06F11/3636G06F11/302G06F11/3466G06F11/3648G06F11/3664
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,093,368
App. No.
16/743,903
Granted
Aug 17, 2021
Kind
B2
Abstract

Diffing a subject replayable trace against a comparison replayable trace includes identifying a first plurality of functions within a first sequence of instructions recorded in the subject trace, and identifying a second plurality of functions a second sequence of instructions recorded in the comparison trace. A first plurality of groups of the first plurality of functions, and a second plurality of groups of the second plurality of functions are identified. The first and second pluralities of groups are compared, including determining, based on an identity of each group, and on function(s) corresponding to the group, if each first group in the first plurality of groups is at least one of: equal to a second group in the second plurality of groups, a replacement of a second group in the second plurality of groups, deleted from the second plurality of groups, or inserted into the second plurality of groups.

Claims (62)

1. A method, implemented at a computer system that includes at least one processor, for diffing a subject replayable execution trace against a comparison replayable execution trace, the method comprising:

accessing a first subject replayable execution trace which represents a first sequence of executable instructions that executed as part of a first executing entity, and accessing a second comparison replayable execution trace which represents a second sequence of executable instructions that executed as part of a second executing entity;

identifying a first plurality of functions within the first sequence of executable instructions, and identifying a second plurality of functions within the second sequence of executable instructions, each function corresponding to a sequence of one or more executable instructions that executed as part of the function;

identifying a first plurality of groups of the first plurality of functions, and identifying a second plurality of groups of the second plurality of functions, each group comprising a sequence of one or more related functions;

comparing the first plurality of groups and the second plurality of groups, including determining, based on an identity of each group and on one or more functions corresponding to the group, if each first group in the first plurality of groups is at least one of:

equal to a second group in the second plurality of groups;

a replacement of a second group in the second plurality of groups;

deleted from the second plurality of groups; or

inserted into the second plurality of groups; and

providing one or more indicia of a result of the comparing to a software component at the computer system, or to an other computer system, the one or more indicia indicating whether each first group is at least one of equal to a second group in the second plurality of groups, a replacement of a second group in the second plurality of groups, deleted from the second plurality of groups, or inserted into the second plurality of groups.

2. The method of claim 1 , wherein the first executing entity and the second executing entity executed from common executable code.

3. The method of claim 1 , further comprising determining whether a first function corresponding to a first group of the first plurality of groups executes equivalently to a second function corresponding to a second group of the second plurality of groups.

4. The method of claim 3 , wherein determining whether the first function executes equivalently to the second function comprises:

identifying zero or more first inputs to the first function and one or more first outputs from the first function, and identifying zero or more second inputs to the second function and one or more second outputs from the second function; and

replaying the second function based on supplying the second function with the zero or more first inputs to generate one or more third outputs, and replaying the first function based on supplying the first function with the zero or more second inputs to generate one or more fourth outputs; and

comparing the first outputs with the third outputs, and comparing the second outputs with the fourth outputs.

5. The method of claim 1 , wherein,

each group corresponds to one of a library, a module, a namespace, or a class; and

each related function executed as part of the corresponding library, module, namespace, or class.

6. The method of claim 1 , wherein the first plurality of groups comprises a first plurality of first-level groups, and wherein the second plurality of groups comprises a second plurality of first-level groups, the method further comprising:

identifying a first plurality of second-level groups of the first plurality of first-level groups, and identifying a second plurality of second-level groups of the second plurality of first-level groups, each second-level group corresponding to one of a library, a module, a namespace, or a class and comprising a sequence of one or more first-level groups grouping functions that executed as part of the corresponding library, module, namespace, or class.

7. The method of claim 1 , wherein identifying the first plurality of functions and identifying the second plurality of functions comprises identifying, for each function of the first plurality and second plurality of functions, at least one of a function name, a function parameter name, a function parameter type, or a function parameter count.

8. The method of claim 1 , wherein comparing the first plurality of groups and the second plurality of groups comprises:

creating a first plurality of objects each representing one of the first plurality of groups, and creating a second plurality of objects each representing one of the second plurality of groups, each object identifying the group and one or more corresponding functions of the group; and

applying a differencing algorithm between the first plurality of objects and the second plurality of objects.

9. The method of claim 8 , wherein each object identifies a group and a plurality of corresponding functions of the group, the plurality of corresponding functions ordered in an execution order.

10. The method of claim 9 , wherein each plurality of corresponding functions includes only a first function and a last function that executed in the execution order.

11. The method of claim 1 , wherein, when comparing the first plurality of groups and the second plurality of groups, the comparison weights an identity of each group differently than an identity of at least one function corresponding to the group.

12. The method of claim 1 , further comprising, when comparing the first plurality of groups and the second plurality of groups, applying one or more transformations to at least a subset of at least one of the first replayable execution trace or the second replayable execution trace.

13. The method of claim 1 , wherein comparing the first plurality of groups and the second plurality of groups comprises comparing at least one of a function parameter name, a function parameter type, or a function parameter count.

14. The method of claim 1 , wherein providing the one or more indicia of the result of the determining causes the software component at the computer system, or the other computer system, to present the result of the determining at a user interface.

15. The method of claim 14 , wherein the presenting the result of the comparing comprises visually collapsing a sequence of the first plurality of groups that are not equal to second groups in the second plurality of groups.

16. A computer system, comprising:

at least one processor; and

one or more computer-readable media having stored thereon computer-executable instructions that are executable by the at least one processor to cause the computer system to diff a subject replayable execution trace against a comparison replayable execution trace, the computer-executable instructions including instructions that are executable by the at least one processor to cause the computer system to at least:

access a first subject replayable execution trace which represents a first sequence of executable instructions that executed as part of a first executing entity, and access a second comparison replayable execution trace which represents a second sequence of executable instructions that executed as part of a second executing entity;

identify a first plurality of functions within the first sequence of executable instructions, and identify a second plurality of functions within the second sequence of executable instructions, each function corresponding to a sequence of one or more executable instructions that executed as part of the function;

identify a first plurality of groups of the first plurality of functions, and identify a second plurality of groups of the second plurality of functions, each group comprising a sequence of one or more related functions;

compare the first plurality of groups and the second plurality of groups, including determining, based on an identity of each group and on one or more functions corresponding to the group, if each first group in the first plurality of groups is at least one of:

equal to a second group in the second plurality of groups;

a replacement of a second group in the second plurality of groups;

deleted from the second plurality of groups; or

inserted into the second plurality of groups; and

provide one or more indicia of a result of the comparing to a software component at the computer system, or to an other computer system, the one or more indicia indicating whether each first group is at least one of equal to a second group in the second plurality of groups, a replacement of a second group in the second plurality of groups, deleted from the second plurality of groups, or inserted into the second plurality of groups.

17. The computer system of claim 16 , the computer-executable instructions also including instructions that are executable by the at least one processor to cause the computer system to determine whether a first function corresponding to a first group of the first plurality of groups executes equivalently to a second function corresponding to a second group of the second plurality of groups, including:

identifying zero or more first inputs to the first function and one or more first outputs from the first function, and identifying zero or more second inputs to the second function and one or more second outputs from the second function; and

replaying the second function based on supplying the second function with the zero or more first inputs to generate one or more third outputs, and replaying the first function based on supplying the first function with the zero or more second inputs to generate one or more fourth outputs; and

comparing the first outputs with the third outputs, and comparing the second outputs with the fourth outputs.

18. The computer system of claim 16 , wherein comparing the first plurality of groups and the second plurality of groups comprises:

creating a first plurality of objects each representing one of the first plurality of groups, and creating a second plurality of objects each representing one of the second plurality of groups, each object identifying the group and one or more corresponding functions of the group; and

applying a differencing algorithm between the first plurality of objects and the second plurality of objects.

19. The computer system of claim 16 , the computer-executable instructions also including instructions that are executable by the at least one processor to cause the computer system to, when comparing the first plurality of groups and the second plurality of groups, applying one or more transformations to at least a subset of at least one of the first replayable execution trace or the second replayable execution trace.

20. A computer program product comprising one or more hardware storage devices having stored thereon computer-executable instructions that are executable by at least one processor to cause a computer system to diff a subject replayable execution trace against a comparison replayable execution trace, the computer-executable instructions including instructions that are executable by the at least one processor to cause the computer system to at least:

access a first subject replayable execution trace which represents a first sequence of executable instructions that executed as part of a first executing entity, and access a second comparison replayable execution trace which represents a second sequence of executable instructions that executed as part of a second executing entity;

identify a first plurality of functions within the first sequence of executable instructions, and identify a second plurality of functions within the second sequence of executable instructions, each function corresponding to a sequence of one or more executable instructions that executed as part of the function;

identify a first plurality of groups of the first plurality of functions, and identify a second plurality of groups of the second plurality of functions, each group comprising a sequence of one or more related functions;

compare the first plurality of groups and the second plurality of groups, including determining, based on an identity of each group and on one or more functions corresponding to the group, if each first group in the first plurality of groups is at least one of:

equal to a second group in the second plurality of groups;

a replacement of a second group in the second plurality of groups;

deleted from the second plurality of groups; or

inserted into the second plurality of groups; and

provide one or more indicia of a result of the comparing to a software component at the computer system, or to an other computer system, the one or more indicia indicating whether each first group is at least one of equal to a second group in the second plurality of groups, a replacement of a second group in the second plurality of groups, deleted from the second plurality of groups, or inserted into the second plurality of groups.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 15, 2020
From: MOLA, JORDI
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 051527/0479 →
Continuity (1)
Related Publication 20210216436A1 · Jul 15, 2021