sofya.ed
Class cfInstrumentor
java.lang.Object
sofya.ed.cfInstrumentor
- All Implemented Interfaces:
- SConstants
public final class cfInstrumentor
- extends java.lang.Object
- implements SConstants
Front end to the Sofya structural instrumentors, used to instrument subject
class files.
Usage:
java sofya.ed.cfInstrumentor [-port n] [-so]
[-cl listfile] [-t inst_type]
<-branch|-<B|E|X|C>>
<classname|jarfile|listfile>
[classname|jarfile ...]
-port n : Instrument subject to
send trace statements on port number n
-so : Insert only the SocketProbe start
call in the appropriate location
-cl listfile : Instrument only
those classes which are found in the given .prog file
(primarily useful with jar files)
-type inst_type : Specifies type
of instrumentation to be inserted. Must be one of the given values:
comp : Compatible instrumentation,
works with all processing strategies for the program event dispatcher
norm : Normal (optimized)
instrumentation
junit : JUnit instrumentation,
works only with the JUnit event dispatcher and processing strategies
seq: Sequence instrumentation
Additionally, each type of instrumentation
may also be qualified with the addition of ",junit"
(as in "-t seq,junit") to signify
that it is intended for use with the JUnit event dispatcher. The
unqualified
use of "junit"
(e.g. "-t junit") is retained for compatibility with existing
scripts
and is equivalent to
"-t norm,junit".
The default instrumentation type is
normal.
<-branch|-<B|E|X|C>> : If
the option '-branch' is specified, branch instrumentation will
be inserted. Otherwise basic block instrumentation is inserted and the
block types to be instrumented must be specified using any
permutation of the following : B-Basic,E-Entry,X-Exit,C-Call
Special note on thread safety: The following
considerations hold with respect to multi-threaded subjects:
- Generation of coverage traces for non-JUnit subjects is always thread
safe - certain race conditions may exist but they only result in redundant
work, which is considered preferable to the cost of additional
synchronization.
- For reasons related to the design of the JUnit framework, multi-threaded
modes of JUnit test execution should not be used with
instrumentation and
JUnitEventDispatcher
!
- Sequence instrumentation is not thread-safe! Compatible
mode instrumentation should be used instead.
- When sequence tracing a subject with compatible mode instrumentation,
it can only be guaranteed that no block will be erroneously traced
multiple times for a single traversal of the block during execution. No
guarantee can be made that all blocks will be traced in the exact order
in which they were traversed during execution of one thread relative to
blocks that may be traversed during execution of other threads.
- Version:
- 05/12/2005
- Author:
- Alex Kinneer
Method Summary |
static void |
main(java.lang.String[] argv)
Entry point for cfInstrumentor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
main
public static void main(java.lang.String[] argv)
- Entry point for cfInstrumentor.
Parses the command line parameters, creates the Instrumentor,
and instruments the specified class.