harpoon.Instrumentation.AllocationStatistics
Class InstrumentAllocs

java.lang.Object
  extended by harpoon.Analysis.Transformation.MethodMutator
      extended by harpoon.Instrumentation.AllocationStatistics.InstrumentAllocs
All Implemented Interfaces:
Serializable

public class InstrumentAllocs
extends MethodMutator
implements Serializable

InstrumentAllocs adds calls to instrumenting code to each allocation site and, if explicitly requested, to each synchronization instruction. If call chain sensitivity is requested, instrumentation is added around method calls to. The produced code prints the instrumentation statistics at the end of the program.

Version:
$Id: InstrumentAllocs.java,v 1.5 2004/02/08 03:21:32 cananian Exp $
Author:
Brian Demsky <bdemsky@mit.edu>
See Also:
Serialized Form

Constructor Summary
InstrumentAllocs(HCodeFactory parent, HMethod main, Linker linker, AllocationNumbering an, boolean syncs, boolean callchains)
          Creates a InstrumentAllocs.
 
Method Summary
static HMethod getMethod(Linker linker, String clsn, String mn, HClass[] atypes)
          Returns that method of class clsn that is called mn and has arguments of types a_types.
protected  HCode mutateHCode(HCodeAndMaps input)
          Override this method to effect transformations on split methods.
 
Methods inherited from class harpoon.Analysis.Transformation.MethodMutator
cloneHCode, codeFactory, mutateCodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstrumentAllocs

public InstrumentAllocs(HCodeFactory parent,
                        HMethod main,
                        Linker linker,
                        AllocationNumbering an,
                        boolean syncs,
                        boolean callchains)
Creates a InstrumentAllocs.

Parameters:
parent - HCodeFactory that provides the code to instrument
main - main method of the instrumented program
linker - linker for the code to instrument
an - AllocationNumbering for the allocation/call sites
syncs - if true, then the synchronization operations are instrumented too.
callchains - if true, the instrumented code will record the call chains for ecah execution of the instrumented instructions.
Method Detail

getMethod

public static HMethod getMethod(Linker linker,
                                String clsn,
                                String mn,
                                HClass[] atypes)
Returns that method of class clsn that is called mn and has arguments of types a_types.


mutateHCode

protected HCode mutateHCode(HCodeAndMaps input)
Description copied from class: MethodMutator
Override this method to effect transformations on split methods.

Overrides:
mutateHCode in class MethodMutator