# US 2025/0094312 A1 · Data trace indexing and trace packet encapsulation

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

- Number: US 2025/0094312 A1
- Document ID: US20250094312A1
- Status: Published application
- Kind: A1
- Application number: 18/492,685
- Filed: 2023-10-23
- Published: 2025-03-20
- Earliest claimed: 2023-09-14
- Assignees: Apple Inc.
- Applicants: Apple Inc.
- Inventors: Alon YAAKOV; Stephan ZEISSET
- Web page: https://patentgrep.com/patent/US20250094312A1

## CPC

- G06F 11/348: {Circuit details, i.e. tracer hardware}
- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 11/3476: {Data logging (G06F11/14, G06F11/2205 take precedence)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system for generating trace packets in a computer system is disclosed. A processor circuit may generate trace information in response to an activation of a trace operation, and a trace circuit, coupled to the processor circuit via a trace interface, may be configured to receive the trace information. The trace circuit may be further configured to generate a plurality of trace packets including a given trace packet that includes an ordered data structure of data sections, wherein an initial data section of the ordered data sections includes a payload, and a final data section of the ordered data sections includes a footer. The trace circuit may be configured, in response to a detection of a load/store instruction in the trace information, to assign a particular index to the load/store instruction from a pool of indices, and generate a data index trace packet using the particular index.

## Claims

### Claim 1

An apparatus, comprising:
a processor circuit configured to generate trace information in response to an activation of a trace operation; and
a trace circuit coupled to the process circuit via a trace interface, wherein the trace circuit is configured to:
receive the trace information from the processor circuit via the trace interface; and
generate a plurality of trace packets including a given trace packet that includes an ordered data structure that includes a plurality of data sections, wherein an initial data section of the plurality of data sections includes a payload, and a final data section of the plurality of data sections includes a footer.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the footer includes first information indicative of a length of the given trace packet.

### Claim 3 (depends on 2)

The apparatus of claim 2, wherein the footer further includes second information indicative of a presence of timestamp information in a different data section of the ordered data structure of data sections, and wherein the timestamp information includes third information indicative of count value that is incremented during a given clock cycle of the processor circuit.

### Claim 4 (depends on 1)

The apparatus of claim 1, further comprising a trace memory, and wherein the trace circuit is further configured to store the plurality of trace packets in the trace memory.

### Claim 5 (depends on 1)

The apparatus of claim 1, wherein the trace circuit includes a trace decision circuit configured to generate a packet type identifier and packet field data using the trace information.

### Claim 6 (depends on 5)

The apparatus of claim 5, wherein the trace circuit further includes a trace packet builder circuit configured to:
generate a given trace packet of the plurality of trace packets using the packet type identifier and the packet field data; and
compress the given trace packet.

### Claim 7

A method, comprising:
generating, by a processor circuit, trace information in response to activating a trace operation;
relaying, by the processor circuit via a trace interface, the trace information to a trace circuit; and
generating, by the trace circuit, a plurality of trace packets using the trace information, wherein a given trace packet of the plurality of trace packets includes an ordered data structure of a plurality of data sections, wherein an initial data section of the plurality of data sections includes a payload for the given trace packet, and wherein a final data section of the plurality of data sections includes a footer for the given trace packet.

### Claim 8 (depends on 7)

The method of claim 7, wherein the footer includes first information indicative of a length of the given trace packet.

### Claim 9 (depends on 8)

The method of claim 8, further comprising storing, by the trace circuit, the plurality of trace packets in a memory circuit.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
reading, by a decoder, a last trace packet of the plurality of trace packets stored in the memory circuit using a trace packet pointer;
determining, by the decoder, a location in the memory circuit of a preceding trace packet using length information included in a footer data section included in the last trace packet; and
in response to identifying corresponding locations of the plurality of trace packets, decoding the plurality of trace packets starting with an initial trace packet of the plurality of trace packets using the corresponding locations.

### Claim 11 (depends on 10)

The method of claim 10, wherein generating a particular trace packet of the plurality of trace packets includes:
determining a packet type for the particular trace packet using the trace information; and
determining a particular payload for the particular trace packet using the trace information.

### Claim 12 (depends on 11)

The method of claim 11, further comprising:
assembling the particular trace packet using the packet type and the particular payload;
compressing the particular trace packet; and
storing a compressed version of the particular trace packet in the memory circuit.

### Claim 13 (depends on 7)

The method of claim 7, further comprising, in response to detecting a load/store instruction in the trace information, assigning an index from a pool of indices to the load/store instruction.

### Claim 14

An apparatus, comprising:
a processor circuit configured to generate trace information in response to an activation of a trace operation; and
a trace circuit coupled to the processor circuit via a trace interface, wherein the trace circuit is configured to:
receive the trace information via the trace interface;
in response to a detection of a load/store instruction in the trace information:
assign a particular index to the load/store instruction from a pool of indices; and
generate a data index trace packet using the particular index.

### Claim 15 (depends on 14)

The apparatus of claim 14, wherein the trace circuit is further configured, in response to detection of a bus access corresponding to an execution of the load/store instruction in the trace information, to generate a data access trace packet using the particular index.

### Claim 16 (depends on 15)

The apparatus of claim 15, further comprising a memory circuit configured to store the data index trace packet and the data access trace packet.

### Claim 17 (depends on 15)

The apparatus of claim 15, wherein to assign the particular index, the trace circuit is further configured to compare the load/store instruction to at least one filter criterion.

### Claim 18 (depends on 14)

The apparatus of claim 14, wherein the data index trace packet includes an ordered data structure of a plurality of data sections, wherein an initial data section of the plurality of data sections includes a payload for the data trace index packet, and wherein a final data section of the plurality of data sections includes a footer for the data trace index packet.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein the footer includes first information indicative of a length of the data index trace packet, and wherein the payload includes second information indicative of the particular index.

### Claim 20 (depends on 14)

The apparatus of claim 14, wherein to generate the data index trace packet, the trace circuit is further configured to compress the data index trace packet.
