Embedded Debug Tracing for Non-Deterministic Register Replay

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing debugging tools for wireless sensor networks face challenges in capturing complete code execution due to limited resources and non-deterministic events, making it difficult to effectively replay and diagnose bugs, especially in remote and resource-constrained environments.

Innovation Solution

The TARDIS system employs a software-based approach that records and replays non-deterministic data using domain-specific compression techniques, allowing for the recreation of memory states and enabling broader bug detection without requiring hardware changes or virtualization environments, by instrumenting nodes to compress and store trace data efficiently.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If deterministic record and replay methods are used to trace execution, then complete code execution can be captured, but non-deterministic events such as sensor values and message arrival times cannot be adequately traced

Engineering Contradiction:
Improvetracing precisionVSAvoidhandling non-deterministic events
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

The system dynamically adapts its recording behavior based on event type. For deterministic events, it records complete execution traces; for non-deterministic events like sensor readings and message arrivals, it records only the essential non-deterministic values and their timestamps, allowing the tracing mechanism to flexibly handle both deterministic and non-deterministic execution paths

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

Different recording strategies are applied to different types of events based on their characteristics. Deterministic events receive full execution tracing while non-deterministic events receive specialized handling that captures only the necessary non-deterministic data, optimizing the balance between completeness and adaptability for each event type

Inventive Principle:
Principle #3Local quality

2Reliability

If complete execution traces are recorded for all nodes, then debugging coverage is improved, but the trace size becomes too large for limited hardware resources

Engineering Contradiction:
Improvedebugging coverageVSAvoidtrace data size
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The system extracts and records only the essential non-deterministic elements from complete execution traces, such as sensor values, message arrival times, and random number generator outputs, while omitting redundant deterministic execution details that can be replayed without recording, thereby reducing trace size while maintaining debugging effectiveness

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The tracing system segments the execution trace into deterministic portions and non-deterministic portions, recording only the non-deterministic segments that cannot be replayed without additional data, while the deterministic segments are handled through standard replay mechanisms, reducing overall trace data requirements

Inventive Principle:
Principle #1Segmentation

3Measurement precision

If trace data is stored with high detail for accurate bug reproduction, then debugging accuracy is improved, but the storage requirements exceed available memory on resource-constrained nodes

Engineering Contradiction:
Improvebug reproduction accuracyVSAvoidmemory usage
Core Design Contradiction:
Measurement precisionVSVolume of stationary object

Solution Approach 1:

The system changes the representation parameters of trace data by recording non-deterministic values in a compact format that captures essential debugging information while using fewer bytes per data point, allowing accurate bug reproduction with reduced memory footprint through optimized data encoding schemes

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS10007592B2Debugging non-deterministic embedded systems
Publication Date: 2018.06.26 PURDUE RES FOUND
  • US10007592B2 patent drawing
  • US10007592B2 patent drawing
  • US10007592B2 patent drawing

AI summary

An embedded device includes a processor executing instructions from module(s) in a code memory. The instructions specify: reading data from two non-deterministic registers (NDRs) of different types, compressing the data using respective, different compression algorithms, and storing the compressed data in a nonvolatile medium. A method of enabling debug tracing in a computer program product (CPP) includes locating instructions in the CPP that read NDRs, determining types of the NDRs, and adding instruction(s) to the CPP to compress the values read using compression algorithms corresponding to the respective NDR types. An emulator in a computer-readable medium receives emulation-target instructions (ETIs) and compressed NDR data, and emulates an execution sequence of the ETIs by determining NDR-reading instructions, determining a type of the NDR read by each, decompressing a portion of the NDR data using a type-specific decompressor, and updating emulated-machine state based on the decompressed portion.