Efficient address-to-symbol translation of stack traces in software programs
AssigneeMicrosoft Technology Licensing, LLC
InventorsArman H. Boehm, Anant R. Rao, Jui Ting Weng, Haricharan K. Ramachandra
Life of this patent
Estimating the term…
Abstract
The disclosed embodiments provide a system for processing data. During operation, the system obtains an attribute of a stack trace of a software program. Next, the system uses the attribute to select an address-translation instance from a set of address-translation instances for processing the stack trace. The system then provides the stack trace to the selected address-translation instance for use in translating a set of memory addresses in the stack trace into a set of symbols of instructions stored at the memory addresses.
Claims16
A method, comprising:
- obtaining an attribute of a stack trace of a software program;
- using the attribute to select, by a computer system, an address-translation instance from a set of address-translation instances for processing the stack trace;
- and
- providing the stack trace to the selected address-translation instance for use in translating a set of memory addresses in the stack trace into a set of symbols of instructions stored at the memory addresses, wherein translating the set of memory addresses comprises processing, by the selected address-translation instance, the stack trace by:
- obtaining one or more symbol files, each symbol file comprising a set of mappings of the memory addresses in the software program to the symbols of the instructions stored at the memory addresses;
- using the sets of mappings from the one or more symbol files to replace the memory addresses in the stack trace with the symbols;
- and
- caching, in a memory associated with the selected address-translation instance, for at least one of the memory addresses that was replaced, a mapping of the memory address to a symbol of a corresponding instruction, the caching comprising associating the memory address and stack trace information with the symbol stored in the cached mapping;
- and
- using the cached mapping to replace the memory address with the symbol in a subsequent stack trace of the software program.
An apparatus, comprising:
- one or more processors;
- and
- memory storing instructions that, when executed by the one or more processors, cause the apparatus to:
- obtain an attribute of a stack trace of a software program;
- use the attribute to select an address-translation instance from a set of address-translation instances for processing the stack trace;
- and
- provide the stack trace to the selected address-translation instance for use in translating a set of memory addresses in the stack trace into a set of symbols of instructions stored at the memory addresses, wherein translating the set of memory addresses comprises processing, by the selected address-translation instance, the stack trace by:
- obtaining one or more symbol files, each symbol file comprising a set of mappings of the memory addresses in the software program to the symbols of the instructions stored at the memory addresses;
- using the sets of mappings from the one or more symbol files to replace the memory addresses in the stack trace with the symbols;
- and
- caching, in a memory associated with the selected address-translation instance, for at least one of the memory addresses that was replaced, a mapping of the memory address to a symbol of a corresponding instruction, the caching comprising associating the memory address and stack trace information with the symbol stored in the cached mapping;
- and
- using the cached mapping to replace the memory address with the symbol in a subsequent stack trace of the software program.
A system, comprising:
- a selection module comprising a non-transitory computer-readable medium comprising instructions that, when executed by one or more processors, cause the system to:
- obtain an attribute of a stack trace of a software program;
- use the attribute to select an address-translation instance from a set of address-translation instances for processing the stack trace;
- and
- provide the stack trace to the selected address-translation instance for use in translating a set of memory addresses in the stack trace into a set of symbols of instructions stored at the memory addresses;
- and
- the selected address translation instance comprising a non-transitory computer-readable medium comprising instructions that, when executed by one or more processors, cause the system to:
- obtain one or more symbol files, each symbol file comprising a set of mappings of the memory addresses in the software program to the symbols of the instructions stored at the memory addresses;
- use the sets of mappings from the one or more symbol files to replace the memory addresses in the stack trace with the symbols;
- and
- cache, in a memory associated with the selected address-translation instance, for at least one of the memory addresses that was replaced, a mapping of the memory address to a symbol of a corresponding instruction, the caching comprising associating the memory address and stack trace information with the symbol stored in the cached mapping;
- and
- use the cached mapping to replace the memory address with the symbol in a subsequent stack trace of the software program.
Dependencies are inferred from the claim text.