Memory allocation profiling to discover high frequency...

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

C717S127000, C717S158000

Reexamination Certificate

active

06817011

ABSTRACT:

BACKGROUND
1. Field of the Present Invention
The present invention is related to the field of computer software and more particularly to a method and system for monitoring memory allocation in a computer system.
2. History of Related Art
In the field of computer software, execution profiling tools are commonly used to identify frequently executed code and calling sequences. By monitoring these events, system programmers can focus their attention on the code paths likely to have the greatest impact on overall performance. Typically, these tools are implemented with time based sampling techniques in which the currently executing code is observed at regular intervals. Sampling is generally required because a complete trace of the execution of every bit of code in a program would reduce the performance beyond a feasible level and would result in an unwieldy amount of data. While, such tools are commonly available for the purposes of monitoring software execution, there is a lack of adequate tools for monitoring memory allocation performance. In high level applications programming languages like C/C++, memory management is handled by the programmer. When memory management is directly handled by the programmer, a tool designed to specifically track memory allocation might be considered as less than critical. In other programming languages, such as the Java programming language, the allocation of memory and, to an even greater extent, the deallocation of memory is largely beyond the programmer's control. In Java, allocation of memory is achieved by the creation of new objects. (Even array types are treated as objects in the Java programming language). While delegating the allocation of memory to objects in the Java programming languages reduces premature deallocation of memory (corrupted pointers) and the incomplete deallocation (memory leaks), it does make it more difficult for the programmer to analyze any memory allocation problems that the system may produce. Even in languages like C++, the extensive use of pre-existing software libraries removes much of the memory allocation activity from the application programmer's direct control. It would therefore be desirable to implement a tool suitable for monitoring memory allocation performance of a computer system. It would be further desirable if the performance monitoring tool were capable of monitoring allocation of memory by a high level programming language such as the Java programming language. It would be further desirable if the implemented solution did not significantly increase the complexity of the software system.
SUMMARY OF THE INVENTION
The problem identified above is addressed, in large part, by a method, system, and computer program product for profiling memory allocation in a data processing system. The method includes, upon receiving a memory allocation request, profiling the memory allocation request to determine a prescribed set of characteristics associated with the request. The profiled set of characteristics is the stored for subsequent review. In one embodiment, the profiled memory allocation request is selectively chosen from a set of memory allocation requests on the basis of a memory allocation sampling criterion. The sampling criterion may be based upon the size of the memory block requested in the memory allocation request in one embodiment. In an alternative embodiment, the sampling criterion is the based upon the number of memory allocation requests. In an embodiment with multiple memory allocation routines, the memory allocation request may be of a first memory allocation routine type and the sampling criterion may be based upon the number of memory allocation requests of the first type. In one embodiment, the set of characteristics monitored by the application program includes the calling sequence that resulted in the memory allocation request. In one embodiment, the memory allocation request may be initiated by an application program written in the Java programming language and the memory allocation request is handled by a Java Virtual Machine.
The invention further contemplates a data processing system and an associated computer program product. The computer program product is a computer readable media including a set of instructions executable by a data processing system and suitable for profiling memory allocation requests. The set of recorded instructions includes sampling means for determining if a memory allocation request satisfies a profiling criterion and profiling means that are responsive to determining that the memory allocation request fulfills the profiling criterion. The profiling means is suitable for determining a set of characteristics associated with the memory allocation request. The set of instructions further includes means for storing the profiled set of characteristics for subsequent review. In one embodiment, the sampling means includes means for counting the number of memory allocation requests since a preceding memory allocation request was profiled and profiling the current memory allocation request if the number exceeds a specified threshold. In an alternative embodiment, the sampling means comprise means for determining the size of memory requested in the memory allocation request and profiling the memory request if the size exceeds a specified threshold. In another embodiment, the sampling means comprise means for determining the cumulative size of memory allocated since the profiling means was previously invoked. The profiling means includes means for determining the process, thread, and calling sequence that initiated the memory allocation request. In one embodiment, the profiling means are included in a memory allocation routine within a Java Virtual Machine.


REFERENCES:
patent: 5355457 (1994-10-01), Shebanow et al.
patent: 5355487 (1994-10-01), Keller et al.
patent: 5408650 (1995-04-01), Arsenault
patent: 5491808 (1996-02-01), Geist, Jr.
patent: 5613063 (1997-03-01), Eustace et al.
patent: 5748878 (1998-05-01), Rees et al.
patent: 5784554 (1998-07-01), Hsiung
patent: 5835701 (1998-11-01), Hastings
patent: 5835702 (1998-11-01), Levine et al.
patent: 5896538 (1999-04-01), Blandy et al.
patent: 5991708 (1999-11-01), Levine et al.
patent: 5995754 (1999-11-01), Holzle et al.
patent: 6167535 (2000-12-01), Foote et al.
patent: 6311327 (2001-10-01), O'Brien et al.
patent: 6349406 (2002-02-01), Levine et al.
patent: 6457142 (2002-09-01), Klemm et al.
Y. Liao et al., “A Specificational Approach to High Level Program Monitoring and Measuring”, IEEE Transactions on Software Engineering vol. 18 No. 11, Nov. 1992. pp. 969-978.*
Zorn et al., “A Memory Allocation Profiler for C and Lisp Programs”, 1988, pp. 1-15.*
Lee et al., “BIT: A Tool for Instrumenting Java Bytecodes”, USENIX Association, 1997. pp. 1-10.*
Ball et al., “Rewriting Executable Files to Measure Program Behavior”, University of Wisconsin Computer Sciences Technical Report 1083, 1992. pp. 1-17.*
Cooper et al., “ProfBuilder: A Package for Rapidly Building Java Execution Profilers”, University of Colorado at Boulder, Technical Report CU-CS-853-98, 1998. pp. 1-23.*
Detlefs et al., “Memory Allocation Costs in Large C and C++ Programs”, University of Colorado at Boulder, Technical Report CU-CS-665-93, 1993. pp. 1-10.*
Graham et al., “gprof: a Call Graph Execution Profiler”, Computer Science Division Electrical Engineering and Computer Science Department University of California, Berkeley, pp. 1-9.*
Ammons et al., “Exploiting Hardware Performance Counters with Flow and Context Sensitive Profiling”, Wright Laboratory Avionics Directorate.*
Liang et al., “Comprehensive Profiling Support in the Java Virtual Machine”, Sun Microsystems Inc.*
Profiling Technique for Memory References Within Individual Pages On Paging-Based Virtual Memory Systems; IBM Technical Disclosure Bulletin; ; Aug. 1992; pp. 320-325; vol. 35; No. 3.
Memory Utilization Monitor; IBM Technical Disclosure Bulletin; Oct. 1972; pp. 1709-1712; vol. 15; No. 5.

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

Memory allocation profiling to discover high frequency... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Memory allocation profiling to discover high frequency..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Memory allocation profiling to discover high frequency... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3332666

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