Browse Prior Art Database

Code coverage tool using Branch History Rolling Buffer

IP.com Disclosure Number: IPCOM000238960D
Publication Date: 2014-Sep-29
Document File: 2 page(s) / 29K

Publishing Venue

The IP.com Prior Art Database

Abstract

Efficient code coverage tool using hardware registers

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

Page 01 of 2

Code coverage tool using Branch History Rolling Buffer


Disclosed is a framework to efficiently collect the code coverage related data using hardware registers and then build the required flow on same system or another system connected over network.

Identifying code paths covered is a daunting task. There are multiple tools that achieve this, but they need to have the code path analysis done on the system where execution is happening and need some additional software to be installed. On production system these are of disadvantage as users would not prefer this.

Idea is to record the effective address of all the branches happened for an application using Branch History Rolling Buffer facility . Then take this data anywhere be it local or development system to analyze the path followed.

The approach is based on following points:
1. using hardware to record branches
2. decoupling branch data collection and post processing to reduce performance impact. Data can be taken from any machine and analyzed at any other machine.

3. Eliminating the necessity of having a non-stripped binary
4. No need to run the application under any software/program.

Branch History Rolling Buffer ( BHRB ) is a part of performance register set. This register can store about recent N branches in it.

Application will call a library function to do the registration of a handler with performance monitoring framework. This handler would be invoked whenever performance monitoring registers overflow. Following is pseudo-code of collecting the recent branch details:
1. Library function will register user space handler with event based branch facility to be invoked when performance monitoring registers overflow.

2. It then configures the performance registers to count for N-1 instructions of use...