Browse Prior Art Database

Fine grained code profiling using dynamic tracing framework and hardware performance counters Disclosure Number: IPCOM000238961D
Publication Date: 2014-Sep-29
Document File: 2 page(s) / 35K

Publishing Venue

The Prior Art Database


Profiling code with hardware performance counters on the basis of criteria selectable by user with the help of dynamic tracing framework.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 51% of the total text.

Page 01 of 2

Fine grained code profiling using dynamic tracing framework and hardware performance counters

Disclosed is a framework to achieve a fine grained level of performance analysis of the code with the help of dynamic tracing framework. By fine grained analysis the intention is to bring out the perspective of selective performance analysis. This selection can be based on the function, arguments passed to function, if, the function is called from a particular stack etc.

Since such capabilities do exist to some extent in dynamic tracing framework, the implementation could be thought to exploit it.

For the rest of the discussion, we would consider one of the optimizer to bolster the idea presented here. We pick Java optimizer for this purpose.

Existing infrastructure of Java optimizer ( JO ), forces JO to have a monitor thread that sets up the hardware performance counting for the threads and fetch the same on overflow and analyze the data. Based on the analysis JO will optimize the running application.

Here, if, JO sets up the hardware performance counting for other threads within the same process, it is set for the thread as entire entity but not at each function level. If, it is to be set for each function, then application code would need to be modified to insert setting up of hardware performance counter configurations.

Hence the existing disadvantages are:
1. Not easy to set hardware performance counting per function - needs code modification
2. If, there are changes to the event set of hardware performance monitoring counters, JO would need to be enhanced i.e. code modification involved.

Hardware performance counting refers to counting the number of cache misses, L2 cache misses etc. which are counted in hardware counters.

The idea presented is, to integrate hardware performance monitoring counters capability with dynamic tracing framework and add support such that if, the invoker of dynamic tracing framework passes a buffer, the framework is capable to write to that buffer instead if its own defined buffers.

With above we will have following advantages:
1. Using dynamic tracing framework for this, Java system optimizer will never have to change. Only dynamic tracing scripts/input will change - which can be updated very easily. No mainstream code modification and recompiling.

2. Very easy to do performance monitoring based on hardware counters. - JO will be able to achieve fine grained analysis of the application to the level of the functions.

Lets look a...