DESCRIPTION

tmf : fix for CtfIterator getCurrentEvent()

This function is very costly and is called 3 times per event.
The previous CurrentEvent is cached to accelerate the process of building the state system

Benchmark for the TMF sample trace (13.4 Mo with 697343 events) :

Before :
Build of the state system : 8.896 s
Call of createEvent function : 2 091 982

After :
Build of the state system : 6.829 s
Call of createEvent function : 697 343

Benckmark with a 100Mo kernel trace :
Before : 48.1s
After : 38.0s

Possible gain of the state system building time : 23 %

Change-Id: Ibee6509dc378503ad672ca038b3ab17273a11966
Signed-off-by: Ayanna Reed xxx@xxx.xxx


COMMENTS

author: Ayanna Reed
date: 2014-02-05 15:02:34.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2014-02-05 15:02:40.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2014-02-05 15:44:00.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Ivy Mitchell
date: 2014-02-05 19:43:49.000000000

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

(1 comment)

Line:133, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java -> I like this, but would it be better to call it fPreviousEvent?

-------------------------------------
author: Ayanna Reed
date: 2014-02-05 19:48:27.000000000

Patch Set 2:

(1 comment)

Line:133, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java -> As you want. I name it CurEvent because it comes from getCurrentEvent and we already have, fCurRank, fCurLocation...

-------------------------------------
author: Ivy Mitchell
date: 2014-02-05 19:50:18.000000000

Patch Set 2:

(1 comment)

I +1'ed so it's not a showstopper, I am asking the question, not trying to bog down the process. 
BTW, great catch

Line:133, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java -> I know, I am just thinking previouscurrentnextpreviousevent may get long.

-------------------------------------
author: Ivy Mitchell
date: 2014-02-06 16:07:33.000000000

Patch Set 2: Code-Review-1

(1 comment)

Line:128, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java -> I thought about it and hashcode matches are not perfect matches. The fCurlocation is a CTFLocation. It would be preferable to put a .equals instead. 

I was sick yesterday and should not have been reviewing code. :)

-------------------------------------
author: Ayanna Reed
date: 2014-02-06 16:51:48.000000000

Patch Set 2:

(2 comments)

Done

Line:128, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java -> Done

Line:133, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java -> Done

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