Bytecode to Native Code Symbol Mapping for Performance Profiling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current profiling tools in computer systems face challenges in effectively conducting performance analysis due to the lack of efficient methods for mapping bytecode symbols with native code offsets, which hinders accurate performance profiling and optimization.
Innovation Solution
A method is introduced that compiles bytecodes to generate native codes, collects symbol information to map bytecode symbols with native code offsets, and stores this information in a file, enabling profiling by converting program counter addresses to offsets and determining corresponding symbols during execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If bytecode symbols are mapped with native code offsets for performance profiling, then measurement precision is improved, but device complexity increases
Solution Approach 1:
The patent applies preliminary action by collecting and storing symbol information mapping bytecode symbols to native code offsets during the compilation phase, before actual performance profiling occurs. This pre-computation stores mapping relationships in a file that can be quickly loaded during profiling, eliminating the need for complex real-time mapping calculations and reducing runtime system complexity while maintaining high measurement precision
Solution Approach 2:
The patent introduces an intermediary file that stores the mapping between bytecode symbols and native code offsets. This intermediary structure acts as a bridge between the high-level bytecode and low-level native code, allowing profiling tools to accurately map addresses without directly implementing complex mapping logic, thus improving measurement precision while managing system complexity through a dedicated intermediate layer
2Loss of information
If symbol information is collected and stored in a file, then information completeness is improved, but loss of time increases
Solution Approach 1:
The patent performs the time-consuming symbol information collection and mapping operations during the compilation phase, storing results in a file for later use. This preliminary action shifts the computational burden from runtime profiling to the compilation stage, ensuring complete symbol information is available without impacting the actual performance measurement time
Solution Approach 2:
The patent creates a copy of the symbol mapping information in a separate file structure that can be independently processed and loaded. This copying approach allows the original bytecode and native code to remain unchanged while creating a dedicated lookup structure that can be efficiently accessed during profiling, minimizing the impact on overall processing time
Data Source
AI summary
Aspects of the disclosure provide a method to support performance analysis. The method includes compiling bytecodes to generate native codes corresponding to the bytecodes in an electronic device, generating a file to include the bytecodes and the corresponding native codes in the file, collecting symbol information to map symbols in the bytecodes with offsets of corresponding native codes, and including the symbol information in the file to enable profiling.


