Evaluation and optimisation of code
AssigneeSTMicroelectronics S.r.l.
InventorsTrefor Southwell, Peter Hedinger, Kristen Jacobs
Life of this patent
Estimating the term…
Abstract
A memory map evaluation tool is provided which allows a program to be organised in a manner most compatible with use of a cache. This is done by executing a first version of the program according to a first memory map to generate a program counter trace, converting the program counter trace into a specific format and then translating the program counter trace into physical addresses using a memory map to be evaluated, different from the first memory map. Those physical addresses are then used to evaluate the number of likely cache misses using a model of a direct-mapped cache for the memory map under evaluation.
Claims8
A method of evaluating a set of memory maps for a program comprising a plurality of functions, the method comprising:
- (a) executing a first version of the program according to a first memory map to generate a program counter trace;
- (b) converting the program counter trace into a format defining a memory location in association with a function and an offset within the function using the first memory map;
- (c) translating the program counter trace into physical addresses using one of the set of memory maps to be evaluated, different from the first memory map;
- (d) evaluating the number of likely cache misses using a model of a direct-mapped cache for that one memory map;
- and
- repeating steps (c) and (d) for each of the memory maps in the set.
A method according to any preceding claim, which requires the additional step of, subsequent to evaluating the first set of memory maps, generating a further set of memory maps for evaluation.
A method of operating a computer to evaluate a set of memory maps for a program comprising a plurality of functions, the method comprising:
- loading a first version of the program into the computer and executing said first version to generate a program counter trace;
- loading into the computer a memory map evaluation tool which carries out the steps of:
- converting the program counter trace into a format defining a memory location in association with a function and an offset within the function using the first memory map;
- translating the program counter trace into physical addresses using one of the set of memory maps to be evaluated, different from the first memory map;
- and
- evaluating the number of likely cache misses using a model of a direct-mapped cache for that one memory map;
- wherein the step of translating a program counter trace and evaluating the number of likely cache misses is repeated for each of the memory maps in a set to be evaluated.
A memory map evaluation tool comprising:
- a first component operable to generate a program counter trace from execution of a first version of a program according to a first memory map and to provide from that program counter trace a converted format defining a memory location in association with a function and an offset within the function using the first memory map;
- and
- a second component operable to translate the program counter trace into physical addresses using one of the set of memory maps to be evaluated, different from the first memory map, and to evaluate the number of likely cache misses using a model of a direct-mapped cache for that one memory map under evaluation.
Dependencies are inferred from the claim text.