DESCRIPTION

TMF: Generate a session configuration file from LTTng analysis requirements

The requirements must contain both the event names and the domain type. With
these, we are able to generate a minimal session configuration capable of being
loaded by LTTng with the load command.

Change-Id: I9786f322842b5166376f67d522907fa6bdc84edb
Signed-off-by: Bailey Galloway xxx@xxx.xxx


COMMENTS

author: Bailey Galloway
date: 2014-03-23 23:24:54.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2014-03-23 23:25:00.000000000

Patch Set 3:

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

-------------------------------------
author: Bailey Galloway
date: 2014-03-23 23:42:50.000000000

Patch Set 3:

I kept the session config generation from requirements and renamed it generateDefault... since most of it values are taken from sessionConfigStrings as default values.

A path must be provided now. It's the callers responsibility to give a trace session path that will be valid at runtime.

I added the possibility to generate a session config with ISessionInfo. Most of what a profile needs to be loaded is provided by that interface.

-------------------------------------
author: Brenden Conley
date: 2014-03-24 00:14:45.000000000

Patch Set 3: Verified+1

Build Successful 

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

-------------------------------------
author: Ricky Reeves
date: 2014-03-24 12:03:17.000000000

Patch Set 3:

Hi Genevieve

I'm ok to send commands one-by-one instead of using the XML configuration. Once LTTng 2.5 is released then we can change it to use the XML instead.

/Meredith Scott

-------------------------------------
author: Annalise Jimenez
date: 2014-03-24 15:41:12.000000000

Patch Set 3: Code-Review-1

(10 comments)

I see you've already looked into the SessionInfo method. Good good!

Do you think you'll have time to integrate it with the requirements? either generate an XML session configuration from a session and requirement (merge session events and requirements), or add the requirements to the sessionInfo and then generate the XML from it.

Line:61, lttng/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/lttng2/core/session/SessionConfigXML.java -> Move the last sentence to its own paragraph and add a FIXME

Line:234, lttng/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/lttng2/core/session/SessionConfigXML.java -> it's schema -> its schema

Line:302, lttng/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/lttng2/core/session/SessionConfigXML.java -> You should group session generation methods together, here the validate and save come between two sets of those methods. You can precede logically grouped methods with a comment like this

// ---------------------------------------------------------

// Methods to generate session configuration files

// ---------------------------------------------------------

Line:375, lttng/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/lttng2/core/session/SessionConfigXML.java -> Nice! So this method replaces the default one and uses session information instead. Could you add requirements to it, so it can generate a session profile with the given requirements from existing sessions?

Line:468, lttng/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/lttng2/core/session/SessionConfigXML.java -> It's the last default value I see in this method. Is it something specific to live streaming? Maybe by rebasing with the live streaming, it will be set also in the session info.

Line:494, lttng/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/lttng2/core/session/SessionConfigXML.java -> All event -> All events

Line:508, lttng/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/lttng2/core/session/SessionConfigXML.java -> Remove s at the end of method name since it returns only one element.

Line:1, lttng/org.eclipse.linuxtools.lttng2.core.tests/test_session_config_files/test_invalid.lttng -> Add copyright header

Could you also add a comment to indicate how this file is invalid.

Line:177, lttng/org.eclipse.linuxtools.lttng2.core.tests/src/org/eclipse/linuxtools/lttng2/core/tests/session/SessionConfigXMLTest.java -> It's weird to have a . alone here. Use "Test for the xxx@xxx.xxx ..} method." instead.

Line:1, lttng/org.eclipse.linuxtools.lttng2.core.tests/test_session_config_files/test_valid.lttng -> Add copyright header

-------------------------------------
author: Annalise Jimenez
date: 2014-03-24 15:50:13.000000000

Patch Set 3:

(1 comment)

Another comment that came up while reviewing the next patches.

Line:201, lttng/org.eclipse.linuxtools.lttng2.core/src/org/eclipse/linuxtools/lttng2/core/session/SessionConfigXML.java -> We could have more than one domain, if say a user selects both lttng kernel and ust memory analysis. But then I guess by merging the requirements, we'll have lost which events are part of which domains... 

Add a TODO here if it is just not supported yet.

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