Remove "etc."
[lttng-docs.git] / contents / nuts-and-bolts / what-is-tracing.md
CommitLineData
6b7fb0d3
PP
1---
2id: what-is-tracing
3---
4
5As the history of software engineering progressed and led to what
6we now take for granted—complex, numerous and
7interdependent software applications running in parallel on
8sophisticated operating systems like Linux—the authors of such
9components, or software developers, began feeling a natural
10urge of having tools to ensure the robustness and good performance
11of their masterpieces.
12
13One major achievement in this field is, inarguably, the
14<a href="https://www.gnu.org/software/gdb/" class="ext">GNU debugger
15(GDB)</a>, which is an essential tool for developers to find and fix
16bugs. But even the best debugger won't help make your software run
17faster, and nowadays, faster software means either more work done by
18the same hardware, or cheaper hardware for the same work.
19
20A _profiler_ is often the tool of choice to identify performance
21bottlenecks. Profiling is suitable to identify _where_ performance is
22lost in a given software; the profiler outputs a profile, a
23statistical summary of observed events, which you may use to discover
24which functions took the most time to execute. However, a profiler
25won't report _why_ some identified functions are the bottleneck.
26Bottlenecks might only occur when specific conditions are met, sometimes
27almost impossible to capture by a statistical profiler, or impossible to
28reproduce with an application altered by the overhead of an event-based
29profiler. For a thorough investigation of software performance issues,
30a history of execution, with the recorded values of chosen variables
31and context, is essential. This is where tracing comes in handy.
32
33_Tracing_ is a technique used to understand what goes on in a running
34software system. The software used for tracing is called a _tracer_,
35which is conceptually similar to a tape recorder. When recording,
36specific probes placed in the software source code generate events
37that are saved on a giant tape: a _trace_ file. Both user applications
38and the operating system may be traced at the same time, opening the
39possibility of resolving a wide range of problems that are otherwise
40extremely challenging.
41
42Tracing is often compared to _logging_. However, tracers and loggers
43are two different tools, serving two different purposes. Tracers are
44designed to record much lower-level events that occur much more
45frequently than log messages, often in the thousands per second range,
46with very little execution overhead. Logging is more appropriate for
47very high-level analysis of less frequent events: user accesses,
48exceptional conditions (errors and warnings, for example), database
ba3b1994 49transactions, instant messaging communications, and such. More formally,
6b7fb0d3
PP
50logging is one of several use cases that can be accomplished with
51tracing.
52
53The list of recorded events inside a trace file may be read manually
54like a log file for the maximum level of detail, but it is generally
55much more interesting to perform application-specific analyses to
56produce reduced statistics and graphs that are useful to resolve a
57given problem. Trace viewers and analysers are specialized tools
58designed to do this.
59
60So, in the end, this is what LTTng is: a powerful, open source set of
61tools to trace the Linux kernel and user applications at the same time.
62LTTng is composed of several components actively maintained and
63developed by its <a href="/community/#where" class="ext">community</a>.
This page took 0.024533 seconds and 4 git commands to generate.