DESCRIPTION

tmf : add Leaf node and Extension node in the history tree

This patch allow to use Leaf node and Extension node.
The leaf node can not contain children, and save
50x(int+long)=600 octets for each leaf node (4096 octets).
The extension node support the new feature to add some extension
to a Core node. The Core node extends the new extension node.

WARNING : this patch change the structure of the history tree. Please
remove each history file before testing it !

Signed-off-by: Ayanna Reed xxx@xxx.xxx


COMMENTS

author: Ayanna Reed
date: 2014-04-10 13:40:11.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2014-04-10 13:40:17.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2014-04-10 13:45:35.000000000

Patch Set 1: Verified-1

Build Failed 

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

-------------------------------------
author: Ivy Mitchell
date: 2014-04-10 13:53:48.000000000

Patch Set 1: Code-Review-1

(8 comments)

Line:9, /COMMIT_MSG -> this patch allows the use of leaf nodes and extension nodes.
The leaf node cannot contain children and thus saves 50x(int+long)=600 bytes for each node (4k). 

The extension nodes support adding some extensions to a core node. The core node extends the new extension node. 

This patch changes the structure of the history tree.

Line:38, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HTConfig.java -> rename

Line:40, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HTConfig.java -> rename

Line:28, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/ClaudetteNode.java -> rename

Line:146, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HTNode.java -> rename

Line:147, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HTNode.java -> /* extended ("Claudette") nodes */

Line:148, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HTNode.java -> rename

Line:26, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/CoreNode.java -> rename

-------------------------------------
author: Ayanna Reed
date: 2014-04-10 13:54:59.000000000

Patch Set 1:

(4 comments)

Line:10, /COMMIT_MSG -> saves

Line:11, /COMMIT_MSG -> 600 bytes

Line:15, /COMMIT_MSG -> changes

Line:17, /COMMIT_MSG -> Add the change ID

-------------------------------------
author: Kason Bridges
date: 2014-04-10 13:58:16.000000000

Patch Set 1:

(2 comments)

Line:22, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/ClaudetteNode.java -> designed

Line:23, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/ClaudetteNode.java -> period at the end of the sentence.

-------------------------------------
author: Braxton Mccarthy
date: 2014-04-10 17:25:33.000000000

Patch Set 1: Code-Review-1

(18 comments)

Quick overview review. Haven't had the time to try it in details, but that should keep you busy for a bit hopefully!

ClaudetteNode is fine by me ;)  It's an internal class, not API or anything.

Line:11, /COMMIT_MSG -> The 50 here is (technically) configurable, so that could mean bigger savings if using a higher fanout of the tree.

Line:16, /COMMIT_MSG -> If you bump the FILE_VERSION this should be handled automatically. Users don't normally read the commit messages anyway ;)

Line:30, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HTConfig.java -> these defines should go in HTNode. This file is for "configuration parameters to use when creating a History Tree".

It should be a enum also.

Line:23, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/LeafNode.java -> remove this empty line

Line:25, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/LeafNode.java -> all node classes should be final

Line:39, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/LeafNode.java -> if the class is final, a protected constructor doesn't make sense. It should be public (to be unit-testable)

Line:4, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java -> should probably fix this header while at it. Just put one line

 2010, 2014 École Polytechnique, Ericsson, and others

and remove the one with my name (it's already at the bottom).

The Eclipse headers have this nasty habit of mixing up copyright owners and contributors... for them only companies can possibly detain copyright ;)

Line:105, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java -> The very first node in a new tree will be a leaf node, not a core node.

Line:520, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java -> same line

Line:572, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java -> same line

Line:828, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java -> We don't handle or use asserts, so it's never gonna be checked. You should use (if ...) { throw new IllegalStateException(); } instead.

Line:835, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java -> no need for this temporary check anymore with this patch!  The last child should be a LeafNode anyway.

Line:187, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTreeBackend.java -> space after cast

Line:18, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/ClaudetteNode.java -> which...? which what? Don't leave me hanging here!

Line:22, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/ClaudetteNode.java -> comes

Should credit Mathieu too, so it could say "It was designed by Braxton Mccarthy and Tessa Dickson during a poutine dinner..."

Line:81, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/ClaudetteNode.java -> put this on one line

Line:230, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/CoreNode.java -> if type changes to an enum, this method should now return the enum

Line:26, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/CoreNode.java -> I understand how it makes sense code-wise that Core extends Claudette (because both have the "extension" concept, but Core has children on top of it). But semantically it's confusing. They should both extend HTNode directly, and CoreNode can repeat get getExtensionSequenceNumber() method. It's quite small anyway.

-------------------------------------
author: Kaeden Tapia
date: 2014-04-10 17:29:58.000000000

Patch Set 1: Code-Review-1

-1 on ClaudetteNode. I don't think it matters if it's internal or not. I don't have the slightest clue of what it does by looking at this class name.

-------------------------------------
author: Ayanna Reed
date: 2014-04-10 22:37:06.000000000

Patch Set 1:

(25 comments)

Thanks

Line:9, /COMMIT_MSG -> Done

Line:10, /COMMIT_MSG -> Done

Line:11, /COMMIT_MSG -> Done

Line:15, /COMMIT_MSG -> Done

Line:16, /COMMIT_MSG -> Done

Line:17, /COMMIT_MSG -> Done

Line:30, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HTConfig.java -> Done

Line:38, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HTConfig.java -> Done

Line:40, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HTConfig.java -> Done

Line:105, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java -> Done

Line:520, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java -> Done

Line:572, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java -> Done

Line:835, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTree.java -> Done

Line:187, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HistoryTreeBackend.java -> Done

Line:18, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/ClaudetteNode.java -> Done

Line:22, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/ClaudetteNode.java -> Done

Line:23, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/ClaudetteNode.java -> Done

Line:28, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/ClaudetteNode.java -> Done

Line:81, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/ClaudetteNode.java -> Done

Line:146, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HTNode.java -> Done

Line:147, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HTNode.java -> Done

Line:148, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/HTNode.java -> Done

Line:230, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/CoreNode.java -> a enum is compatible we the fact that we want to store and retrive the value in a byte in the history file ?

Line:26, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/CoreNode.java -> Done

Line:26, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/historytree/CoreNode.java -> :(

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