Edge profiling for executable program code having branches...

Data processing: software development – installation – and managem – Software program development tool – Testing or debugging

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S129000, C717S158000

Reexamination Certificate

active

06795964

ABSTRACT:

FIELD OF THE INVENTION
The present invention generally relates to instrumentation of computer program code, and more particularly to profiling execution characteristics of a binary executable program having branches through stub code segments.
BACKGROUND
Executable computer programs include branch instructions that when executed direct program control to target addresses in the program. In some cases, branch instructions are used to transfer control to a code segment that implements a source-code defined function. For example, if the source code sets forth a “function” that averages an input list of values, the function may be invoked by name in the source code. The executable code includes a target code segment that implements the function and branch instructions having target addresses that reference the target code segment. It will be appreciated that different languages have different names for functions such as procedure, routine, or method.
Binary executable programs are “instrumented” or “profiled” to analyze program performance. The performance data that are gathered can be used to determine which source code might benefit most from improved coding. For example, if a particular function is called within a program loop and the loop is a hot spot during execution, it may be desirable to program the function in-line within the loop rather than as a function call.
A function call may either reference a target function in the same load module, or in a different load module. From the developer's perspective, the source code does not reference load modules. Where a function call references a function in another load module, the code generation and linking phase establishes a stub code segment that is targeted by a first branch instruction. The stub code segment obtains the address of the entry point of the target function in the other load module and then branches to the target. Since the stub code segments are typically not directly associated with any particular lines of the source code, the correlation of execution profile information with the source code can be difficult.
A method and apparatus that address the aforementioned problems, as well as other related problems, are therefore desirable.
SUMMARY OF THE INVENTION
The invention provides profiling of branches that pass through stub code segments in executable program code. The compilation and linking of a computer program sometimes generates stub code segments that implement the transfer of control to functions that are external to a local segment of code. Branches through the stub code segments hinder the analysis of the corresponding edges relative to the source code. In various embodiments of the invention, edges are created to represent respective branch instructions in the executable program code. Each edge has a source attribute, a target attribute, and an edge-taken count attribute. During execution, the numbers of times edges are taken are counted, and stub entry points and stub targets are identified. For each edge having a target that matches an entry point of a stub code segment, the edge target is changed to the stub target associated with the matching entry point. By identifying edges that target stub code segments, edges that target stub code segments can be combined with other edges for correlation with the source code.
Various example embodiments are set forth in the Detailed Description and Claims which follow.


REFERENCES:
patent: 5842017 (1998-11-01), Hookway et al.
patent: 5946486 (1999-08-01), Pekowski
patent: 5970245 (1999-10-01), Poteat et al.
patent: 6026235 (2000-02-01), Shaughnessy
patent: 6233729 (2001-05-01), Campara et al.
patent: 6249907 (2001-06-01), Carter et al.
S. Graham, P. Kessler, M. McKusick; gprof: a Call Graph Execution Profiler; Jun. 1982; Proceedings of the SIGPLAN '82 Symposium on Compiler Construction, SIGPLAN Notices, vol. 17, No. 6.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Edge profiling for executable program code having branches... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Edge profiling for executable program code having branches..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Edge profiling for executable program code having branches... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3234204

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.