EPC: Extended Path Coverage for Measurement-based Probabilistic - - PowerPoint PPT Presentation

epc extended path coverage for measurement based
SMART_READER_LITE
LIVE PREVIEW

EPC: Extended Path Coverage for Measurement-based Probabilistic - - PowerPoint PPT Presentation

EPC: Extended Path Coverage for Measurement-based Probabilistic Timing Analysis M. Ziccardi , E. Mezzetti and T. Vardanega J. Abella and F.J. Cazorla University of Padua BSC Spanish National Research Council


slide-1
SLIDE 1

EPC: Extended Path Coverage for Measurement-based Probabilistic Timing Analysis

  • M. Ziccardi†, E. Mezzetti† and T. Vardanega†
  • J. Abella§ and F.J. Cazorla§‡

†University of Padua §BSC ‡Spanish National Research Council

Real-Time Systems Symposium

This project and the research leading to these results has received funding from the European Community’s Seventh Framework Programme [FP7 / 2007-2013] under grant agreement n° 611085

www.proxima-project.eu

slide-2
SLIDE 2

2

Extended Path Coverage for MBPTA - RTSS 2015

Overview of MBPTA

❏ Probabilistic execution time estimation ⊲ Based on measurements ⊲ Relies on solid probabilistic and statistical basis

  • Posing statistical requirements on the input data (i.i.d.)

⊲ Estimates are attached a probability of exceedance

(user-provided threshold)

HW Tracing Support

SETV

Randomized HW platform

T r a c e c

  • l

l e c t i

  • n

M B P T A

Conver- gence criteria Block selection Curve fitting Tail exten- sion

EVT p W C E T

Exceedance Probability Execution time EVT projection (Inverse CDF) Threshold e.g. 10-16

slide-3
SLIDE 3

2

Extended Path Coverage for MBPTA - RTSS 2015

Overview of MBPTA

❏ Probabilistic execution time estimation ⊲ Based on measurements ⊲ Relies on solid probabilistic and statistical basis

  • Posing statistical requirements on the input data (i.i.d.)

⊲ Estimates are attached a probability of exceedance

(user-provided threshold)

HW Tracing Support

SETV

Randomized HW platform

T r a c e c

  • l

l e c t i

  • n

M B P T A

Conver- gence criteria Block selection Curve fitting Tail exten- sion

EVT p W C E T

Exceedance Probability Execution time EVT projection (Inverse CDF) Threshold e.g. 10-16

slide-4
SLIDE 4

2

Extended Path Coverage for MBPTA - RTSS 2015

Overview of MBPTA

❏ Probabilistic execution time estimation ⊲ Based on measurements ⊲ Relies on solid probabilistic and statistical basis

  • Posing statistical requirements on the input data (i.i.d.)

⊲ Estimates are attached a probability of exceedance

(user-provided threshold)

HW Tracing Support

SETV

Randomized HW platform

T r a c e c

  • l

l e c t i

  • n

M B P T A

Conver- gence criteria Block selection Curve fitting Tail exten- sion

EVT p W C E T

Exceedance Probability Execution time EVT projection (Inverse CDF) Threshold e.g. 10-16

slide-5
SLIDE 5

2

Extended Path Coverage for MBPTA - RTSS 2015

Overview of MBPTA

❏ Probabilistic execution time estimation ⊲ Based on measurements ⊲ Relies on solid probabilistic and statistical basis

  • Posing statistical requirements on the input data (i.i.d.)

⊲ Estimates are attached a probability of exceedance

(user-provided threshold)

HW Tracing Support

SETV

Randomized HW platform

T r a c e c

  • l

l e c t i

  • n

M B P T A

Conver- gence criteria Block selection Curve fitting Tail exten- sion

EVT p W C E T

Exceedance Probability Execution time EVT projection (Inverse CDF) Threshold e.g. 10-16

slide-6
SLIDE 6

2

Extended Path Coverage for MBPTA - RTSS 2015

Overview of MBPTA

❏ Probabilistic execution time estimation ⊲ Based on measurements ⊲ Relies on solid probabilistic and statistical basis

  • Posing statistical requirements on the input data (i.i.d.)

⊲ Estimates are attached a probability of exceedance

(user-provided threshold)

HW Tracing Support

SETV

Randomized HW platform

T r a c e c

  • l

l e c t i

  • n

M B P T A

Conver- gence criteria Block selection Curve fitting Tail exten- sion

EVT p W C E T

Exceedance Probability Execution time EVT projection (Inverse CDF) Threshold e.g. 10-16

slide-7
SLIDE 7

2

Extended Path Coverage for MBPTA - RTSS 2015

Overview of MBPTA

❏ Probabilistic execution time estimation ⊲ Based on measurements ⊲ Relies on solid probabilistic and statistical basis

  • Posing statistical requirements on the input data (i.i.d.)

⊲ Estimates are attached a probability of exceedance

(user-provided threshold)

HW Tracing Support

SETV

Randomized HW platform

T r a c e c

  • l

l e c t i

  • n

M B P T A

Conver- gence criteria Block selection Curve fitting Tail exten- sion

EVT p W C E T

Exceedance Probability Execution time EVT projection (Inverse CDF) Threshold e.g. 10-16

slide-8
SLIDE 8

2

Extended Path Coverage for MBPTA - RTSS 2015

Overview of MBPTA

❏ Probabilistic execution time estimation ⊲ Based on measurements ⊲ Relies on solid probabilistic and statistical basis

  • Posing statistical requirements on the input data (i.i.d.)

⊲ Estimates are attached a probability of exceedance

(user-provided threshold)

HW Tracing Support

SETV

Randomized HW platform

T r a c e c

  • l

l e c t i

  • n

M B P T A

Conver- gence criteria Block selection Curve fitting Tail exten- sion

EVT p W C E T

Exceedance Probability Execution time EVT projection (Inverse CDF) Threshold e.g. 10-16

slide-9
SLIDE 9

3

Extended Path Coverage for MBPTA - RTSS 2015

Representativeness of observations

❏ Inherent limitation of measurement-based approaches ⊲ Bounds are only valid for the set of paths and execution

conditions for which observations were collected

❏ The same applies to MBPTA ⊲ Probabilistically captures variability from history of execution... ⊲ ...but results are only valid for the subset of observed paths

bb0 bb1a bb1b bb2 bb3a bb3b bb4

φ0 φ1

slide-10
SLIDE 10

3

Extended Path Coverage for MBPTA - RTSS 2015

Representativeness of observations

❏ Inherent limitation of measurement-based approaches ⊲ Bounds are only valid for the set of paths and execution

conditions for which observations were collected

❏ The same applies to MBPTA ⊲ Probabilistically captures variability from history of execution... ⊲ ...but results are only valid for the subset of observed paths

bb0 bb1a bb1b bb2 bb3a bb3b bb4

φ0 φ1 φ2 φ3

slide-11
SLIDE 11

4

Extended Path Coverage for MBPTA - RTSS 2015

Extending the path coverage

❏ Synthetically extending the set observed paths

M B P T A

Conver- gence criteria Block selection Curve fitting Tail exten- sion

EVT p W C E T

Exceedance Probability Execution time

Distribution valid only for observed paths "Fully representative" distribution for all paths in a program obtained from both observed AND synthetic observations No EPC EPC

Representativeness gap Measurements collected over a subset of the program paths Synthetic measurements for unobserved paths

HW Tracing Support

SETV

Randomized HW platform

T r a c e c

  • l

l e c t i

  • n
slide-12
SLIDE 12

5

Extended Path Coverage for MBPTA - RTSS 2015

EPC building blocks

❏ Path-independence ⊲ Execution times (ET) can be made independent from the path

through which they have been collected

⊲ EPC exploits probabilistic path independence at basic blocks level ❏ Synthetic measurements over unobserved paths ⊲ Path-independent ET can be combined to construct

representative execution times for end-to-end (unobserved) paths

❏ Cannot naively sum up the maximum observed ET! ⊲ Collected observations are only relative to a particular path ⊲ Includes cache-level and core-level dependencies

slide-13
SLIDE 13

6

Extended Path Coverage for MBPTA - RTSS 2015

Probabilistic path independence

❏ Path-independent execution times for a basic block ⊲ Values does not depend on a particular path ⊲ Summing up a penalty or padding to each observed ET to

compensate for any positive effect due to a specific path (e.g., cache behavior)

❏ Example of deterministic independence (caches) ⊲ Assume all accesses were hit and add a miss-hit latency to each

  • bserved value

⊲ For each memory access in a basic block:

Obs+(bbi) = Obs(bbi, φ) +

  • @I∈bbi

padI(@I) +

  • @D∈bbi

padD(@D)

⊲ This is way overly pessimistic! ❏ Exploit the probabilistic framework ⊲ No need to enforce each observation to upper-bound the

worst-case behavior

slide-14
SLIDE 14

7

Extended Path Coverage for MBPTA - RTSS 2015

ATPs and probabilistic padding

❏ On time-randomized single-core architectures ⊲ Randomized caches are the main source of variability ⊲ ATP(@A, φ) =

  • Lhit

Lmiss Phit(@A, φ) Pmiss(@A, φ)

  • ❏ Probabilistic padding of ATPs

⊲ Adding a probabilistic padding to negatively compensate potential

positive effects of variability (e.g., a cache hit) on a specific path

⊲ ATP(@A) =

  • Lhit

Lmiss Phit(@A) Pmiss(@A)

  • ❏ Computing the padding probability

⊲ Ensure the resulting ATP distribution follows the worst ET

distribution for that basic block (for any program path)

⊲ Cannot modify a set of observations to follow the exact

distribution of the worst-case ATPs

  • Would require to selectively compensate the effects of cache hits
  • n a subset of the collected observations
slide-15
SLIDE 15

8

Extended Path Coverage for MBPTA - RTSS 2015

Over-approximating the worst-case ATP

ATP(@A,φ) ATP+(@A) ATP(@A) 1 ATP Lmiss Lhit Lmiss+pad 1 Cumulative ATP Lmiss Lhit Lmiss+pad

slide-16
SLIDE 16

8

Extended Path Coverage for MBPTA - RTSS 2015

Over-approximating the worst-case ATP

ATP(@A,φ) ATP+(@A) ATP(@A) 1 ATP Lmiss Lhit Lmiss+pad 1 Cumulative ATP Lmiss Lhit Lmiss+pad

slide-17
SLIDE 17

8

Extended Path Coverage for MBPTA - RTSS 2015

Over-approximating the worst-case ATP

ATP(@A,φ) ATP+(@A) ATP(@A) 1 ATP Lmiss Lhit Lmiss+pad 1 Cumulative ATP Lmiss Lhit Lmiss+pad

slide-18
SLIDE 18

8

Extended Path Coverage for MBPTA - RTSS 2015

Over-approximating the worst-case ATP

ATP(@A,φ) ATP+(@A) ATP(@A) 1 ATP Lmiss Lhit Lmiss+pad 1 Cumulative ATP Lmiss Lhit Lmiss+pad

slide-19
SLIDE 19

9

Extended Path Coverage for MBPTA - RTSS 2015

Computing the padding probability

❏ Formulation of padding probability on ATP+

ATP +(@A) = ATP(@A, φ) ⊗

  • Lpad

1 − Ppad(@A, φ) Ppad(@A, φ)

  • =
  • Lhit

Lmiss Phit(@A, φ) Pmiss(@A, φ)

  • Lpad

1 − Ppad(@A, φ) Ppad(@A, φ)

  • =
  • Lhit

Lmiss Lmiss + Lpad P +

hit(@A)

P +

miss(@A)

P +

miss+pad(@A)

slide-20
SLIDE 20

10

Extended Path Coverage for MBPTA - RTSS 2015

Computing the padding probability/2

❏ Under one single requirement

ATP +(@A) ATP(@A)

implying

P +

hit(@A)

≤ Phit(@A) P +

hit(@A) + P + miss(@A)

≤ Phit(@A) + Pmiss(@A)

❏ Lower bound to Ppad(@A, φ)

P +

hit(@A) ≤ Phit(@A)

Phit(@A, φ) · (1 − Ppad(@A, φ)) ≤ Phit(@A) · · · Ppad(@A, φ) ≥ 1 − Phit(@A) Phit(@A, φ)

slide-21
SLIDE 21

11

Extended Path Coverage for MBPTA - RTSS 2015

Computing the padding probability/3

Definition (Reuse distance - rd) The reuse distance of @A on a path φ is defined as the number of memory blocks mapped to the same set of @A accessed between @A and the previous access to the memory block containing @A. Definition (Unique accesses - un) With unique accesses, instead, we refer to the number of distinct memory blocks mapped to the same set of @A accessed in between @A and the previous access to the memory block containing @A on a path φ.

Phit(@A) = 1−Pmiss(@A) where Pmiss(@A) =

  • 1 − w−1

w

rd(@A)

if rd(@A) < w 1

  • therwise

Phit(@A, φ) ≤ uPhit(@A, φ) =

  • 1

if un(@A, φ) < w

w−1

w

un(@A,φ)−w+1

  • therwise
slide-22
SLIDE 22

12

Extended Path Coverage for MBPTA - RTSS 2015

Application of padding and synthetic paths

❏ Computational complexity in Ppad relatively low ⊲ Both rd and un computed on a restricted scope

(only immediate predecessors)

❏ Collected observations of basic blocks updated ⊲ This affects both observed values and frequencies ❏ Synthetic path generation ⊲ Collect artificial execution times by iterating over all the basic

blocks in each unobserved path

⊲ Consider only a subset of all possible paths

  • Pruning based on known flow facts
slide-23
SLIDE 23

13

Extended Path Coverage for MBPTA - RTSS 2015

Feeding data into MBPTA

M B P T A

Conver- gence criteria Block selection Curve fitting Tail exten- sion

EVT p W C E T

Exceedance Probability Execution time

Distribution valid only for observed paths "Fully representative" distribution for all paths in a program obtained from both observed AND synthetic observations No EPC EPC

Representativeness gap Measurements collected over a subset of the program paths Synthetic measurements for unobserved paths

HW Tracing Support

SETV

Randomized HW platform

T r a c e c

  • l

l e c t i

  • n
slide-24
SLIDE 24

14

Extended Path Coverage for MBPTA - RTSS 2015

Evaluation

❏ EPC extends MBPTA ⊲ Representativeness of full path coverage → at what cost? ⊲ Evaluate the compromise between tightness and

representativeness

⊲ Against both

  • Base MBPTA (from ECRTS-12)
  • Path Upper Bounding (PUB) approach (from ECRTS-14)
  • Based on balancing of conditional branches
  • Modified executable used at analysis time

❏ On PROXIMA simulator ⊲ SoCLib-based cycle-level platform simulator ⊲ Single level time-randomized I and D caches

  • 4-ways set associative
  • Random placement and replacement policies
slide-25
SLIDE 25

15

Extended Path Coverage for MBPTA - RTSS 2015

Against standard MBPTA

  • !"

#$!% & '( !%!)' %* + ' %

  • !"

"$

slide-26
SLIDE 26

16

Extended Path Coverage for MBPTA - RTSS 2015

Against PUB

  • !"#$

%&#' ( )*"#'#+)"',

  • )"'
  • !"#$

$&

slide-27
SLIDE 27

17

Extended Path Coverage for MBPTA - RTSS 2015

From simulation to real implementation

HW Tracing Support

SETV

Randomized HW platform

T r a c e c

  • l

l e c t i

  • n

M B P T A

Conver- gence criteria Block selection Curve fitting Tail exten- sion

EVT p W C E T

Exceedance Probability Execution time EVT projection (Inverse CDF) Threshold e.g. 10-16

SPARC LEON3-based PROXIMA FPGA

CG GRMON

EPC

  • n

❏ Implementation within the PROXIMA project ⊲ Randomized platform under finalization ⊲ EPC is being implemented on top of industrial-quality tool ⊲ Tracing requirements fulfilled by available HW tracing support

slide-28
SLIDE 28

18

Extended Path Coverage for MBPTA - RTSS 2015

Conclusions

❏ Presented an hybrid approach ⊲ Extends and complements MBPTA ⊲ Attack the problem of path representativeness ❏ Showed fully-representative results can be had ⊲ Computationally feasible ⊲ Incurs limited pessimism in the results as compared to current

state-of-the-art approaches

❏ EPC moving from prototyping to implementation ⊲ On top of real HW and industrial-quality tool