Presentation is loading. Please wait.

Presentation is loading. Please wait.

November 25, 20151 KFT & Tracing Collaboration Tim Bird Sony Electronics.

Similar presentations


Presentation on theme: "November 25, 20151 KFT & Tracing Collaboration Tim Bird Sony Electronics."— Presentation transcript:

1 November 25, 20151 KFT & Tracing Collaboration Tim Bird Sony Electronics

2 November 25, 20152 KFT Quickie Overview KFT = Kernel Function Trace –Uses a compiler switch (-finstrument_functions) to instrument EVERY function in kernel –Low-intrusion patch to kernel source –Optimized for finding latency problems Filters for long-duration function calls Maintains a function stack from which short duration functions are constantly popped Historically used to find places to improve bootup time

3 November 25, 20153 KFT Example kftstatic.conf Output: (cat /proc/kft_data | addr2sym -m System.map) trigger start entry start_kernel trigger end entry to_userspace filter mintime 500 Entry Delta PID Function Called At ----- ------ --- ------------------------- ------------------ 1 0 0 start_kernel L6+0x0 14 8687 0 setup_arch start_kernel+0x35 39 891 0 setup_memory setup_arch+0x2a8 53 872 0 register_bootmem_low_pages setup_memory+0x8f...

4 November 25, 20154 More Information Has triggers, filters Can trace very early - from first kernel instruction Uses procfs for control and data (everything ASCII) Post-processing tool shows: –functions sorted by duration, call count, local time, etc. –call tree, including interrupts Google: “KernelFunctionTrace” (all one word)

5 November 25, 20155 Tracing Collaboration

6 November 25, 20156 Why Collaborate Want to avoid duplicating effort Want to avoid conflicts and re-inforce efforts –E.g. Kernel will support AT MOST one set of static tracepoints Want to produce awesome tools with great capabilities and usefulness It’s open source, dang-it! How to proceed? –Groups have talked before - was there any outcome?

7 November 25, 20157 Tracing Terminology Phases: –trace definition/configuration –trace generation activation, control, capture, termination –post-processing formatting the data and visualization Kinds of data gathering –event-based –sample-based

8 November 25, 20158 Tracing Terminology tracepoint/probe point - a location in the traced software, which, when encountered, “emits” an event trace/probe handler - the code to execute when an event occurs or a sample is taken trace definition - the set of tracepoints, handlers and constraints which determine what events are collected and how they are processed post-processing - manipulation of the trace data after the trace is collected aggregation - updating statistics or other analytical information, based on trace events or samples filters - criteria used to limit the events that are captured or processed triggers - criteria used to start and stop tracing automatically visualization tool - tool to present trace data graphically to make it easier to analyze Tracepoints and trace handlers can be defined either in-source (as compiled-in, or static tracepoints) or externally (inserted as dynamic tracepoints)

9 November 25, 20159 Tracer Comparison Chart Flexibility KFT LTTng SystemTap Specialized tracers

10 November 25, 201510 Tracer Comparison Table KFTLTTngSystemTAP Target user embedded developer system admin Instrumentation every function, by compiler static definitions in source programmable, using external definition Control interface echo and cat, using /proc lttctl and lttd, using netlink stap, using insmod and kprobe Overhead mediumlowhigh Trace format ascii, fixedbinary, with xml schema programmable, printf and ascii-art Post-processing kd, text- oriented lttv, graphicalsystemtapgui??

11 November 25, 201511 Tracer Commonalities Ummm…

12 November 25, 201512 Ideas Integrate KFT into LTTng Have LTTng support externally-defined, but compiled-in, tracepoints Stabilize trace buffer mechanism in kernel Build best-of-systemtap functions module, which can be compiled-in Standardize trace file format What else???


Download ppt "November 25, 20151 KFT & Tracing Collaboration Tim Bird Sony Electronics."

Similar presentations


Ads by Google