Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315457

Summary: [LTTng] Importing trace seems to do nothing
Product: z_Archived Reporter: Andrew Overholt <overholt>
Component: LinuxToolsAssignee: Francois Chouinard <fchouinard>
Status: CLOSED FIXED QA Contact: Francois Chouinard <fchouinard>
Severity: normal    
Priority: P3 CC: copelnug
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Library installation update (documentation) fchouinard: iplog-

Description Andrew Overholt CLA 2010-06-02 14:46:37 EDT
Perhaps the traces in the test suite are just too boring but after building the native library and doing the LD_LIBRARY_PATH dance, I restarted, imported the traces from the tests and see nothing in any of the LTTng views.  Did I do something wrong?
Comment 1 Francois Chouinard CLA 2010-06-02 15:10:39 EDT
Here are some steps:

0. Open the LTTng perspective
1. Create a project (say "MyProject")
2. Right-click on the project and import some traces (they should appear in the "Traces" folder). Note that the provided traces are compressed and need to be expanded first.
3. Create an experiment (say "MyExperiment")
4. Select MyExperiment, right-click, and "Select Traces" that will be part of this experiment
5. Double-click on the experiment.

Also note that the version that sits in TRUNK as of June/2 is seriously brain-damaged...
Comment 2 Francois Chouinard CLA 2010-06-02 15:11:16 EDT
The User Guide should cover all this :-)
Comment 3 Andrew Overholt CLA 2010-06-02 17:11:08 EDT
I was using today's build so I guess that's the problem.  Is it nit-picky of me to ask how the unit tests passed if it's brain-damaged?  ;)
Comment 4 Francois Chouinard CLA 2010-06-03 09:08:37 EDT
(In reply to comment #3)
> I was using today's build so I guess that's the problem.  Is it nit-picky of me
> to ask how the unit tests passed if it's brain-damaged?  ;)

Test coverage of basic components is pretty good and they are reasonably stable. There are more holes int the coverage of component integration and UI. The version on trunk was kind-of-OK for small traces but had serious performance issues (both in time and size of traces that can be analyzed).

The one we are working on addresses these issues.
Comment 5 Andrew Overholt CLA 2010-06-03 11:00:23 EDT
I still can't get a trace to populate the views at all.  After building the native library and setting LD_LIBRARY_PATH (we've gotta come up with a better way of finding the native library (bug #315602)) I've followed the steps in the help document but double-clicking on a trace doesn't do anything.

Oh, I see an exception on the console.  We should catch these instead of printing them to the console (bug #315604).  Maybe I just have the wrong liblttvtraceread version ... but we should document what version to use (bug #315605).  :)
Comment 6 François Godin CLA 2010-06-03 17:02:08 EDT
I confirm that's it's a library version problem.

Normally an error message would be shown but it seems that the program do check only if he know the version and not if a library exist for this version.

To correct that, the best solution would be to add a test when the trace is imported. With dlopen and the flag RTLD_NOLOAD it should be possible to test if the library exist without loading it before we need to load it. It would then be possible to show an error message with the missing library number.
Comment 7 Francois Chouinard CLA 2010-06-03 17:10:17 EDT
Created attachment 171033 [details]
Library installation update (documentation)
Comment 8 Francois Chouinard CLA 2010-06-03 17:13:15 EDT
Francois G., Alvaro: Could you have a look before I commit.
Comment 9 Francois Chouinard CLA 2010-06-06 11:34:17 EDT
The fix was part of the 2010-06-05 update.
Comment 10 Andrew Overholt CLA 2010-06-07 09:45:27 EDT
With a built liblttngtrace on LD_LIBRARY_PATH (git hash 72984157670b34f39c04134a4188bed37559095d), I import the traces in the test plugin (I've tried both compressed and uncompressed), create an experiment, associate the trace, and I still get nothing in the views.  I am on x86_64 Eclipse SDK RC4 and tried the most recent Linux Tools build, #230.
Comment 11 Andrew Overholt CLA 2010-06-07 12:03:11 EDT
After some IRC debugging, it was determined that I had to double-click on the experiment name itself and not on the trace underneath it.  FWIW, my steps (which should be on the wiki somewhere) were:

- grab git snapshot tarballs of the heads of the traceformat-2.5 and 2.6 branches:

http://git.dorsal.polymtl.ca/?p=liblttngtrace.git;a=shortlog;h=refs/heads/traceformat-2.5
http://git.dorsal.polymtl.ca/?p=liblttngtrace.git;a=shortlog;h=refs/heads/traceformat-2.6

- build and install the 2.5 one (./autogen.sh --with-jni-interface && make && sudo make install)
- build and install the 2.6 one (./autogen.sh --with-jni-interface && make && sudo make install)
- run Eclipse with the above libraries on LD_LIBRARY_PATH:

LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" ./eclipse [-data /tmp/testLTTng]

- switch to LTTng perspective
- new project
- import trace (give it the directory of one of the un-tarred ones from o.e.linuxtools.lttng.tests)
- new experiment
- right-click on experiment, select traces, select the trace you imported
- double-click **on the experiment** (not on the trace under the experiment!  <-- this is what was tripping me up)
- booya, examine the trace
Comment 12 Francois Chouinard CLA 2010-07-05 17:14:15 EDT
Delivered with the Helios release.