FSU Depa rtment of Computer Science DEPARTMENT OF COMPUTER - - PowerPoint PPT Presentation

fsu
SMART_READER_LITE
LIVE PREVIEW

FSU Depa rtment of Computer Science DEPARTMENT OF COMPUTER - - PowerPoint PPT Presentation

On Debugging Real-Time Applications F rank Mueller and David Whalley FSU Depa rtment of Computer Science DEPARTMENT OF COMPUTER SCIENCE Flo rida State Universit y T allahassee, FL 32304-4019 e-mail: mueller@cs.fsu.edu


slide-1
SLIDE 1

FSU

DEPARTMENT OF COMPUTER SCIENCE

On Debugging Real-Time Applications F rank Mueller and David Whalley Depa rtment
  • f
Computer Science Flo rida State Universit y T allahassee, FL 32304-4019 e-mail: mueller@cs.fsu.edu whalley@cs.fsu.edu On Debugging Real-Time Applications LCTS'94 1
slide-2
SLIDE 2

FSU

DEPARTMENT OF COMPUTER SCIENCE

Overview
  • debugging
pa rt
  • f
development cycle (up to 50%
  • f
time)
  • few
debuggers address real-time issues:
  • deadline
monito ring
  • time
disto rtion due to interference
  • f
debugging
  • new
debugging environment:
  • cache
simulation to k eep track
  • f
elapsed cycles
  • displa
ys elapsed execution time (cycles)
  • w
  • rks
without changing debugger
  • slo
ws do wn execution b y facto r
  • f
1-4
  • much
faster than ha rdw a re simulato rs
  • to
nd missed deadlines
  • to
lo cate time-consuming co de p
  • rtions
On Debugging Real-Time Applications LCTS'94 2
slide-3
SLIDE 3

FSU

DEPARTMENT OF COMPUTER SCIENCE

Problems with Real-Time Debugging
  • time
disto rtion:
  • interference:
b reakp
  • ints,
debugger k ernel traps, caching
  • replace
real time with virtual time
  • external
events simulated
  • deadline
monito ring and task tuning
  • uni-
vs. multi-p ro cesso r On Debugging Real-Time Applications LCTS'94 3
slide-4
SLIDE 4

FSU

DEPARTMENT OF COMPUTER SCIENCE

Overview
  • f
Debugging Environment

source files cache static cache configuration program

  • bject

files linker compiler time estimation routines control flow debugger source- level executable simulator information instruction annotation

On Debugging Real-Time Applications LCTS'94 4
slide-5
SLIDE 5

FSU

DEPARTMENT OF COMPUTER SCIENCE

Real-Time Debugging Environment
  • elapsed
time tracing:
  • query
during debugging (any b reakp
  • int)
  • calculate
based
  • n
cache hit and misses simulated so fa r
  • can
translate numb er
  • f
cycles into seconds
  • debugging
  • ptimized
co de:
  • allo
ws realistic timing simulation
  • restricts
debugging to basic blo cks (b reakp
  • ints)
  • can
also displa y most va riables in registers
  • sometimes
inconsistent values (due to
  • ptimizations)
On Debugging Real-Time Applications LCTS'94 5
slide-6
SLIDE 6

FSU

DEPARTMENT OF COMPUTER SCIENCE

Sample Session with dbx (dbx) stop at 43 (dbx) stop at 123 if elapsed_cycles() > 4000000 (dbx) display elapsed_cycles() [...] stopped in four at line 43 43 mmax=2; elapsed_cycles() = 29413 (dbx) next stopped in four at line 44 44 while(n>mmax) { elapsed_cycles() = 29428 [...] 123 four(tdata,nn,isign); elapsed_cycles() = 4015629 [...] elapsed cycles() = 4095351 execution completed, exit code is 1 On Debugging Real-Time Applications LCTS'94 6
slide-7
SLIDE 7 F rank Mueller and David Whalley LCTS'94
  • b
reak after 4 million cycles
  • displa
y elapsed time
  • b
reakp
  • ints
do not aect virtual time k eeping
  • deadline
missed after 4+ million cycles (p
  • ints
to a rea where it's misses)
  • p
rogram terminated even later
  • could
set b reakp
  • int
at inner nesting level next to lo calize missed deadline On Debugging Real-Time Applications (notes) 6-1
slide-8
SLIDE 8

FSU

DEPARTMENT OF COMPUTER SCIENCE

P erfo rmance Overhead unopt.
  • pt.
co de with time estimates co de 1kB 2kB 4kB 8kB 1.8 7.8 4.5 3.0 2.1 On Debugging Real-Time Applications LCTS'94 7
slide-9
SLIDE 9 F rank Mueller and David Whalley LCTS'94
  • implemented
  • n
SP ARC
  • mo
died VPO
  • used
db x under SunOS 4.1.3
  • veried
co rrectness
  • f
instruction cache simulation b y compa ring with trace-driven simulation
  • 11
test p rograms
  • unopt.
ab
  • ut
1.8 times slo w er than
  • pt.
co de
  • instr.
  • pt.
ab
  • ut
2.1 to 7.8 times slo w er than
  • pt.
co de
  • instr.
  • pt.
ab
  • ut
1 to 4 times slo w er than common unopt. co de
  • cache
size inuences
  • verhead
(due to conicts) On Debugging Real-Time Applications (notes) 7-1
slide-10
SLIDE 10

FSU

DEPARTMENT OF COMPUTER SCIENCE

F uture W
  • rk
  • external
event table
  • pragma
zero t imetoinser tnon
  • intr
usiv edebug g ing codeextendtodata caching ; pipel ining
  • to
b e used with Pthreads real-time k ernel
  • n
SP ARC VME b
  • a
rd
  • p
roling with timing info rmation On Debugging Real-Time Applications LCTS'94 8
slide-11
SLIDE 11

FSU

DEPARTMENT OF COMPUTER SCIENCE

Related W
  • rk
  • debugging
capabilities t ypically very restricted
  • Remedy:
interface, susp end all p ro cesso rs
  • n
b reakp
  • int
  • DCT:
sp ecial ha rdw a re (bus monito ring), non-intrusive
  • RED,
ART: soft w a re instrumentation, remote debugging
  • D
ARTS: (1) p rogram trace (2) debug time-stamp ed trace
  • ha
rdw a re simulato rs: very slo w On Debugging Real-Time Applications LCTS'94 9
slide-12
SLIDE 12 F rank Mueller and David Whalley LCTS'94
  • debugging
remote, indirect (o-line), not within p rogram
  • Remedy:
  • DCT:
Distributed computing testb ed
  • RED:
Remotely executed debugger
  • ART:
instrumentation p ermanent pa rt
  • f
p rograms
  • D
ARTS: Debug assistant fo r RTSs, no data queries On Debugging Real-Time Applications (notes) 9-1
slide-13
SLIDE 13

FSU

DEPARTMENT OF COMPUTER SCIENCE

Summa ry
  • develop
ed new debugging enhancement fo r real-time
  • replace
real time with virtual time
  • k
eep track
  • f
virtual time b y instruction cache simulation
  • feasible
through static cache simulation
  • debug
unoptimized
  • r
  • ptimized
co de
  • displa
y time rep eatedly at b reakp
  • ints
  • nd
missed deadlines through conditional b reakp
  • ints
  • lo
cate time-consuming co de, tune it
  • tuning
ma y b e used to mak e schedule feasible
  • p
erfo rmance
  • verhead
  • f
facto r 1 to 4
  • ver
unoptimized co de On Debugging Real-Time Applications LCTS'94 10