Runtime Event Tracking via Encoded Source Identifiers

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional systems face challenges in tracing the origin of runtime events in complex source code, leading to inefficient manual trial-and-error searches, which can introduce instability and misallocate resources.

Innovation Solution

An event tracker generates unique encoded identifiers during source code compilation, allowing developers to decode and identify the exact filename and line number of the source code origin for runtime events, facilitating efficient tracing and troubleshooting.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If manual trial-and-error search is used to locate runtime event origins, then developers can eventually find the source, but the process is inefficient and time-consuming

Engineering Contradiction:
Improveaccuracy of locating runtime event originVSAvoidtime required to locate runtime event origin
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system performs preliminary action by injecting location-tracking code during the compilation phase, generating unique encoded identifiers that are embedded in the executable code. This pre-prepared tracking infrastructure eliminates the need for manual searching during runtime debugging, as the location information is already prepared and can be retrieved instantly when events occur.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates a simplified copy of location information in the form of encoded identifiers that represent full source code paths and line numbers. Instead of requiring developers to search through the actual complex source codebase, the system uses these compact identifier copies that can be easily generated, transmitted, and decoded to reveal precise location information.

Inventive Principle:
Principle #26Copying

2Loss of information

If developers perform manual searching through complex source code, then they can identify runtime event origins, but resource utilization is misallocated and instability is introduced

Engineering Contradiction:
Improvecompleteness of location informationVSAvoidstability of source code
Core Design Contradiction:
Loss of informationVSReliability

Solution Approach 1:

The system extracts location information from the complex source code context and separates it into standalone encoded identifiers. This extraction process pulls the essential location data (filename, line number, function name) out of the intricate codebase structure, allowing complete location information to be captured and stored in a stable, isolated form that doesn't require the original code context for retrieval.

Inventive Principle:
Principle #2Taking out (Extraction)

3Ease of operation

If encoded identifiers are generated during compilation, then precise source code location can be identified, but the compilation process becomes more complex

Engineering Contradiction:
Improveease of tracing runtime eventsVSAvoidcomplexity of compilation process
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The compilation process is enhanced to serve multiple functions: it not only compiles the source code into executable form but also simultaneously generates and embeds location-tracking encoded identifiers. This multi-functionality approach integrates the tracking infrastructure creation into the existing compilation workflow, making the compiler a dual-purpose tool that produces both the executable code and the location metadata in a single pass.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS11113180B2Efficiently tracking code location of run-time events in system software
Publication Date: 2021.09.07 SALESFORCE INC
  • US11113180B2 patent drawing
  • US11113180B2 patent drawing
  • US11113180B2 patent drawing

AI summary

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.