The present application relates generally to an improved data processing apparatus and method and more specifically to mechanisms for performing data placement optimization using data context information collected during garbage collection operations.
Data context information represents object reference patterns during the execution of a program. Data context information provides valuable information for program understanding, performance analysis, and runtime optimizations. For object oriented applications, numerous objects are created, among which complicated reference patterns may occur. Therefore, data context information is very important for program understanding and optimizations.
However, building data context information can be very expensive given the fact that (1) data accesses are highly frequent (a program can access a huge number of objects in a short period of time); and (2) the access patterns among objects are complex. Therefore, it is desirable to establish a program paradigm that can collect such information efficiently. Sacrificing some accuracy is affordable as long as enough information is available for the purpose of program understanding and optimization.