Measuring Execution Times
Peter Puschner Benedikt Huber
slides credits: P. Puschner, R. Kirner, B. Huber
VU 2.0 182.101 SS 2015
Measuring -- a Simple Solution!? Why not obtain a WCET estimate by - - PowerPoint PPT Presentation
Measuring Execution Times Peter Puschner Benedikt Huber slides credits: P. Puschner, R. Kirner, B. Huber VU 2.0 182.101 SS 2015 Contents Why (not to) measure
slides credits: P. Puschner, R. Kirner, B. Huber
VU 2.0 182.101 SS 2015
2
3
4
5
6
7
S-Task + Hardware Input Output State State
Trace
8
Code
FST: set 2 .dcall df ldab _S1 ldab OFST-1,s bitb #15 bne L22 ldab #1 stab L5r L22: leas 2,s rti _quit:
Hardware
P1 P2
Execution Time Measurement System
Hardware Interfaces
System Under Test
Host Target Computer Timer
Execution times Configuration data Start/stop signals Configuration data Input data
User
9
10
11
12
13
Matlab + Simulink Matlab + RTW
Prototype Boards Custom Hardware
Custom automotive Hardware
14
15
16
17
18
[Wegener et al.,96]
19
Initialization Evaluation
Break condition met?
Selection Recombination Mutation Evaluation Reinsertion Result
20
21
22
13,190,619 15,357,471 13,007,019
11,872,718 24,469,014 11,826,117
N/A 2,602 2,176
N/A 23,466 22,626
N/A 72,350 35,226
SA .... Static analysis EA .... Evolutionary algorithms
[Mueller, Wegener, RTSS1998]
23
01111111 10000001
24
25
x
0,00001 0,0001 0,001 0,01 0,1 1 5000 10000 15000 20000
Execution time (cycles) 1-cumulative probability
26
27 Analyzer tool Execution time measurement framework Calculation tool
C-Source Analysis phase Measurement phase Calculation phase WCET bound +
28
29
30
Path bound PS Paths 1000 5 1455 100 7 336 50 8 242 20 11 130 15 13 106 10 14 92 6 21 83 4 38 84 2 88 117 1 171 171
Entity Value #Paths 2.19e+32
Entity Value #Paths 2.19e+32 Path bound 5,000 Identified PS 25 #Measurements 30.000
31
32
Counterexample holds data to reach path ‘x’
(counterexample)
33
34
4 6 7 10 11 12 13 5 8 9 2 1 3
35
RS232 Target Hardware
USB Runtime Measurment Device
Target Hardware Host PC Host PC
2 lines
36
37
1 Model size is too big, memory error of the model checker (core dump)
38
Path Bound #Paths ( ∑ |πj| ) #Program Segments #Paths Random #Paths MC Coverage (#Paths) WCET Bound Time (Analysis) [s] Time (ETM) [s] Overall Time [s] Time Analysis / Path MC [s] Time ETM / Covered Path [s] #Paths / Program Segment ActuatorMotorControl 1 171 171 165 6 165 N.A. 468 1289 1757 78.00 7.8 1.0 10 92 14 63 29 68 3445 841 116 957 29.00 1.7 6.6 100 336 7 57 279 89 3323 7732 62 7794 27.71 0.7 48.0 1000 1455 5 82 1373 130 3298 41353 49 41402 30.12 0.4 291.0 ADCConv 1 31 31 31 31 872 24 192 216 N.A. 6.2 1.0 10 17 3 8 9 9 870 31 22 53 3.44 2.4 5.7 100 74 2 8 66 14 872 220 17 237 3.33 1.2 37.0 1000 144 1 12 132 12 872 483 11 494 3.66 0.9 144.0 ActuatorSysCtrl 1 54 54 54 54 173 26 318 344 N.A. 5.9 1.0 10 36 14 36 36 173 10 85 95 N.A. 2.4 2.6 100 97 1 18 79 25 131 191 10 201 2.42 0.4 97.0 TestNicePartitioning 1 30 30 6 24 30 151 34 175 209 1.42 5.8 1.0 5 14 6 4 10 14 151 15 39 54 1.50 2.8 2.3 10 14 3 3 11 14 151 16 21 37 1.45 1.5 4.7 20 18 2 2 16 15 150 22 16 38 1.38 1.1 9.0 100 72 1 1 71 26 129 106 12 118 1.49 0.5 72.0
Path Bound Paths Program Segments Paths Random Paths MC Coverage WCET Bound Time (Analysis) [s] Time (ETM) [s] Overall Time [s] Time Analysis / Path MC [s] Time ETM / Covered Path [s] Paths / Program Segment 1 30 30 6 24 30 151 34 175 209 1,42 5,8 1,0 5 14 6 4 10 14 151 15 39 54 1,50 2,8 2,3 10 14 3 3 11 14 151 16 21 37 1,45 1,5 4,7 20 18 2 2 16 15 150 22 16 38 1,38 1,1 9,0 100 72 1 1 71 26 129 106 12 118 1,49 0,5 72,0
39
40
41
42
43