DESCRIPTION

tmf : Add Leaf nodes to the History Tree

This patch allows the use of leaf nodes in the History Tree. A leaf node
cannot contain children, so we can save 50 x (int + long) = 600 bytes
for each node (64k).

Note that this patch changes the on-disk file format of the history tree.
FILE_VERSION is bumped accordingly.

Change-Id: I4d99727a23fcdfbdd911fd27c621354864ebfde1
Signed-off-by: Ayanna Reed xxx@xxx.xxx
Signed-off-by: Braxton Mccarthy xxx@xxx.xxx


COMMENTS

author: Braxton Mccarthy
date: 2014-04-21 19:54:37.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2014-04-21 19:54:42.000000000

Patch Set 3:

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

-------------------------------------
author: Braxton Mccarthy
date: 2014-04-21 19:55:58.000000000

Patch Set 3: -Code-Review

Only kept the leaf nodes in for now, the extension nodes can come in a later patch.

-------------------------------------
author: Brenden Conley
date: 2014-04-21 20:33:42.000000000

Patch Set 3: Verified+1

Build Successful 

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

-------------------------------------
author: Ayanna Reed
date: 2014-04-22 00:20:18.000000000

Patch Set 3: Code-Review+1

I like this patch !

-------------------------------------
author: Annalise Jimenez
date: 2014-04-22 19:15:48.000000000

Patch Set 3: Code-Review-1

(4 comments)

Sorry alex, can't put my legal +1 just yet. There's a few questions to answer first

Line:20, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/LeafNode.java -> Isn't the idea NOT to have child nodes? This comment is a bit misleading.

Line:500, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java -> Is this cast safe? We know that indexOfNode - 1 will return a CoreNode always always?

Asserts don't work in production code and later, in many months, when these classes are changed, the asserts will be ignored but the condition will be false and we won't know why it fails. Either replace the assert by a throw IllegalStateException or... whatever.

Line:820, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java -> While here, you could correct this exception handling and use Activator.logError() instead.

Line:104, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HTNode.java -> Is this used? It is redundant with the one in HTInterval

-------------------------------------
author: Braxton Mccarthy
date: 2014-04-22 23:39:14.000000000

Patch Set 3:

(3 comments)

Thanks for the comments. I'll fix it tomorrow.

Line:20, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/LeafNode.java -> Yeah, *these* are the child nodes. It's indeed misleading.

Line:500, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java -> True, the assert is useless, it should be a check that throws an exception. If everything is fine, then here indexOfNode should always have a safe value, but we should check to to make sure that it is "< latestBranch.size() - 1". -1 to make sure we don't get a leaf node, in which case the cast wouldn't be safe.

Line:104, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HTNode.java -> Good point, this looks like a merge artifact... it was moved to HTInterval iirc to eventually allow for intervals of different sizes.

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