lttng.ust: Improve debug-info binary tracking
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 28 Jun 2016 13:20:33 +0000 (09:20 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Sat, 9 Jul 2016 13:06:30 +0000 (09:06 -0400)
commit1633ee0dcae02b259be264b54d55f16082c987da
treea9fd50e174cb9bb804096b76ac9cdef922dd3169
parent7a0ebe01ea78919b50bd025d55215c1d65c4e275
lttng.ust: Improve debug-info binary tracking

This patch improves the tracking of binary loading/unloading using the
LTTng statedump and dl events.

It changes the layout of the attributes in the state system to be this:

  Key                      Value
  /vpid                    -
  /vpid/<baddr>            <active>, 1 if active, null otherwise
  /vpid/<baddr>/build_id   <buildid>, e.g. "0123456789abcdef"
  /vpid/<baddr>/debug_link <debug_link>, e.g. "/usr/lib/libhello.so.debug"
  /vpid/<baddr>/memsz      <memsz>, e.g. 2127280
  /vpid/<baddr>/path       <path>, e.g. "/usr/lib/libhello.so"
  /vpid/<baddr>/is_pic     <is_pic>, 1 or 0

which is organized a bit more logically than the current approach.

Currently, the code expects the binaries to have a build id.  If this is
not the case for a particular binary, it will stay forever in the map of
pending binaries.  This patch checks the has_build_id to know whether or
not we should wait for such a corresponding build_id event.  While at
it, we do the same for debug link and propagate its value (although
nothing useful is done with it currently).

The "statedump start" event is now handled, which is required to
invalidate all the mappings for a certain vpid.

More tests are added, using the new synthetically generated traces from
CtfTestTrace.

Change-Id: I48c9de963129040dbd90ea492fe58eba441b28f3
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Reviewed-on: https://git.eclipse.org/r/73639
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
12 files changed:
lttng/org.eclipse.tracecompass.lttng2.ust.core.tests/src/org/eclipse/tracecompass/lttng2/ust/core/tests/analysis/debuginfo/UstDebugInfoAnalysisModuleTest.java
lttng/org.eclipse.tracecompass.lttng2.ust.core/META-INF/MANIFEST.MF
lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/internal/lttng2/ust/core/analysis/debuginfo/FileOffsetMapper.java
lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/internal/lttng2/ust/core/analysis/debuginfo/UstDebugInfoBinaryFile.java [deleted file]
lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/internal/lttng2/ust/core/analysis/debuginfo/UstDebugInfoLoadedBinaryFile.java [deleted file]
lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/internal/lttng2/ust/core/analysis/debuginfo/UstDebugInfoStateProvider.java
lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/internal/lttng2/ust/core/trace/layout/LttngUst28EventLayout.java
lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/BinaryCallsite.java
lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoAnalysisModule.java
lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoBinaryAspect.java
lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoBinaryFile.java [new file with mode: 0644]
lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoLoadedBinaryFile.java [new file with mode: 0644]
This page took 0.026568 seconds and 5 git commands to generate.