Stack Trace Error Detection via Compressed Trie Indexing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Accurately detecting and tracing errors in method calls within complex computer programs is challenging due to the difficulty in isolating specific problematic segments, especially when performance issues only appear for certain customers and data shapes, and classic instrumentation techniques impose substantial overhead.
Innovation Solution
An exception handler collects stack trace data during method calls using a main processing thread and processes it into a compressed weighted trie using a background processing thread, allowing for efficient identification of errors without blocking the main thread and reducing resource-intensive searches.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Difficulty of detecting and measuring
If classic instrumentation techniques are used to detect method calls, then detection capability is improved, but system overhead increases substantially
Solution Approach 1:
The patent extracts only the essential stack trace information (method names, file names, line numbers) needed for detection, rather than instrumenting every method call with full monitoring code. This selective extraction reduces overhead while maintaining detection capability.
Solution Approach 2:
The system pre-processes stack trace data during normal execution by capturing it at exception points and building indexes in advance. This preliminary action allows rapid query-time detection without adding overhead to the critical path of method calls.
2Measurement precision
If comprehensive instrumentation is applied to track all method calls, then detection accuracy is improved, but processing speed deteriorates
Solution Approach 1:
The patent creates simplified copies of stack trace information in indexed data structures (tries) that can be queried rapidly. Instead of analyzing full stack traces at query time, the system uses pre-built copied representations that enable fast pattern matching and error location identification.
Solution Approach 2:
Stack trace data is captured and processed in advance during normal application execution, building ready-to-query indexes before errors occur. This preliminary processing ensures both accurate error detection and fast response times when issues arise.
3Difficulty of detecting and measuring
If resource-intensive search methods are used to identify error locations, then detection thoroughness is improved, but processing efficiency decreases
Solution Approach 1:
The patent segments the stack trace analysis problem into hierarchical levels (full stack traces, method-level summaries, file-level patterns). This segmentation allows the system to apply appropriate analysis depth only where needed, improving efficiency while maintaining thorough detection capability for problematic patterns.
Solution Approach 2:
Pre-computed indexed representations of stack traces enable rapid pattern matching without performing resource-intensive full stack analysis at query time. The copied indexed structures allow efficient searching while preserving the ability to detect complex error patterns.
Data Source
AI summary
In an embodiment, a computer-implemented method for improving computer processing efficiency comprises using a main processing thread, in response to detecting an error in one or more function calls, tracing the one or more function calls at runtime and collecting stack trace data; and using a background processing thread, generating and displaying a function call tree based on the stack trace data.


