Please enable JavaScript to view this site.

Coverage Validator Help

Navigation: The User Interface > Settings > Data Collection Settings > Instrumentation

Instrumentation Detail

Scroll Prev Top Next More


The Instrumentation Detail page allows you to specify how lines are hooked and how many times a line visit is counted.





Instrumentation detail versus speed of execution


Two instrumentation settings affect how quickly the instrumented program will run:


the hooking of very short lines


Most lines can be monitored using a normal line hooking technology. These hooks are fast but cannot be used for all lines.


Very short lines are hooked using breakpoint hooking technology which is very advanced but also incurs a serious performance penalty for each visit to that line.


the counting of lines on every visit


Counting lines just once is quicker than doing it on every visit.



Instrumentation Level


The instrumentation level lets you balance the detail of collected visit counts for every line against speed of execution.


Incomplete but faster instructionStep Short lines NOT counted. Lines counted once


Incomplete but slower instructionStep Short lines NOT counted. Lines counted every visit.



Complete but faster instructionStep Short lines counted. Lines counted once.


Complete but slower instructionStep Short lines counted. Non-breakpoint lines counted every visit. Breakpoint lines counted once.



More about very short lines


For instruction sequences that are too short (less than 5 bytes) to be hooked, Coverage Validator has an additional method of hooking instructions.


Breakpoint instruction and operating system exception handler routines intercept individual breakpoint instructions and direct the exception handler to the original code for the line.


Due to the exception handling overhead for each instruction hooked this way this is a slower execution method than normal line hooking.


It is effective however, and allows Coverage Validator to hook most lines in most applications with no failures.


The only instructions that can't be hooked are breakpoints and the various x86 LOOP instructions, which are avoided by modern compilers.



Caveats to hooking very short lines


There are two caveats to using the Breakpoint Hooks option.


You can't use them at the same time as:


Running your application in the debugger (or attaching the debugger to your application) at the same time as using Coverage Validator to monitor the application.


The debugger will see the breakpoint exception before our hook on the exception handling mechanism.


Using MAP files for release builds.

The information in the MAP file does not correctly identify the start of individual lines of code.


This is because the MAP file is produced before the linker optimizer re-arranges the code for the specified optimization flags.


Because it is not possible to differentiate between debug build MAP files and release build MAP files, Coverage Validator will not use Breakpoint Hooks with MAP files.



Reset All - Resets all global settings, not just those on the current page.



Reset - Resets the settings on the current page.