# US 2021/0240593 A1 · Efficiently tracking code location of run-time events in system software

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

- Number: US 2021/0240593 A1
- Document ID: US20210240593A1
- Status: Published application
- Kind: A1
- Application number: 16/778,235
- Filed: 2020-01-31
- Published: 2021-08-05
- Earliest claimed: 2020-01-31
- Assignees: salesforce.com, inc.
- Applicants: salesforce.com, inc.
- Inventors: Aditya P. Gurajada
- Web page: https://patentgrep.com/patent/US20210240593A1

## CPC

- G06F 11/3636: {by tracing the execution of the program}
- G06F 11/364: {tracing values on a bus}
- G06F 8/41: Compilation
- G06F 8/77: Software metrics
- G06F 11/323: {Visualisation of programs or trace data}
- G06F 11/3612: {by runtime analysis (performance monitoring G06F11/3466)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods, systems and computer program products for tracking, encoding and decoding the code-location of runtime events. The system receives an encoded identifier function call as a parameter for a first function included in at least one file in a plurality of files of a source code base. The system returns a compact encoded identifier generated by the encoded identifier function call during compilation of the plurality of files of the source code base. In response to receiving a runtime event's identifier from execution of the source code base, the system decodes the encoded identifier to trace back to a unique location of the first function in the source code base, thereby identifying the filename and line number where the event occurred.

## Claims

### Claim 1

A method for tracking runtime events comprising:
receiving, by a database system, an encoded identifier function call as a parameter for a first function included in at least one file in a plurality of files of a source code base;
returning, by the database system, an encoded identifier generated by the encoded identifier function call during compilation of the plurality of files of the source code base; and
decoding, by the database system, the encoded identifier to trace back to a location of the first function in the source code base in response to receiving a runtime event from execution of the source code base.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, further comprising:
decoding, by the database system, a first portion of the encoded identifier to identify a filename of a particular file in the source code base that includes the first function.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, further comprising:
generating, by the database system, a filename index number for each respective file of the source code base during compilation of the source code base.

### Claim 4 (depends on 3)

The computer-implemented method of claim 3, further comprising:
decoding, by the database system, the first portion of the encoded identifier to reveal a respective filename index number associated with the particular file in the source code base that includes the first function.

### Claim 5 (depends on 2)

The computer-implemented method of claim 2, further comprising:
decoding, by the database system, a second portion of the encoded identifier to reveal at least one source code line number at which first function appears in the particular file.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, further comprising:
receiving, by the database system, multiple instances of the same encoded identifier function call, wherein each instance of the same encoded identifier function call is a respective parameter for a function included in a plurality of different functions in the plurality of files of the source code base; and
returning, by the database system, a unique encoded identifier for each respective different function during compilation of the plurality of files of the source code base.

### Claim 7 (depends on 6)

The computer-implemented method of claim 6, further comprising:
storing, by the database system, each returned unique encoded identifier in pre-allocated storage memory associated with the source code base; and
generating, by the database system, a user interface providing one or more functionalities for viewing and selecting any of the stored unique encoded identifiers.

### Claim 8

A computer program product comprising computer-readable program code to be executed by one or more processors when retrieved from a non-transitory computer-readable medium, the program code including instructions to:
receiving an encoded identifier function call as a parameter for a first function included in at least one file in a plurality of files of a source code base;
returning an encoded identifier generated by the encoded identifier function call during compilation of the plurality of files of the source code base; and
in response to receiving a runtime event from execution of the source code base, decoding the encoded identifier to trace back to a location of the first function in the source code base.

### Claim 9 (depends on 8)

The computer program product of claim 8, wherein decoding the encoded identifier to trace back to a location of the first function in the source code base comprises:
decoding a first portion of the encoded identifier to identify a filename of a particular file in the source code base that includes the first function.

### Claim 10 (depends on 9)

The computer program product of claim 9, further comprises:
during compilation of the source code base, generating a filename index number for each respective file of the source code base.

### Claim 11 (depends on 10)

The computer program product of claim 10, wherein decoding a first portion of the encoded identifier to identify a filename of a particular file comprises:
decoding the first portion of the encoded identifier to reveal a respective filename index number associated with the particular file in the source code base that includes the first function.

### Claim 12 (depends on 9)

The computer program product of claim 9, further comprising:
decoding a second portion of the encoded identifier to reveal at least one source code line number at which first function appears in the particular file.

### Claim 13 (depends on 8)

The computer program product of claim 8, further comprising:
wherein receiving an encoded identifier function call as a parameter comprises:
receiving multiple instances of the same encoded identifier function call, wherein each instance of the same encoded identifier function call is a respective parameter for a function included in a plurality of different functions in the plurality of files of the source code base; and
wherein returning an encoded identifier comprises:
returning a unique encoded identifier for each respective different function during compilation of the plurality of files of the source code base.

### Claim 14 (depends on 13)

The computer program product of claim 13, further comprising:
storing each returned unique encoded identifier in pre-allocated storage memory associated with the source code base; and
generating a user interface providing one or more functionalities for viewing and selecting any of the stored unique encoded identifiers.

### Claim 15

A system comprising:
one or more processors; and
a non-transitory computer readable medium storing a plurality of instructions, which when executed, cause the one or more processors to:
receiving an encoded identifier function call as a parameter for a first function included in at least one file in a plurality of files of a source code base;
returning an encoded identifier generated by the encoded identifier function call during compilation of the plurality of files of the source code base; and
in response to receiving a runtime event from execution of the source code base, decoding the encoded identifier to trace back to a location of the first function in the source code base.

### Claim 16 (depends on 15)

The system of claim 15, wherein decoding the encoded identifier to trace back to a location of the first function in the source code base comprises:
decoding a first portion of the encoded identifier to identify a filename of a particular file in the source code base that includes the first function.

### Claim 17 (depends on 16)

The system of claim 16, further comprises:
during compilation of the source code base, generating a filename index number for each respective file of the source code base.

### Claim 18 (depends on 17)

The system of claim 17, wherein decoding a first portion of the encoded identifier to identify a filename of a particular file comprises:
decoding the first portion of the encoded identifier to reveal a respective filename index number associated with the particular file in the source code base that includes the first function.

### Claim 19 (depends on 18)

The system of claim 18, further comprising:
decoding a second portion of the encoded identifier to reveal at least one source code line number at which first function appears in the particular file.

### Claim 20 (depends on 15)

The system of claim 15, further comprising:
wherein receiving an encoded identifier function call as a parameter comprises:
receiving multiple instances of the same encoded identifier function call, wherein each instance of the same encoded identifier function call is a respective parameter for a function included in a plurality of different functions in the plurality of files of the source code base;
wherein returning an encoded identifier comprises:
returning a unique encoded identifier for each respective different function during compilation of the plurality of files of the source code base;
storing each returned unique encoded identifier in pre-allocated storage memory associated with the source code base; and
generating a user interface providing one or more functionalities for viewing and selecting any of the stored unique encoded identifiers.
