Class AbstractReferenceCountingGarbageCollector<N,D,A>
java.lang.Object
soot.jimple.infoflow.solver.gcSolver.AbstractGarbageCollector<N,D,A>
soot.jimple.infoflow.solver.gcSolver.AbstractReferenceCountingGarbageCollector<N,D,A>
- All Implemented Interfaces:
IGarbageCollector<N,,D> IGarbageCollectorPeer<A>
- Direct Known Subclasses:
FineGrainedReferenceCountingGarbageCollector,MethodLevelReferenceCountingGarbageCollector
public abstract class AbstractReferenceCountingGarbageCollector<N,D,A>
extends AbstractGarbageCollector<N,D,A>
implements IGarbageCollectorPeer<A>
Abstract base class for garbage collectors based on reference counting
- Author:
- Steven Arzt
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final ExtendedAtomicIntegerprotected intWait for at least this number of edges before starting the garbage collectionprotected final AtomicIntegerprotected final AtomicIntegerprotected ConcurrentCountingMap<A>protected intThe number of methods to collect as candidates for garbage collection, before halting the taint propagation and actually cleaning them upprotected GarbageCollectorPeerGroup<A>protected GarbageCollectionTriggerprotected booleanFields inherited from class soot.jimple.infoflow.solver.gcSolver.AbstractGarbageCollector
icfg, jumpFunctions, referenceProvider -
Constructor Summary
ConstructorsConstructorDescriptionAbstractReferenceCountingGarbageCollector(soot.jimple.toolkits.ide.icfg.BiDiInterproceduralCFG<N, soot.SootMethod> icfg, soot.util.ConcurrentHashMultiMap<A, heros.solver.PathEdge<N, D>> jumpFunctions) AbstractReferenceCountingGarbageCollector(soot.jimple.toolkits.ide.icfg.BiDiInterproceduralCFG<N, soot.SootMethod> icfg, soot.util.ConcurrentHashMultiMap<A, heros.solver.PathEdge<N, D>> jumpFunctions, IGCReferenceProvider<A> referenceProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidImmediately performs garbage collectionprotected abstract AgenAbstraction(heros.solver.PathEdge<N, D> edge) intGets the number of methods for which taint abstractions were removed during garbage collectionintGets the number of taint abstractions that were removed during garbage collectionvoidnotifyEdgeSchedule(heros.solver.PathEdge<N, D> edge) Notifies the garbage collector that a new edge has been scheduled for processingvoidnotifyTaskProcessed(heros.solver.PathEdge<N, D> edge) Notifies the garbage collector that an edge has been fully processedprotected voidMethod that is called after the last edge has been removed from the jump functionsprotected voidMethod that is called before the first edge is removed from the jump functionsvoidsetCheckChangeCounter(boolean checkChangeCounter) Sets whether the change counter shall be checked when identifying active method dependenciesvoidsetEdgeThreshold(int threshold) Sets the minimum number of edges that shall be propagated before triggering the garbage collectionvoidsetMethodThreshold(int threshold) Sets the number of methods for which edges must have been added before garbage collection is startedvoidsetPeerGroup(GarbageCollectorPeerGroup<A> peerGroup) Sets the peer group in which this solver operates.voidsetTrigger(GarbageCollectionTrigger trigger) Set the trigger that defines when garbage collection shall be startedMethods inherited from class soot.jimple.infoflow.solver.gcSolver.AbstractGarbageCollector
createReferenceProvider, getRemainingPathEdgeCount, initializeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface soot.jimple.infoflow.solver.gcSolver.IGarbageCollector
gc, notifySolverTerminatedMethods inherited from interface soot.jimple.infoflow.solver.gcSolver.IGarbageCollectorPeer
hasActiveDependencies, notifySolverTerminated
-
Field Details
-
jumpFnCounter
-
gcScheduleSet
-
gcedAbstractions
-
gcedEdges
-
edgeCounterForThreshold
-
trigger
-
peerGroup
-
checkChangeCounter
protected boolean checkChangeCounter -
validateEdges
protected boolean validateEdges -
oldEdges
-
methodThreshold
protected int methodThresholdThe number of methods to collect as candidates for garbage collection, before halting the taint propagation and actually cleaning them up -
edgeThreshold
protected int edgeThresholdWait for at least this number of edges before starting the garbage collection
-
-
Constructor Details
-
AbstractReferenceCountingGarbageCollector
-
AbstractReferenceCountingGarbageCollector
-
-
Method Details
-
genAbstraction
-
notifyEdgeSchedule
Description copied from interface:IGarbageCollectorNotifies the garbage collector that a new edge has been scheduled for processing- Specified by:
notifyEdgeSchedulein interfaceIGarbageCollector<N,D> - Parameters:
edge- The edge that has been scheduled
-
notifyTaskProcessed
Description copied from interface:IGarbageCollectorNotifies the garbage collector that an edge has been fully processed- Specified by:
notifyTaskProcessedin interfaceIGarbageCollector<N,D> - Parameters:
edge- The edge has been fully processed
-
gcImmediate
protected void gcImmediate()Immediately performs garbage collection -
onBeforeRemoveEdges
protected void onBeforeRemoveEdges()Method that is called before the first edge is removed from the jump functions -
onAfterRemoveEdges
protected void onAfterRemoveEdges()Method that is called after the last edge has been removed from the jump functions- Parameters:
gcedMethods- The number of methods for which edges have been removed
-
getGcedAbstractions
public int getGcedAbstractions()Description copied from interface:IGarbageCollectorGets the number of methods for which taint abstractions were removed during garbage collection- Specified by:
getGcedAbstractionsin interfaceIGarbageCollector<N,D> - Returns:
- The number of methods for which taint abstractions were removed during garbage collection
-
getGcedEdges
public int getGcedEdges()Description copied from interface:IGarbageCollectorGets the number of taint abstractions that were removed during garbage collection- Specified by:
getGcedEdgesin interfaceIGarbageCollector<N,D> - Returns:
- The number of taint abstractions that were removed during garbage collection
-
setMethodThreshold
public void setMethodThreshold(int threshold) Sets the number of methods for which edges must have been added before garbage collection is started- Parameters:
threshold- The threshold of new methods required to trigger garbage collection
-
setEdgeThreshold
public void setEdgeThreshold(int threshold) Sets the minimum number of edges that shall be propagated before triggering the garbage collection- Parameters:
threshold- The minimum number of edges that shall be propagated before triggering the garbage collection
-
setTrigger
Set the trigger that defines when garbage collection shall be started- Parameters:
trigger- The trigger that defines when garbage collection shall be started
-
setPeerGroup
Sets the peer group in which this solver operates. Peer groups are used to synchronize active dependencies between multiple solvers.- Parameters:
peerGroup- The peer group
-
setCheckChangeCounter
public void setCheckChangeCounter(boolean checkChangeCounter) Sets whether the change counter shall be checked when identifying active method dependencies- Parameters:
checkChangeCounter- True to ensure consistency using change counters, false otherwise
-