private void analyzeLocal(SootMethod method, Value value) { Local l = (Local) value; boolean objIsThreadLocal = tloa.isObjectThreadLocal(l, method); if (objIsThreadLocal) { G.v().out.println("[lg.tlo] LOCAL " + l.toString() + " is thread-local in method " + method); } else { G.v().out.println("[lg.tlo] LOCAL " + l.toString() + " is thread-shared in method " + method); } }
private void analyzeField(SootMethod method, Value value) { FieldRef fr = (FieldRef) value; boolean fieldIsThreadLocal = tloa.isObjectThreadLocal(fr, method); if (fieldIsThreadLocal) { G.v().out.println("[lg.tlo] FIELD " + fr.toString() + " is thread-local in method " + method); } else { G.v() .out .println("[lg.tlo] FIELD " + fr.toString() + " is thread-shared in method " + method); } }
@Override protected void internalTransform(String phaseName, Map options) { tloa = getTLOA(); tloa.precompute(); iterateAllMethods(); }