DESCRIPTION

lttng: Migrate LTTng-UST CallStack to the analysis framework

Reworked the tests a bit for less copy-paste.

Change-Id: Ibd8587dfd41464e9f5e54fbaa3f6dd22cfabadfe
Signed-off-by: Braxton Mccarthy xxx@xxx.xxx


COMMENTS

author: Braxton Mccarthy
date: 2014-02-11 22:39:56.000000000

Uploaded patch set 2.

-------------------------------------
author: Braxton Mccarthy
date: 2014-02-11 23:06:15.000000000

Patch Set 2:

The unit test rework helped debug the hang, but then the patch ended up bigger than first intended. Sowwy! :S

-------------------------------------
author: Brenden Conley
date: 2014-02-12 00:22:25.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2014-02-12 00:32:52.000000000

Patch Set 2: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/5410/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2014-02-12 06:57:15.000000000

Patch Set 2: -Verified

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

-------------------------------------
author: Brenden Conley
date: 2014-02-12 07:46:57.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Annalise Jimenez
date: 2014-02-12 14:02:06.000000000

Patch Set 2: Code-Review-1

(1 comment)

I tick when reading this comment, but that's it. Otherwise, looks good to me.

Line:19, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/callstack/AbstractCallStackAnalysis.java -> Seems unfair to say the analysis's purpose consist only to populate the Callstack View, especially since analysis may move to core eventually. You could do much more with those results, say, detect function call patterns for instance, make sure function X is never called by Y in a given situation.

You could add more details on what is expected from the callstack analyses.

-------------------------------------
author: Braxton Mccarthy
date: 2014-02-12 14:33:28.000000000

Patch Set 2:

(1 comment)

Line:19, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/callstack/AbstractCallStackAnalysis.java -> Well, the sole purpose of this class even existing is because of the CallStackView (we check for a .getAnalysisModulueOfClass(AbstractCallStackAnalysis) somewhere). That's why there's almost nothing in here, but we still use the class.

Of course an analysis could do more than that (perhaps have sub-analyses etc.) But if you decide to extend this particular class, it should be because you want to populate the Callstack view.

-------------------------------------
author: Annalise Jimenez
date: 2014-02-12 14:39:50.000000000

Patch Set 2:

(1 comment)

Line:19, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/callstack/AbstractCallStackAnalysis.java -> You would extend this particular class because you want to generate a call stack state system, with which you can among other things populate the Callstack view. But who knows, I can imagine someone wishing some output on the command line from this state system.

It's just that this comment seems to limit the use of this class to populating a view, and in TMF, there are no limits ;-)

-------------------------------------
author: Braxton Mccarthy
date: 2014-02-12 14:55:59.000000000

Patch Set 2:

(1 comment)

Line:19, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/callstack/AbstractCallStackAnalysis.java -> If they want to do other things than just populate the Call Stack View, they are more than welcome to ;)  It doesn't say say "whose sole purpose is...". It's just that populating the CallStackView should be among the things this analysis module will do.

How would you word it differently?

-------------------------------------
author: Annalise Jimenez
date: 2014-02-12 15:22:46.000000000

Patch Set 2:

(1 comment)

Line:19, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/callstack/AbstractCallStackAnalysis.java -> I'd say

The base class for analyses who provide callstack data. The results can be used for example to populate a call stack view.

Not a big change, just less view-centric.

-------------------------------------
author: Braxton Mccarthy
date: 2014-02-12 18:17:19.000000000

Patch Set 2:

(1 comment)

Line:19, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/callstack/AbstractCallStackAnalysis.java -> Once again, this class IS view-centric ;)  If you do not want to populate the CallStack View, there is no point using it, just extend TmfStateSystemAnalysisModule directly. If you want to populate the view, the only way is by extending this class - because the view looks for analyses assignable to this particular class.

But I'll reword it to make it less seem like it's exclusive (gotta rebase anyway).

-------------------------------------
author: Braxton Mccarthy
date: 2014-02-12 18:27:04.000000000

Patch Set 2:

(1 comment)

Line:19, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/callstack/AbstractCallStackAnalysis.java -> To better explain what I mean, let's suppose we have an analysis producing a call stack chart in ncurses or something. That analysis wouldn't need to extend this class at all. As we can see, there is nothing callstack-specific in here, it's just a pass-through class so that the view can identify which analyses it can look at.

It's a weird case, because we have one CallStackView, and many state providers/analyses. The view cannot look for the "lttng2.ust.callstack" ID, because that is in a different plugin. So we need some kind of intermediary analysis to go with the view.

It's different with the Control Flow View for example, because that one lives in the lttng2 plugin, so it can call its analysis directly.

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