# US 2021/0334139 A1 · Compression techniques for encoding stack trace information

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0334139 A1
- Document ID: US20210334139A1
- Status: Published application
- Kind: A1
- Application number: 17/366,636
- Filed: 2021-07-02
- Published: 2021-10-28
- Earliest claimed: 2016-05-09
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Eric S. Chan
- Web page: https://patentgrep.com/patent/US20210334139A1

## CPC

- G06F 9/50: Allocation of resources, e.g. of the central processing unit [CPU]
- G06F 3/0629: {Configuration or reconfiguration of storage systems}
- G06F 3/0631: {by allocating resources to storage systems}
- G06F 9/5005: {to service a request}
- G06F 9/5011: {the resources being hardware resources other than CPUs, Servers and Terminals}
- G06F 9/5016: {the resource being the memory}
- G06F 9/5022: {Mechanisms to release resources}
- G06F 9/5027: {the resource being a machine, e.g. CPUs, Servers, Terminals}
- G06F 9/5044: {considering hardware capabilities}
- G06F 9/505: {considering the load}
- G06F 9/5055: {considering software capabilities, i.e. software resources associated or available to the machine}
- G06F 9/5083: {Techniques for rebalancing the load in a distributed system}
- G06F 11/3037: {where the computing system component is a memory, e.g. virtual memory, cache (accessing, addressing or allocating within memory systems or architectures G06F12/00; checking stores for correct operation G11C29/00)}
- G06F 11/3409: {for performance assessment}
- G06F 11/3442: {for planning or managing the needed capacity}
- G06F 11/3452: {Performance evaluation by statistical analysis}
- G06F 11/3466: {Performance evaluation by tracing or monitoring}
- G06F 11/36: Prevention of errors by analysis, debugging or testing of software
- G06F 11/3612: {by runtime analysis (performance monitoring G06F11/3466)}
- G06F 12/023: {Free address space management}
- G06F 17/18: for evaluating statistical data {, e.g. average values, frequency distributions, probability functions, regression analysis (forecasting specially adapted for a specific administrative, business or logistic context G06Q10/04)}
- H04L 41/5009: Determining service level performance parameters or violations of service level contracts, e.g. violations of agreed response time or mean time between failures [MTBF]
- G06F 11/3471: {Address tracing}
- G06F 2201/86: Event-based monitoring
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Embodiments provide a thread classification method that represents stack traces in a compact form using classification signatures. Some embodiments can receive a stack trace that includes a sequence of stack frames. Some embodiments may generate, based on the sequence of stack frames, a trace signature that represents the set. Some embodiments may receive one or more subsequent stack traces. For each of the one or more subsequent stack traces, some embodiments may determine whether a subsequent trace signature has been generated to represent the sequence of stack frames included within the subsequent stack trace. If not, some embodiments may generate, based on the trace signature and other subsequent trace signatures that were generated based on the trace signature, the subsequent trace signature to represent the subsequent sequence of stack frames.

## Claims

### Claim 1

A computer-implemented method comprising:
receiving a first stack trace including a first sequence of stack frames;
generating, based at least in part on the first sequence of stack frames, a first trace signature that represents the first sequence of stack frames, wherein the first trace signature corresponds a first tuple comprising a first node representing the first sequence of stack frames;
receiving one or more subsequent stack traces; and
for at least one of the one or more subsequent stack traces, performing operations including:
determining, from at least one of the one or more subsequent stack traces, a second stack trace including a second sequence of stack frames;
generating a second node based on at least in part on comparing the first sequence of stack frames against the second sequence of stack frames;
generating a second tuple including the second node;
generating a second trace signature representing the second sequence of stack frames, the second trace signature corresponding to the second tuple; and
generating, based at least in part on the second trace signature, a subsequent trace signature to represent a subsequent sequence of stack frames.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the first tuple includes a binary tree that includes the first node as a root node of the binary tree.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, further comprising: determining whether the subsequent trace signature has been generated to represent the subsequent sequence of stack frames included by the at least one of the one or more subsequent traces; and
wherein the operations are performed for the at least one of the one or more subsequent stack traces based on a determination that the subsequent trace signature has not been generated.

### Claim 4 (depends on 3)

The computer-implemented method of claim 3, wherein determining whether the subsequent trace signature has been generated to represent the subsequent sequence of stack frames comprises determining whether one or more previously generated nodes represents the subsequent sequence of stack frames, the one or more previously generated nodes including the first node; and
wherein generating the subsequent trace signature to represent the subsequent sequence of stack frames comprises:
determining one or more subsequences of stack frames included in the subsequent sequence of stack frames that are not represented by the one or more previously generated nodes;
generating one or more additional nodes to represent the one or more subsequences of stack frames included in the subsequent sequence of stack frames;
incorporating at least one of the one or more additional nodes into one or more previously generated binary trees of one or more previously generated tuples, the one or more previously generated binary trees including the binary tree and the one or more previously generated tuples including the tuple;
generating one or more additional binary trees, wherein at least one of the one or more binary trees includes at least one of the one or more additional nodes; and
generating an additional tuple that includes the one or more additional binary trees, wherein the subsequent trace signature corresponds to the additional tuple.

### Claim 5 (depends on 4)

The computer-implemented method of claim 4, wherein each tuple, each node, and each stack frame is uniquely identified by an integer.

### Claim 6 (depends on 2)

The computer-implemented method of claim 2,
wherein the binary tree is a first binary tree;
wherein generating a second node based on at least in part on comparing the first sequence of stack frames against the second sequence of stack frames comprises:
determining that the first sequence of stack frames and the second sequence of stack frames share a matching subsequence of stack frames and that a non-matching subsequence of stack frames included in first sequence of stack frames differs from a non-matching subsequence of stack frames included in the second sequence of stack frames;
generating the second node that represents the matching subsequence of stack frames;
generating a third node that represents the non-matching subsequence of stack frames included in the second sequence of stack frames;
generating a second binary tree that includes the second node and a third binary tree that includes the third node; and
generating the second tuple that includes the second and third binary trees, wherein the second node and third node are siblings and the second trace signature corresponds to the second tuple.

### Claim 7 (depends on 6)

The computer-implemented method of claim 6, wherein generating the second trace signature further comprises:
generating a fourth node that represents the matching subsequence of stack frames;
generating a fifth node that represents the non-matching subsequence of stack frames included in the first sequence of stack frames; and
adding the fourth node and the fifth node to the first binary tree as children of the first node.

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, further comprising:
determining that the first sequence of stack frames and the second sequence of stack frames share a matching subsequence of stack frames; and
generating the second trace signature based at least in part on the matching subsequence of stack frames.

### Claim 9 (depends on 8)

The computer-implemented method of claim 8, wherein generating the second trace signature comprises:
determining that a non-matching subsequence of stack frames included in the first sequence of stack frames differs from a non-matching subsequence of stack frames included in the second sequence of stack frames;
generating a first segment signature that represents the matching subsequence of stack frames;
generating a second segment signature that represents the non-matching subsequence of stack frames included in the second sequence of stack frames; and
generating the second trace signature, wherein the second trace signature includes the first segment signature and the second segment signature.

### Claim 10 (depends on 9)

The computer-implemented method of claim 9, wherein generating the second trace signature comprises:
generating a third segment signature that classifies the non-matching subsequence of stack frames included in the first sequence of stack frames; and
modifying the first trace signature to include the first segment signature and the third segment signature.

### Claim 11 (depends on 9)

The computer-implemented method of claim 9, the first trace signature is associated with a first counter that is incremented when any stack trace including the first sequence of stack frames is received and the second trace signature is associated with a second counter that is incremented when any stack trace including the second sequence of stack frames is received.

### Claim 12 (depends on 11)

The computer-implemented method of claim 11,
wherein the first segment signature is associated with a third counter that is incremented when any stack trace including the matching subsequence of stack frames is received;
wherein the second segment signature is associated with a fourth counter that is incremented when any stack trace including the non-matching subsequence of stack frames included in the second sequence of stack frames is received;
wherein the third counter is copied from the first counter when the first segment signature is generated; and
wherein the fourth counter is copied from the second counter when the second segment signature is generated.

### Claim 13

A system comprising:
one or more processors; and
a memory accessible to the one or more processors, the memory storing one or more instructions that, upon execution by the one or more processors, causes the one or more processors to:
receive a first stack trace including a first sequence of stack frames;
generate, based at least in part on the first sequence of stack frames, a first trace signature that represents the first sequence of stack frames, wherein the first trace signature corresponds a first tuple comprising a first node representing the first sequence of stack frames;
receive one or more subsequent stack traces; and
for at least one of the one or more subsequent stack traces, perform operations including:
determining, from at least one of the one or more subsequent stack traces, a second stack trace including a second sequence of stack frames;
generating a second node based on at least in part on comparing the first sequence of stack frames against the second sequence of stack frames;
generating a second tuple including the second node;
generating a second trace signature representing the second sequence of stack frames, the second trace signature corresponding to the second tuple; and
generating, based at least in part on the second trace signature, a subsequent trace signature to represent a subsequent sequence of stack frames.

### Claim 14 (depends on 13)

The system of claim 13, wherein the first tuple includes a binary tree that includes the first node as a root node of the binary tree.

### Claim 15 (depends on 14)

The system of claim 14, wherein the memory stores one or more instructions that, upon execution by the one or more processors, causes the one or more processors to determine whether the subsequent trace signature has been generated to represent the subsequent sequence of stack frames included by the at least one of the one or more subsequent traces; and
wherein the operations are performed for the at least one of the one or more subsequent stack traces based on a determination that the subsequent trace signature has not been generated.

### Claim 16 (depends on 15)

The system of claim 15, wherein the memory stores one or more instructions that, upon execution by the one or more processors, causes the one or more processors to determine whether one or more previously generated nodes represents the subsequent sequence of stack frames, the one or more previously generated nodes including the first node; and
wherein the memory further stores one or more instructions that, upon execution by the one or more processors, causes the one or more processors to
determine one or more subsequences of stack frames included in the subsequent sequence of stack frames that are not represented by the one or more previously generated nodes;
generate one or more additional nodes to represent the one or more subsequences of stack frames included in the subsequent sequence of stack frames;
incorporate at least one of the one or more additional nodes into one or more previously generated binary trees of one or more previously generated tuples, the one or more previously generated binary trees including the binary tree and the one or more previously generated tuples including the tuple;
generate one or more additional binary trees, wherein at least one of the one or more binary trees includes at least one of the one or more additional nodes; and
generate an additional tuple that includes the one or more additional binary trees, wherein the subsequent trace signature corresponds to the additional tuple.

### Claim 17 (depends on 14)

The system of claim 14, wherein the binary tree is a first binary tree; and
wherein the memory stores one or more instructions that, upon execution by the one or more processors, causes the one or more processors to:
determine that the first sequence of stack frames and the second sequence of stack frames share a matching subsequence of stack frames and that a non-matching subsequence of stack frames included in first sequence of stack frames differs from a non-matching subsequence of stack frames included in the second sequence of stack frames;
generate the second node that represents the matching subsequence of stack frames;
generate a third node that represents the non-matching subsequence of stack frames included in the second sequence of stack frames;
generate a second binary tree that includes the second node and a third binary tree that includes the third node; and
generate the second tuple that includes the second and third binary trees, wherein the second node and third node are siblings and the second trace signature corresponds to the second tuple.

### Claim 18 (depends on 17)

The system of claim 17, wherein the memory stores one or more instructions that, upon execution by the one or more processors, causes the one or more processors to:
generate a fourth node that represents the matching subsequence of stack frames;
generate a fifth node that represents the non-matching subsequence of stack frames included in the first sequence of stack frames; and
add the fourth node and the fifth node to the first binary tree as children of the first node.

### Claim 19

A non-transitory computer-readable medium storing one or more instructions that, upon execution by one or more processors, cause the one or more processors to:
receive a first stack trace including a first sequence of stack frames;
generate, based at least in part on the first sequence of stack frames, a first trace signature that represents the first sequence of stack frames, wherein the first trace signature corresponds a first tuple comprising a first node representing the first sequence of stack frames;
receive one or more subsequent stack traces; and
for at least one of the one or more subsequent stack traces, performing operations including:
determining, from at least one of the one or more subsequent stack traces, a second stack trace including a second sequence of stack frames;
generating a second node based on at least in part on comparing the first sequence of stack frames against the second sequence of stack frames;
generating a second tuple including the second node;
generating a second trace signature representing the second sequence of stack frames, the second trace signature corresponding to the second tuple; and
generating, based at least in part on the second trace signature, a subsequent trace signature to represent a subsequent sequence of stack frames.

### Claim 20 (depends on 19)

The non-transitory computer-readable medium of claim 19, wherein the first tuple includes a binary tree that includes the first node as a root node of the binary tree.
