DESCRIPTION

Fix multiple coding style and typo issues while reading code.

Change-Id: If63330f4c86e7cd87cf979e1709a81fb7c8958ab
Signed-off-by: Jordon Obrien xxx@xxx.xxx


COMMENTS

author: Jordon Obrien
date: 2013-11-19 02:23:16.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2013-11-19 19:03:53.000000000

Patch Set 2:

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

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-19 19:15:50.000000000

Patch Set 2: Code-Review+1 IP-Clean+1

(2 comments)

Line:7, /COMMIT_MSG -> For future reference, we typically put the component name as a prefix to the commit title, in this case, "ctf: ". It makes it easier when looking at a list of commits to know which part of the code it's related to.

Line:300, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReader.java -> auto-format would re-wrap these lines. You can either put an empty line in-between each line, or use HTML tags like <ul><li> etc.

-------------------------------------
author: Brenden Conley
date: 2013-11-19 19:50:36.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Bradyn Guerra
date: 2013-11-20 00:27:09.000000000

Patch Set 2: Code-Review+1

(1 comment)

I added 1 comment.

Line:331, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java -> Is there a good reason to have 2 different for loops here? The loop was split by f9a178d, with comment "Merge master in TmfTraceModel"... Is it a merge issue?

-------------------------------------
author: Jordon Obrien
date: 2013-11-20 13:09:39.000000000

Patch Set 2:

(1 comment)

Alex, could you check the Francois comment.
I had the same question.

Line:331, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java -> I asked to myself the same question.
I assumed they had a reason to split it, but I don't know!

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-20 19:04:59.000000000

Patch Set 2:

(1 comment)

Line:331, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java -> Looking at the commit François mentioned, yep, it does look a merge conflict that was not resolved correctly.

But! it seems to work fine either way... and running our mini-benchmark (ReadTrace.java, but with more loops), it seems a tiny bit faster the way it's split right now (765 ns/event vs. 755 ns/event) But that's probably too small to be relevant.

I'd agree to merge those two loops back together, it'd be a bit cleaner.

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-20 19:06:12.000000000

Patch Set 2:

I'll give Matthew a day or two to look at this. If he doesn't complain we can push it then. ;)

-------------------------------------
author: Ivy Mitchell
date: 2013-11-20 20:24:30.000000000

Patch Set 2:

(3 comments)

Line:270, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReader.java -> I prefer greater or equal to

Line:331, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java -> I remember looking at it before and finding it more logical to have it done in two passes since it would be slightly more parallelizable in the long run. The seeks done together can be parallelified and the bottom for is not. but I remember I was thinking in an MPI kinda way. That being said, the comment should be outside of this scope {}. I think it should also be better commented as it took me 20 min to remember why.

Line:131, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputPacketIndex.java -> Binary search...

-------------------------------------
author: Jordon Obrien
date: 2013-11-21 06:23:58.000000000

Patch Set 2:

(5 comments)

Line:7, /COMMIT_MSG -> ack

Line:270, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReader.java -> suggested by mathieu, but ok. I changed it.

Line:300, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReader.java -> Done

Line:331, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java -> I really do not get what you mean.

Line:131, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputPacketIndex.java -> I agree, it's more a binary search.
The dichotomic search is the class of those kind if algorithm.

http://en.wikipedia.org/wiki/Dichotomic_search

 I removed the comment from this commit, now it is part of an other commit.

-------------------------------------
author: Gerrit Code Review
date: 2013-11-26 15:38:08.000000000

The change could not be merged due to a path conflict.

Please rebase the change locally and upload the rebased commit for review.

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