Comparison between perf, Ftrace, LTTng and GDB tracepoints Rafik - - PowerPoint PPT Presentation

comparison between perf ftrace lttng and gdb tracepoints
SMART_READER_LITE
LIVE PREVIEW

Comparison between perf, Ftrace, LTTng and GDB tracepoints Rafik - - PowerPoint PPT Presentation

Comparison between perf, Ftrace, LTTng and GDB tracepoints Rafik Fahem Department of Computer and Software Engineering June 29, 2010 cole Polytechnique, Montreal 1 Content Perf Ftrace LTTng GDB tracepoints Discussion Questions


slide-1
SLIDE 1

1

Comparison between perf, Ftrace, LTTng and GDB tracepoints

June 29, 2010 École Polytechnique, Montreal Rafik Fahem Department of Computer and Software Engineering

slide-2
SLIDE 2

2

2

Comparison between perf, Ftrace, LTTng and GDB tracepoints

Content

Perf Ftrace LTTng GDB tracepoints Discussion Questions

slide-3
SLIDE 3

3

3

Comparison between perf, Ftrace, LTTng and GDB tracepoints

Perf

  • Used for performance analysis
  • Static tracepoints:
  • Makes use of the tracepoints available in the kernel(version

2.6.32 and higher)

  • Dynamic tracepoints can be defined with:
  • Symbols and registers without debuginfo
  • C line numbers, function names and local variables with

debuginfo

slide-4
SLIDE 4

4

4

Comparison between perf, Ftrace, LTTng and GDB tracepoints

Perf

  • Dynamic tracepoints are implemented with

kprobes

  • Vmlinux containing the debuginfo has to be a

Dwarf binary

  • Traces only the events generated by a specific

program

slide-5
SLIDE 5

5

5

Comparison between perf, Ftrace, LTTng and GDB tracepoints

Perf

  • Available data:
  • Number of times the tracepoint was hit
  • Execution time
  • Calling functions
  • Trace is available only after execution
slide-6
SLIDE 6

6

6

Comparison between perf, Ftrace, LTTng and GDB tracepoints

Ftrace

  • Can be used for debugging and latency

analysis

  • Includes six different tracers: function calls,

context switches...etc

  • Uses the static tracepoints available in the

kernel source

  • Dynamic tracepoints unavailable
slide-7
SLIDE 7

7

7

Comparison between perf, Ftrace, LTTng and GDB tracepoints

Ftrace

  • Available data depends on the tracer enabled:

execution time, calling functions, PIDs...

  • Thousands of filters available to trace only

some selected events

  • Trace is recorded in debugfs
  • Trace can be viewed when tracing
slide-8
SLIDE 8

8

8

Comparison between perf, Ftrace, LTTng and GDB tracepoints

LTTng

  • Optimized for static tracing
  • Uses the static tracepoints available in the

kernel

  • Dynamic tracepoints implemented using

kprobes

  • Several probes can be connected to the same

tracepoint

  • Live monitoring under development
slide-9
SLIDE 9

9

9

Comparison between perf, Ftrace, LTTng and GDB tracepoints

GDB tracepoints

  • Can only be used in user space
  • Only dynamic tracepoints are supported in the

current version

  • UST tracepoints can be used
  • Tracepoints inserted using traps
  • Fast tracepoints:
  • Faster but restricted in where they may be installed
  • Inserted with a jump
slide-10
SLIDE 10

10

10

Comparison between perf, Ftrace, LTTng and GDB tracepoints

GDB tracepoints

  • Data collected can include registers, local

variables and global data.

  • Tracepoints can be defined with line numbers,

function names and addresses

  • A trace snapshot is collected every time a

tracepoint is hit

  • These snapshots are stored in buffers and can

be examined later

slide-11
SLIDE 11

11

11

Comparison between perf, Ftrace, LTTng and GDB tracepoints

Discussion

  • Perf:
  • Tracing a single program
  • Statistics: execution time, calling functions, number
  • f times the tracepoint was hit
  • Hardware performance counters
  • Ftrace:
  • Filters
  • Trace in debugfs
slide-12
SLIDE 12

12

12

Comparison between perf, Ftrace, LTTng and GDB tracepoints

Discussion

  • LTTng:
  • Optimized static tracing
  • User-space tracing
  • Trace streaming
  • GDB tracepoints:
  • Fast tracepoints using jumps
  • Debuginfo is needed to access

variables(SystemTap)

slide-13
SLIDE 13

13

13

Comparison between perf, Ftrace, LTTng and GDB tracepoints

Questions?