The invention relates to a method and apparatus for stack frame elimination for simple procedures with tail calls. Subject to certain prerequisite constraints, the invention modifies the procedure by converting all tail calls to direct branches. The code in the computer program for constructing and deconstructing the stack frame is eliminated. In a preferred embodiment of the invention, dead code elimination is performed on unreachable code. In an alternative, equally preferred embodiment, dead code is retained in the computer program.
Method And Apparatus For Dynamic Process Monitoring Through An Ancillary Control Code System
James S. Mattson - Campbell CA Lacky V. Shah - Sunnyvale CA William B. Buzbee - Half Moon Bay CA
Assignee:
Hewlett-Packard Company - Palo Alto CA
International Classification:
G06F 9445
US Classification:
395701
Abstract:
A method and apparatus for improving the process of software development by a dynamic software development tool. The present invention allows the execution of an emulation tool to occur under the control of the original user process and preserves the execution flow of the user process instructions. The present invention manages the execution of the emulation tool within the computer memory. The present invention uses the user process code as data to direct the execution of the emulation tool. The present invention enables the use of other software development tools such as monitoring and profiling tools, program analysis tools, simulation tools, and software debugging tools.
System, Method, And Product For Multi-Branch Backpatching In A Dynamic Translator
James S. Mattson - Campbell CA Lacky V. Shah - Sunnyvale CA William B. Buzbee - Half Moon Bay CA Manuel E. Benitez - Cupertino CA
Assignee:
Hewlett-Packard Company - Palo Alto CA
International Classification:
G06F 945
US Classification:
717 9
Abstract:
A computer-implemented system, method, and product are provided for multi-branch backpatching in a dynamic translator. Such backpatching typically increases the speed of execution of translated instructions by providing a direct control path from translated multi-branch-jump instructions to their translated target instructions. In one embodiment, the multi-branch backpatching dynamic translator undertakes backpatching on an "as-needed" basis at run time. That is, backpatching is done for those branch targets that are executed rather than for all branch targets, or rather than for those branch targets that are estimated or assumed will be executed. Such backpatching is accomplished in one embodiment by generating dynamic backpatching code specific to each translated multi-branch-jump instruction. A multi-branch jump, or switch, table of each multi-branch-jump instruction is initialized so that all entries direct control to the dynamic backpatching code for that instruction. As branches of the multi-branch-jump instruction are executed, the dynamic backpatching code enables a backpatcher that replaces the corresponding entry in the translated multi-branch-jump table with pointers to the address of the translated target address, if present.
Compiling Strong And Weak Branching Behavior Instruction Blocks To Separate Caches For Dynamic And Static Prediction
James S. Mattson - Campbell CA Lacky V. Shah - Fremont CA William B. Buzbee - Half Moon Bay CA
Assignee:
Hewlett-Packard Company - Palo Alto CA
International Classification:
G06F 1500
US Classification:
712239
Abstract:
A method and apparatus varies branch prediction strategy associated with branch instructions in a trace of program code. The present invention first profiles branch instructions within a trace to record branching behavior. Next, the present invention partitions branch instructions into groups of branch instructions that can be statically predicted and groups of branch instructions that can be dynamically predicted. Branch instructions that are profiled to have "strong" branching behavior (e. g. , the same branch direction is taken 80% of the time) are placed in the group of branch instruction that are statically predicted. Branch instructions that are profiled to have "weak" branching behavior (e. g. , the same branch direction is taken 60% of the time) are placed in the group of branch instruction that are dynamically predicted. Finally, branch instructions are adjusted by associating an indication of prediction strategy with each profiled branch instruction.
Method, Apparatus, And Product For Dynamic Software Code Translation System
James S. Mattson - Campbell CA Lacky V. Shah - Sunnyvale CA William B. Buzbee - Half Moon Bay CA Manuel E. Benitez - Cupertino CA
Assignee:
Hewlett-Packard Company - Palo Alto CA
International Classification:
G06N 945
US Classification:
39550002
Abstract:
A method and apparatus for improving the process of software development by a dynamic software development tool. The present invention efficiently executes in a user process and provides software developers with a high performance tool for software optimization. The present invention may augment the user process code instructions at runtime and, for every series of machine instructions that the original user source code would have executed, a series of instructions may be executed that are semantically equivalent to the user process code instructions and are altered to optimize the user process code instructions. The present invention may use emulation or translation to alter the user process code instructions. The resulting process is executed in the user process space and advantageously maintains the original flow of instruction execution. The present invention employs a technique of dynamically translating code at runtime and may operate on a virtual machine or a hardware machine.
System And Method For Optimization Of Inter-Module Procedure Calls
A system and method are described for providing optimization for software inter-module procedure calls. The system provides for a program linker to translate a non-executable program into a computer program. The program linker also creates an import stub when the program linker encounters a call instruction to an unresolved module in the computer program. The program linker further modifies the call instruction to the unresolved module to be a call instruction to the created import stub. The import stub determines a location of the unresolved module a first time the unresolved module is called. The import stub then modifies the call instruction to the unresolved module the first time the unresolved module is called to be a direct call the unresolved module at the location determined after the first time the unresolved module is called.
Control Path Evaluating Trace Designator With Dynamically Adjustable Thresholds For Activation Of Tracing For High (Hot) Activity And Low (Cold) Activity Of Flow Control
Manuel E. Benitez - Cupertino CA James S. Mattson - Campbell CA William B. Buzbee - Half Moon Bay CA Lacky V. Shah - Sunnyvale CA
Assignee:
Hewlett-Packard Company - Palo Alto CA
International Classification:
G06F 944
US Classification:
717 4
Abstract:
A computer-implemented system, method, and product are provided to designate and translate traces of original instructions of an executable file at run time based on dynamic evaluation of control flow through frequently executed traces of instructions. Such designation typically reduces unnecessary translations and optimizations, and thereby increases execution speed and reduces the usage of memory and other resources. The invention includes a hot trace identifier to identify frequently executed traces of instructions and a hot trace instrumenter to instrument such frequently executed traces so that control flow through them may be recorded. If the amount or rate of control flow through a frequently executed trace exceeds a threshold value, a hot trace selector is invoked to select a hot trace of original instructions including those of the frequently executed trace. The hot trace may be dynamically optimized. The system, method, and product also provide for the continuous recording of control flow through hot traces.
Isbn (Books And Publications)
Water Quality Measurement: The Modern Analytical Techniques