IP Library Granted Patent US 7,661,095
Granted Patent B2
US 7,661,095 · App. 11/109,019 · Granted Feb 9, 2010

System and method to build a callgraph for functions with multiple entry points

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,661,095
App. No.
11/109,019
Granted
Feb 9, 2010
Kind
B2
Abstract

A technique for building a callgraph for a software program that includes multiple function entry points using dynamic instrumentation. In one example embodiment, this is achieved by inserting function count probe code at each function entry point of each multiple entry function having multiple function entry points in the software program. Inter-entry point arc probe code is then inserted substantially before each arc source address of an arc. A performance analysis tool is then used to collect data resulting from execution of the software program including the function count probe code and the inter-entry point arc probe code and to obtain an actual function count value for each multiple entry function. A callgraph is then built using the obtained actual function count values.

Claims (64)

1. A method of building a callgraph for multiple entry functions in a software program using dynamic instrumentation comprising:

inserting function count probe code at each function entry point of each multiple entry function in the software program, wherein the multiple entry function has multiple function entry points;

inserting inter-entry point arc probe code substantially before each arc source address of an arc in the software program;

collecting data resulting from execution of the software program including the function count probe code and the inter-entry point arc probe code, wherein the collected data includes a function count value and an inter-entry point arc count value for each arc source address obtained from execution of the software program;

adding function count values obtained at each function entry point to obtain a total function count value;

determining whether each arc with a source address in a multiple entry function is associated with an arc target address at one of the function entry points of an associated multiple entry function, wherein at least one of the function entry points is associated with the total function count value;

if yes, subtracting the inter-entry point arc count value from the associated total function count value to obtain an actual function count value for the associated multiple entry function; and

constructing a callgraph using the actual function count value associated with each multiple entry function.

2. The method of claim 1 , further comprising:

inserting arc count probe code substantially before the inter-entry point arc probe code;

collecting data resulting from execution of the arc count probe code;

generating an arc count value associated with each inter-entry point arc probe code using the collected data.

3. The method of claim 1 , further comprising:

inserting the inter-entry point arc probe code and the function count probe code dynamically such that instrumentation is inserted into an executing portion of the software program.

4. The method of claim 1 , further comprising:

dynamically instrumenting at least one multiple entry function in the software program when one of the multiple function entry points is encountered during the execution of the software program.

5. The method of claim 1 , further comprising:

reading hardware registers of a computer system executing the software program to collect the data regarding the hardware registers when one of the multiple function entry points is encountered during execution of the software program.

6. A method comprising:

inserting function count probe code at each function entry point of each multiple entry function in a software program during runtime, wherein the multiple entry function has multiple function entry points;

inserting inter-entry point arc probe code substantially adjacent and before each arc source address of an arc in the software program during the runtime;

collecting data resulting from execution of the software program including the function count probe code and the inter-entry point arc probe code, wherein the collected data includes a function count value and an inter-entry point arc count value for each arc source address obtained from execution of the software program;

adding function count values obtained at each function entry point to obtain a total function count value;

determining whether each arc with a source address in a multiple entry function is associated with an arc target address at one of the function entry points of an associated multiple entry function, wherein at least one of the function entry points is associated with the total function count value;

if yes, subtracting the inter-entry point arc count value from the associated total function count value to obtain an actual function count value for the associated multiple entry function; and

constructing a callgraph using the actual function count value associated with each multiple entry function.

7. The method of claim 6 , further comprising:

inserting arc count probe code substantially before the inter-entry point arc probe code; and

collecting data resulting from execution of the arc count probe code; and

generating an arc count value associated with each inter-entry point arc probe code using the collected data.

8. An article comprising:

a storage medium having instructions that, when executed by a computing platform, result in execution of a method comprising:

inserting function count probe code at each function entry point of each multiple entry function in the software program, wherein the multiple entry function has multiple function entry points;

inserting inter-entry point arc probe code substantially before each arc source address of an arc in the software program;

collecting data resulting from execution of the software program including the function count probe code and the inter-entry point arc probe code, wherein the collected data includes a function count value and an inter-entry point arc count value for each arc source address obtained from execution of the software program;

adding function count values obtained at each function entry point to obtain a total function count value;

determining whether each arc with a source address in a multiple entry function is associated with an arc target address at one of the function entry points of an associated multiple entry function, wherein at least one of the function entry points is associated with the total function count value;

if yes, subtracting the inter-entry point arc count value from the associated total function count value to obtain an actual function count value for the associated multiple entry function; and

constructing a callgraph using the actual function count value associated with each multiple entry function.

9. The article of claim 8 , further comprising:

inserting arc count probe code substantially before the inter-entry point arc probe code; and

collecting data resulting from execution of the arc count probe code; and

generating an arc count value associated with each inter-entry point arc probe code using the collected data.

10. The article of claim 8 , further comprising:

inserting the inter-entry point arc probe code and the function count probe code dynamically such that instrumentation is inserted into an executing portion of the software program.

11. A computer system comprising:

a network interface;

an input module coupled to the network interface that receives the input data via the network interface;

a processor; and

a memory coupled to the processor, the memory having stored therein code which when decoded by the processor, the code causes the processor to perform a method comprising:

inserting function count probe code at each function entry point of each multiple entry function in the software program, wherein the multiple entry function has multiple function entry points;

inserting inter-entry point arc probe code substantially before each arc source address of an arc in the software program;

collecting data resulting from execution of the software program including the function count probe code and the inter-entry point arc probe code, wherein the collected data includes a function count value and an inter-entry point arc count value for each arc source address obtained from execution of the software program;

adding function count values obtained at each function entry point to obtain a total function count value;

determining whether each arc with a source address in a multiple entry function is associated with an arc target address at one of the function entry points of an associated multiple entry function, wherein at least one of the function entry points is associated with the total function count value;

if yes, subtracting the inter-entry point arc count value from the associated total function count value to obtain an actual function count value for the associated multiple entry function; and

constructing a callgraph using the actual function count value associated with each multiple entry function.

12. The system of claim 11 further comprising:

inserting arc count probe code substantially before the inter-entry point arc probe code; and

collecting data resulting from execution of the arc count probe code; and

generating an arc count value associated with each inter-entry point arc probe code using the collected data.

13. The system of claim 11 , further comprising:

inserting the inter-entry point arc probe code and the function count probe code dynamically such that instrumentation is inserted into an executing portion of the software program.

14. The system as claimed in any preceding claim wherein the data is collected using a performance analysis tool.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 6, 2021
From: OT PATENT ESCROW, LLC
To: VALTRUS INNOVATIONS LIMITED
Reel/Frame 056157/0492 →
PATENT ASSIGNMENT, SECURITY INTEREST, AND LIEN AGREEMENT Recorded Jan 26, 2021
From: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP; HEWLETT PACKARD ENTERPRISE COMPANY
To: OT PATENT ESCROW, LLC
Reel/Frame 055269/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 9, 2015
From: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
To: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
Reel/Frame 037079/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 14, 2005
From: GEORGE, JINI SUSAN
To: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
Reel/Frame 016481/0990 →