Add memory size, build id, and debug link info to statedump and dl
authorAntoine Busque <abusque@efficios.com>
Thu, 2 Jul 2015 15:55:53 +0000 (11:55 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 29 Aug 2015 02:13:53 +0000 (22:13 -0400)
commit8e2aed3f18adc14ec586ef717e396bcac4473dd7
treefd249d417a1765c7af52d8a4359829b17e851e14
parent0dafcd63264e800964ecdc91eabeb366486ff121
Add memory size, build id, and debug link info to statedump and dl

Implement a minimal ELF parser allowing to compute an executable's
in-memory size and to read its build id and debug link info, if any,
at runtime. This is performed during base address statedump, and on
dlopen when using the `liblttng-ust-dl.so` helper.

This adds a `memsz` field to `lttng_ust_statedump:soinfo` and
`lttng_ust_dl:dlopen`. Also adds two events to both providers,
`build_id` and `debug_link`, which are only traced when the
corresponding information is found in the executable file. They can be
matched with the corresponding `soinfo` or `dlopen` via the `baddr`
field shared amongst all the events. Build ID and debug link are
standard methods of identifying and retrieving debug information
corresponding to a specific version of an executable.

The fields `size` and `mtime` from the existing `soinfo` and `dlopen`
events have been removed as they provided no valuable information for
analysis, whereas build ID or debug link allow unambiguous retrieval
of the debug information, and the on-disk `size` is superseded by the
in-memory `memsz`.

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/ust-elf.h [new file with mode: 0644]
liblttng-ust-dl/lttng-ust-dl.c
liblttng-ust-dl/ust_dl.h
liblttng-ust/Makefile.am
liblttng-ust/lttng-ust-elf.c [new file with mode: 0644]
liblttng-ust/lttng-ust-statedump-provider.h
liblttng-ust/lttng-ust-statedump.c
liblttng-ust/lttng-ust-statedump.h
This page took 0.026977 seconds and 5 git commands to generate.