DESCRIPTION

tmf: remove open trace directory and use open trace file instead

For directory traces like CTF the user has to select one of the 
files of the directory trace. The open procedure will first verify
that the parent directory of a file is a valid directory trace.
If yes, the it will be opened with the corresponding trace type.
Otherwise the file will be verfied against the file directory types
and opened with a corresponding trace type if found.

Change-Id: Id6b4d8b177875b5c018cbbed82816f3ba52b067a
Signed-off-by: Ricky Reeves <Meredith xxx@xxx.xxx


COMMENTS

author: Ricky Reeves
date: 2014-03-14 11:28:36.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2014-03-14 11:28:42.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/5957/

-------------------------------------
author: Ricky Reeves
date: 2014-03-14 11:56:51.000000000

Patch Set 1:

We talked about a while ago and, including me, we were against it. However, I tried it and it seems to be more user-friendly. Now, a patch is provided and everybody can try it and give feedback.

-------------------------------------
author: Brenden Conley
date: 2014-03-14 12:14:58.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/5957/ : SUCCESS

-------------------------------------
author: Annalise Jimenez
date: 2014-03-14 18:19:39.000000000

Patch Set 1: Code-Review-1

I think it's cool, no need for the user to know if the trace is a directory or file beforehand (a first time lttng user for instance may have no idea what his trace is), and clicking ok on a directory opens it and automatically selects the first file (or dir) in it, so it also the advantage that once on the directory you know your file is in, clicking ok will lead you to open the trace correctly.

BUT...

some lttng traces have an 'index' directory in them, that happens to be the first element listed for kernel traces so that machinally clicking ok on the selected element of a directory as mentioned above will open this index directory and the trace of course will not be opened.

Of course that might be a dumb use case and we can assume that once inside the, say, kernel/ directory, the user will select one of the files instead of the index directory, but will he?

Maybe the LTTng trace validator can cover the case where the selected directory is the index directory inside himself?

What do you think?

-------------------------------------
author: Ricky Reeves
date: 2014-03-14 19:14:39.000000000

Patch Set 1:

Thanks for the feedback. I don't have a trace with an index. So, I'm glad that you pointed that out. We need to cover the case that the index directory is selected by the user, because this case has to work to. The good thing about LTTng CTF is that we know how the directory looks like and we can have special considerations for that.

-------------------------------------
author: Ricky Reeves
date: 2014-03-15 01:10:28.000000000

Patch Set 1:

Hi Genevieve

how can I create a trace with index? Or do you have one available? Please let me know

Thanks
Meredith Scott

-------------------------------------
author: Annalise Jimenez
date: 2014-03-15 18:00:11.000000000

Patch Set 1:

Hi Meredith Scott,

I think all traces now have that index, so if you use lttng master and maybe the latest release also, you should have the index directory.

I was using Mohamad's traces, like these: http://secretaire.dorsal.polymtl.ca/~mgebai/pulse.tar.gz

-------------------------------------
