Integration by Instrumentation
In instrumentation, the tool source code is modified to include some calls to the VOV Instrumentation Library (VIL). This library is also accessible via the VILtools library, which is a collection of utilities that can be embedded into scripts and batch files.
The instrumentation library provides runtime traceability with minimum change to the source code and with no change to the tool behavior. The instrumentation library is small (about 13KB), fast, and, if FlowTracer is not running, completely passive.
The VIL library is provided also in source code.
The code modifications take only a few minutes of file editing.
/* Example of an instrumented "Hello World" program. */
1. #include <stdio.h>
2. #include "vil.h"
3.
4. int main( argc, argv )
5. int argc;
6. char* argv[];
7. {
8. int i, n = 20;
9. FILE* fp;
10.
11. if ( argc > 1 ) {
12. n = atoi( argv[1] );
13. }
14. VovBegin( argc, argv );
15. VovExecutable( argv[0] );
16. fp = VovFopen( "Hello", "w" );
17. for ( i = 1 ; i <= n; i++ ) {
18. fprintf( fp, "%2d - HELLO WORLD\n", i );
19. }
20. fclose( fp );
21. VovEnd( 0 );
22. }