# US 2017/0255560 A1 · Multicore memory data recorder for kernel module

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

- Number: US 2017/0255560 A1
- Document ID: US20170255560A1
- Status: Published application
- Kind: A1
- Application number: 15/505,879
- Filed: 2014-09-25
- Published: 2017-09-07
- Earliest claimed: 2014-09-25
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Sai LUO; Tin-Fook NGAI; Hu CHEN; Xiaocheng ZHOU; Chunxiao LIN; Kang ZHAO
- Web page: https://patentgrep.com/patent/US20170255560A1

## CPC

- G06F 12/0842: for multiprocessing or multitasking
- G06F 11/36: Prevention of errors by analysis, debugging or testing of software
- G06F 11/3632: {of specific synchronisation aspects}
- G06F 12/0831: using a bus scheme, e.g. with bus monitoring or watching means
- G06F 12/0833: {in combination with broadcast means (e.g. for invalidation or updating)}
- G06F 12/0875: with dedicated cache, e.g. instruction or stack
- G06F 2212/1016: Performance improvement
- G06F 2212/1032: Reliability improvement, data loss prevention, degraded operation etc
- G06F 2212/452: Instruction code
- G06F 2212/621: Coherency control relating to peripheral accessing, e.g. from DMA or I/O device
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A processing device includes a processing core, coupled to a memory, to execute a task including a code segment identified as being monitored and a kernel recorder, coupled to the processing core via a core interface. The kernel recorder includes a first filter circuit to responsive to determining that the task being executed enters the code segment, set the kernel recorder to a first mode under which the kernel recorder is to record, in a first record, a plurality of memory addresses accessed by the code segment, and responsive to determining that the execution of the task exits the code segment, set the kernel recorder to a second mode under which the kernel recorder is to detect a write operation to a memory address recorded in the first record and record the memory address in a second record.

## Claims

### Claim 1

A processing device, comprising:
a memory;
a processing core, coupled to the memory, to execute a task comprising a code segment identified as being monitored; and
a kernel recorder, coupled to the processing core via a core interface, the kernel recorder comprising a first filter circuit to:
responsive to determining that the task being executed enters the code segment, set the kernel recorder to a first mode under which the kernel recorder is to record, in a first record, a plurality of memory addresses accessed by the code segment; and
responsive to determining that the execution of the task exits the code segment, set the kernel recorder to a second mode under which the kernel recorder is to detect a write operation to a memory address recorded in the first record and record the memory address in a second record.

### Claim 2 (depends on 1)

The processing device of claim 1, wherein the write operation under the second mode is caused by a kernel of an operating system executing on the processing device.

### Claim 3 (depends on 1)

The processing device of claim 1, wherein the write operation under the second mode is caused by a device driver executing in a context of a kernel of an operating system executing on the processing device.

### Claim 4 (depends on 1)

The processing device of claim 1, wherein the write operation under the second mode is caused by a second task executed on a second processing core of the processing device.

### Claim 5 (depends on 1)

The processing device of claim 1, wherein the first filter circuit comprises a hardware address filter to determine an execution flow entry to the code segment by comparing an instruction pointer of the code segment with a specified range.

### Claim 6 (depends on 1)

The processing device of claim 1, wherein the first filter circuit comprises a mode status register to be set by a driver to the first mode in response to detecting an entry to the code segment, and to the second mode in response to detecting an exit from the code segment.

### Claim 7 (depends on 6)

The processing device of claim 6, wherein the mode status register includes a plurality of bits, each of the plurality of bits indicating whether a respective processing core of the processing device operates under the first mode or the second mode.

### Claim 8 (depends on 5)

The processing device of claim 5, wherein the kernel recorder includes a second filter circuit to, under the first mode,
receive data and the plurality of memory addresses associated with the code segment to be written to the memory, and
determine whether the data and the plurality of memory addresses are to be recorded in the first record.

### Claim 9 (depends on 8)

The processing device of claim 8, wherein the kernel recorder is to record the data and the plurality of memory addresses in the first record responsive to determining that the data and the plurality of memory addresses are associated with a locked variable in the code segment.

### Claim 10 (depends on 8)

The processing device of claim 8, wherein the kernel recorder records the data and the plurality of addresses in the first record responsive to determining that the data and the plurality of memory addresses are associated with a device driver.

### Claim 11 (depends on 8)

The processing device of claim 8, wherein the second filter circuit is implemented as a hardware address filter.

### Claim 12 (depends on 8)

The processing device of claim 8, wherein the kernel recorder includes a third filter circuit that is coupled to the second filter circuit, and the third filter circuit is to:
determine whether the data and the plurality of memory addresses received at the second filter circuit have been recorded in the first record, and
responsive to a determination that the data and the plurality of memory addresses received at the second filter circuit have not been recorded, record the data and the plurality of memory addresses in the first record.

### Claim 13 (depends on 12)

The processing device of claim 12, wherein the third filter circuit includes a memory buffer comprising a set of page addresses of the recorded data.

### Claim 14 (depends on 12)

The processing device of claim 12, wherein content of the first record is synchronized with a third record stored a second processing core of the processing device.

### Claim 15 (depends on 12)

The processing device of claim 12, wherein the kernel recorder includes a first buffer to record a plurality of memory address ranges that are ever read by the processing core under the first mode, and a second buffer to record a plurality of memory address ranges that are ever written by the processing core under the first mode.

### Claim 16 (depends on 15)

The processing device of claim 15, wherein responsive to receiving, by the kernel recorder, a cache snoop message indicating that a read transaction from another processing core of the processing device hits a data range stored in the second buffer, write an entry to a log register associated with the processing device and flush the first buffer and the second buffer.

### Claim 17

(canceled)

### Claim 17

A method, comprising:
monitoring, by a kernel recorder coupled to a processing core, execution of a task;
determining whether the execution of the task enters or exits a code segment identified as being monitored;
responsive to determining that the task being executed enters the code segment, setting the kernel recorder to a first mode under which the kernel recorder is to record, in a first record, a plurality of memory addresses accessed by the code segment; and
responsive to determining that the execution of the task exists the code segment, setting the kernel recorder to a second mode under which the kernel recorder is to detect a write operation to a memory address recorded in the first record and record the memory address in a second record.

### Claim 18

(canceled)

### Claim 18 (depends on 17)

The method of claim 17, wherein the write operation under the second mode is caused by a kernel of an operating system executing on the processing device.

### Claim 19

(canceled)

### Claim 19

A system-on-a-chip (SoC) comprising:
a memory;
a processing core, coupled to the memory, to execute a task comprising a code segment identified as being monitored; and
a kernel recorder, coupled to the processing core via a core interface, the kernel recorder comprising a first filter circuit to:
responsive to determining that the task being executed enters the code segment, set the kernel recorder to a first mode under which the kernel recorder is to record, in a first record, a plurality of memory addresses accessed by the code segment; and
responsive to determining that the execution of the task exits the code segment, set the kernel recorder to a second mode under which the kernel recorder is to detect a write operation to a memory address recorded in the first record and record the memory address in a second record.

### Claim 20

(canceled)

### Claim 20 (depends on 19)

The SoC of claim 19, wherein the write operation under the second mode is caused by a kernel of an operating system executing on the processing core.

### Claim 23

(canceled)
