TMF: Remove dependency on CTF for analysis unit tests

A new trace stub is added to allow running the test analysis
with a second trace type.

Change-Id: I64298d41c08254031eccf4637369233a5c3ce7bf
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/25018
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Hudson CI
TMF: Add an API to query analyses to obtain their requirements

Change-Id: I764291e0ca5281550a16d61a9aa8dbf5ca05d390
Signed-off-by: Mathieu Rail <contact@mathieurail.com>
Signed-off-by: Guilliano Molaire <guilliamo-jaime.molaire@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/22389
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Hudson CI
systemtap: Fix warnings.

Warnings from the last 30 days added report.

Change-Id: Ia1c867c04f42b3162483549ff23bf3be4a5b9dc4
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/25097
Tested-by: Hudson CI
libhover: Fix warnings.

Warnings from the last 30 days added report.

Change-Id: I805266a5ff1af259932b5dd37c394659c84e958a
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/25098
Tested-by: Hudson CI
profiling: Fix warnings.

As identified in the last 30 days sonar report.

Change-Id: I8c6d41dda7ce7ce1208236117b598f8012b78369
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/25099
Tested-by: Hudson CI
Fix warnings.

Remaining easy fixes from last 30 days issues report.

Change-Id: Ie098fc73e8a5c32d0d0ad59f658eaba745acde46
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/25103
Tested-by: Hudson CI
Add Gcov annotation specification for lines covered "many times".

Use the formula for an outlier (relative to upper quartile) to determine
whether a set of hit counts is large relative to each file, ignoring
lines not covered. Also show lines thoroughly covered in the overview
ruler.

Change-Id: I949c3f330b644482421441548020e91d51dd2ab7
Reviewed-on: https://git.eclipse.org/r/24998
Tested-by: Hudson CI
Reviewed-by: Roland Grunberg <rgrunber@redhat.com>
Tested-by: Roland Grunberg <rgrunber@redhat.com>
LTTng: CPU usage analysis from the LTTng kernel trace

This analysis creates a new state system to save the total time spent on each
CPU by the different threads. It then uses it, along with the LTTng kernel
state system to compute CPU usage statistics in a time range.

Change-Id: Ia60e95c3bace646477aef06d58bdb7ed64c32bd4
Signed-off-by: François Rajotte <francois.rajotte@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/21633
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Fix API analysis issues in perf, profiling, valgrind, and systemtap.

Change-Id: Ib4a502e6e89a2ff8faceb0597e289170be1088a8
Reviewed-on: https://git.eclipse.org/r/25165
Tested-by: Hudson CI
Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
Tested-by: Alexander Kurtakov <akurtako@redhat.com>
tmf: Split "CTF adaptor" into separate plugins/feature

This allows using TMF without CTF, for more flexibility and
better separation of dependencies.

Change-Id: I5d84ebcf92014601eb293b95085ef1a046e7188e
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/24752
Tested-by: Hudson CI
ctf: Make CTFTrace and its reader classes AutoCloseable

Basically just replace their dipose() method with close(). This
small change allows us to benefit from the compiler warnings for
when a resource is allocated locally in a method but never disposed.

Which then allows to find leaks. Many leaks ! Many tests were leaking
CTFTraceReaders and the like, but the biggest offender is probably the
validation methods in LttngKernelTrace and LttngUstTrace: trying to
validate a non-CTF trace could potentially leak a number of file
descriptors equal to the number of files in that trace(!)

Change-Id: I7e54416b608992a14a7bfd3cd29ffb8dc3cee898
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/24986
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
tmf: Make CtfTmfTrace AutoCloseable

While we won't be able to make ITmfTrace closeable anytime soon (every
time you get a local reference to a trace, it'd expect you to close()
it, which is not what we want), CtfTmfTrace can benefit a bit from it,
as it helps pointing out some tests that are causing resource leaks.

Change-Id: Iaa163799390e01c9d4e996e2be1c5f160382aacd
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/25091
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
profiling: Java 8 javadoc generation.

With doclint enabled by default this is needed to make javadoc
generation in profiling dir without an error (still ~100 warnings).
The patch has some side effects like removing code, making methods
private and other changes that are easier to do than writing the javadoc
for things that are unclear what do they do.

Change-Id: I72ef24e84128c4b3dc58609b2cc0368c9047801b
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/25178
Tested-by: Hudson CI
gcov/gprof: No need for sharedInstance singleton.

If there is no state saved and constructors are empty it's better to
make methods static and use them as such.
Drop useless non-javadoc comments where there are Override annotations.

Change-Id: I0e3156452f9ff7dca282fefaeaf99a049f4fe4e1
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/25197
Tested-by: Hudson CI
valgrind: Extend x-friends for tests.

Reduces warnings for using internal packagaes.

Change-Id: I45db861387e8e703e2e1fe155ed0be05b760d130
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/25210
binutils: API overview.

* Hide Activator.
* Merge multiple binutils factories into STBinutilsFactoryManager
* Formatting
* swt garbage reduced
* follow naming conventions
* members to local variables

Change-Id: Ib862f9385afd6809368885f2396dc53ba342e027
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/25207
Tested-by: Hudson CI
tmf: Increase the delay in SignalThrottlerTest

This test started failing spuriously on Hudson recently, but the
delays were a bit aggressive. Increase them a bit to give the
test more chance to pass.

Change-Id: I07b6933bcedbb8e095dced0fb57e582b8ba8adff
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/25171
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
lttng: Add a view for the CPU usage analysis

This view contains a tree viewer to show all threads spending time on the CPU
in the time range, and an XY chart viewer to display the total CPU of all
threads and the CPU usage of the currently selected from the tree viewer.

Change-Id: Id96fa1005623601539fad10e28949691b70ea1df
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/22522
Tested-by: Hudson CI
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
valgrind.ui: Cleanups.

Formatting, member to local var, redundant modifiers, etc.

Change-Id: I5bd7877d9db149b048f1cac1407a007bec1cb855
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/25211
Tested-by: Hudson CI
ctf: Do not call System.gc() in CTFTrace.close()

This call is used to workaround a bug/limitation of MappedByteBuffer
(see JDK-4724038). But CTFTrace.close() is called quite often
(for example, once per trace when closing an experiment), so it is not
the best place to call System.gc(). Instead, only call it when we are
about to delete/rename a trace.

Change-Id: Ib9b346dd04df4f64289ac9db0b976e6b70ff2551
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/25174
Tested-by: Hudson CI
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>