Search in sources :

Example 6 with CacheCostCalculationMethod

use of com.jopdesign.wcet.ipet.IPETConfig.CacheCostCalculationMethod in project jop by jop-devel.

the class WCETAnalysis method runGlobal.

private void runGlobal(MethodInfo targetMethod) throws InvalidFlowFactException, LpSolveException, UnsupportedCacheModelException {
    CacheCostCalculationMethod requestedCacheApprox = IPETConfig.getRequestedCacheApprox(config);
    GlobalAnalysis an = new GlobalAnalysis(wcetTool, ipetConfig);
    Segment target = Segment.methodSegment(targetMethod, CallString.EMPTY, wcetTool, wcetTool.getCallstringLength(), wcetTool);
    /* Run global analysis */
    // for(CacheCostCalculationMethod cacheApprox : CacheCostCalculationMethod.values()) {
    LpSolveWrapper.resetSolverTime();
    long start = System.nanoTime();
    wcet = an.computeWCET(targetMethod.getShortName(), target, requestedCacheApprox);
    long stop = System.nanoTime();
    report(wcet, start, stop, LpSolveWrapper.getSolverTime());
}
Also used : CacheCostCalculationMethod(com.jopdesign.wcet.ipet.IPETConfig.CacheCostCalculationMethod) GlobalAnalysis(com.jopdesign.wcet.analysis.GlobalAnalysis) Segment(com.jopdesign.common.code.Segment)

Aggregations

CacheCostCalculationMethod (com.jopdesign.wcet.ipet.IPETConfig.CacheCostCalculationMethod)6 Segment (com.jopdesign.common.code.Segment)3 MethodInfo (com.jopdesign.common.MethodInfo)2 GlobalAnalysis (com.jopdesign.wcet.analysis.GlobalAnalysis)2 CFGNode (com.jopdesign.common.code.ControlFlowGraph.CFGNode)1 ContextCFG (com.jopdesign.common.code.SuperGraph.ContextCFG)1 SuperGraphEdge (com.jopdesign.common.code.SuperGraph.SuperGraphEdge)1 AnalysisType (com.jopdesign.jcopter.analysis.MethodCacheAnalysis.AnalysisType)1 WCETProcessorModel (com.jopdesign.wcet.WCETProcessorModel)1 WCETTool (com.jopdesign.wcet.WCETTool)1 AnalysisContextLocal (com.jopdesign.wcet.analysis.AnalysisContextLocal)1 LocalAnalysis (com.jopdesign.wcet.analysis.LocalAnalysis)1 RecursiveWcetAnalysis (com.jopdesign.wcet.analysis.RecursiveWcetAnalysis)1 TreeAnalysis (com.jopdesign.wcet.analysis.TreeAnalysis)1 MethodCacheAnalysis (com.jopdesign.wcet.analysis.cache.MethodCacheAnalysis)1 ArrayList (java.util.ArrayList)1 InstructionHandle (org.apache.bcel.generic.InstructionHandle)1 MONITORENTER (org.apache.bcel.generic.MONITORENTER)1