tmf: Use ConcurrentHashMap in TmfStatisticsTreeNode

Since multiple threads can update the statistics when using
experiments with more than one trace the tree node structure needs
to thread-safe. Using a ConcurrentHashMap instead of a regular HashMap
avoids ConcurrentModificationException for the current way this class
is used in TMF.

Change-Id: I38127466066660f82fb9cddd1465cb5e62c114c6
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/23719
Tested-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Systemtap: Update "graphingapi" ID strings.

Replace any instance of "graphingapi" in the ID strings
of saved user data objects (such as graph and data set
IDs) with "graphing". Also add measures to prevent the
reading in of data with outdated IDs from causing errors.

Change-Id: I2f88072328e45c9f845b70a30895acdc147cf80c
Signed-off-by: Andrew Ferrazzutti <aferrazz@redhat.com>
Reviewed-on: https://git.eclipse.org/r/23866
Tested-by: Hudson CI
lttng: Move createSession parameters into SessionInfo class

Change-Id: Iaa45647fcfa69fd3e62fdb56baf68070b27cad27
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/23591
Tested-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
IP-Clean: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
add key shortcut for zoom control

Change-Id: I0d6aef31b8ad27d073708883d44e614c0cc7f345
Reviewed-on: https://git.eclipse.org/r/23687
Tested-by: Hudson CI
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
IP-Clean: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-by: Xavier Raynaud <xavier.raynaud@kalray.eu>
IP-Clean: Xavier Raynaud <xavier.raynaud@kalray.eu>
Tested-by: Xavier Raynaud <xavier.raynaud@kalray.eu>
tmf: Fix potential memory leak by dispose histogram data model.

It removes the references to trace objects.

Change-Id: I58f7793d79c4c6dc766eef119f29ed1d0c2063ed
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/23736
Tested-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
tmf: Improve time graph combo responsiveness

- Optimize computation of visible expanded items list and prevent
unnecessary recomputation.

- Optimize alignment of tree and time graph item heights and only align
currently visible items.

- Remove the paint listener used to align item heights and add a common
method to simultaneously align the top index and the item heights when
necessary.

Change-Id: I4aedb6ca5973f867288a8334d92c53e688b775fe
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/23413
Tested-by: Hudson CI
IP-Clean: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
tmf: Fix time graph combo freezing when expanding parent of many items

When expanding an item in the time graph combo, the expanded state of
every child item needs to be synched between the tree and the time
graph, due to inconsistent behavior between platforms. When the parent
has hundreds of child items, this can take several seconds due to the
inefficient searching for the item corresponding to a time graph entry
in both the tree and the time graph, for getting and setting the
expanded state.

For the tree, instead of gettting the expanded state of each item from
the tree viewer using the model element, the set of expanded elements
is retrieved once and the expanded state can be deduced by the presence
or absence of a model element in this set. Furthermore the synching of
expanded state is only performed for child items that have children
themselves.

For the time graph, the item model is changed to use a map from time
graph entry to time graph item, which greatly reduced the time necessary
to find the item corresponding to an entry. The expanded item index is
also stored directly in the item which avoids the need to iterate to
find an expanded time graph entry's index.

Change-Id: Icefc393be8a5e2ee1a98b98a2c6b126da7490035
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/23817
Tested-by: Hudson CI
Systemtap: Remove unused inner class MyUserInfo.

Change-Id: I28ac4b7df4024b42e1bebbc3728b2b40719342e2
Signed-off-by: Andrew Ferrazzutti <aferrazz@redhat.com>
Reviewed-on: https://git.eclipse.org/r/24003
Tested-by: Hudson CI
TMF: Add get parent to state system

It is possible to get the children of an attribute. This patch add also
required methods to query the parent attributes.

* Add getParent() method to Attribute, AttributeTree and StateSystem
* Add unit test to check the functionality
* Provides the required documentation

Change-Id: I635326068c2a298b32952599e09b2426b2e1fbb0
Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>
Reviewed-on: https://git.eclipse.org/r/24026
Tested-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
IP-Clean: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Genevieve Bastien <gbastien+lttng@versatic.net>
tmf: Fix trace properties not shown when location URI has encoded chars

The trace properties (e.g. CTF environment variables) are not shown when
the trace element's location URI contains encoded characters (e.g.
space=%20), because the trace path uses the decoded characters and
therefore does not match the trace element's location.

The patch also modifies the output of the 'location' property to show
the unencoded URI string.

Change-Id: Ida0c56096b88690058eccfc5e408222fd461f7b7
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/24022
Tested-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
tmf: Fix NPE when dropping trace with unknown trace type

NullPointerException occurs when drag and dropping a trace with unknown
trace type to an experiment, or from another project to the traces
folder, but as a link.

Change-Id: I5060ac7315a3be1eb37779d933a12fdfa2f42cb2
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/24095
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Hudson CI
Linuxtools: Delete /tmp files created by tests.

Change-Id: I42c8e6ef3b148602412164ef6bd4d4b4f2c98192
Signed-off-by: Andrew Ferrazzutti <aferrazz@redhat.com>
Reviewed-on: https://git.eclipse.org/r/24120
Tested-by: Hudson CI
Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
IP-Clean: Alexander Kurtakov <akurtako@redhat.com>
Tested-by: Alexander Kurtakov <akurtako@redhat.com>
[TMF] Increase visibility of some package protected methods

Therefore, these methods can be used in subclasses and/or from other packages.

Change-Id: Ie5ef3408dfc8add0d4da8279c18a7c6391381250
Signed-off-by: Xavier Raynaud <xavier.raynaud@kalray.eu>
Reviewed-on: https://git.eclipse.org/r/24057
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Hudson CI
rpm: Make a method static.

Change-Id: I79d1eb98f22ecece3849a855457f0640da960173
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/24180
Tested-by: Hudson CI
fix #431528 (Improvement for "No Gprof Data File Found" error message)

Change-Id: I6f661be30d2d1050bf54ba1ddc18496a9bb8a000
Signed-off-by: Xavier Raynaud <xavier.raynaud@kalray.eu>
Reviewed-on: https://git.eclipse.org/r/24185
Tested-by: Hudson CI
Reviewed-by: Rodrigo Fraxino Araujo <rfaraujo@linux.vnet.ibm.com>
IP-Clean: Rodrigo Fraxino Araujo <rfaraujo@linux.vnet.ibm.com>
Tested-by: Rodrigo Fraxino Araujo <rfaraujo@linux.vnet.ibm.com>
lttng: Speed up the lttng.ui tests by reducing a delay

waitForJobs checks every second if the job manager is idle.
I could check more frequently. With this change, the test
runs in 90 secs instead of 240 secs.

Change-Id: I97900a9bd5b511db5309180724eef982d0fb1f57
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/24035
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
lttng: Convert CreateSessionDialog to a TitleAreaDialog

This allows to display an error message as the fields are modified.

Change-Id: I0974265872e1648e8a7c7ca7a7d89cf36b260394
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/23592
Tested-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
IP-Clean: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
TMF: Validate new trace type before setting it

Also change the return type of TraceTypeHelper#validate to return an IStatus
instead. This patch fixes bug #431646

Change-Id: I893ade44645f92dfe231cb603e16e6fbf17209eb
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/24208
Tested-by: Hudson CI
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
IP-Clean: Patrick Tasse <patrick.tasse@gmail.com>
Fix for Bug 430956 - Luna M6 crash

- Switch libhover devhelp to use neko html to parse devhelp
  html instead of Swing to avoid gtk2 being brought in
  when gtk3 may be being used at the same time
- Add org.apache.xerces and org.cyberneko.html Orbit packages to
  category.xml

Change-Id: I821ef0de6cc46081824a722afbd50db5240cd9e4
Reviewed-on: https://git.eclipse.org/r/24024
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
IP-Clean: Jeff Johnston <jjohnstn@redhat.com>
Tested-by: Jeff Johnston <jjohnstn@redhat.com>
ctf: mini benchmark for performance regressions

Change-Id: I951e3abe0f51e7e267411d416e0bccd83f8327c7
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/23662
Tested-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
IP-Clean: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>