Top Banner
Linux Trace Tools ~Leaving the trace behind Presented by: Tarun Sharma Sharath Koday Under the guidance of : Prof. Yann Hang Lee
19

Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

May 20, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Linux Trace Tools

~Leaving the trace behind

Presented by: Tarun Sharma Sharath Koday Under the guidance of : Prof. Yann Hang Lee

Page 2: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Tracing

Page 3: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Agenda I

● Need for tracing ● Tracing evolution ● Tracepoints ● Why LTTng? ● Antomy ● Data flow

Page 4: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Need for tracing

● Understanding complexities of the kernel ● Debugging: Probing into system crashes, page

faults ● Potential for module modification/kernel upgrade ● Optimization based on event time recorded, task

redundancy

Page 5: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Tracing Timeline

1995 | 2005 | 2008 | 2009 | 2012

LTTng Ftrace LTTng

2.0

LTT Dtrace Perf

Page 6: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Tracepoints

● Static probe points strategically located inside the kernel code

● Register/unregister with tracepoints via callback mechanism

● Can be used to profile, debug and understand kernel behavior

● Ftrace, LTTng, Dtrace provide framework for using probes

Page 7: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Why Use LTTng? Printf(k) not enough!

● Low performance impact (Active or inactive ) ● Highly optimized user space static instrumentation ● Accurate timestamp ● Dynamic tracing now using kprobes ● “Non root” members can now perform user space tracing ● Attaches context information to events (pid, tid, PMU

counter)

Page 8: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Anatomy

Page 9: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Anatomy

Page 10: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Data flow

Page 11: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Agenda-II (LTTng approach)

➔ Structure of the tool ➔Creating sessions, deploying probes.. ➔Trace interpretation, the eclipse way! ➔Performance showdown: LTTng, Dtrace, SystemTap ➔Conclusion

Page 12: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Working

➔explain with an example

Page 13: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Tracing: Recording Kernel Trace

Page 14: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Tracing: Recording Kernel Trace

Tracing: Interpreting trace using Eclipse

Page 15: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Tracing Benchmark

0

10000

20000

30000

40000

50000

60000

LTTng Dtrace SystemTap

Approx Time by event 8 Threads

Approx Time by event 8 Threads

Page 16: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Tracing Benchmark

0

1000

2000

3000

4000

5000

6000

7000

LTTng Dtrace SystemTap

Approx Time by event 1Thread

Approx Time by event 1Thread

Page 17: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

Conclusion

➔ Justifies as the successor of LTT with efficient, faster tracing ➔ Re-defines performance benchmarks thus promoting

competition ➔ Active user space support providing options for trace

translation ➔ Platform independent results in global reach. Progressive

understanding and development of Linux kernel

Page 19: Linux Trace Tools - Arizona State Universityrts.lab.asu.edu/web_438/project_final/Talk 7 LTTng.pdf · Justifies as the successor of LTT with efficient, faster tracing Re-defines performance

THANK YOU!