DESCRIPTION

ctf: accelerate n-grams for ctf scopes

CTF based Lttng traces have 30-40% of their requests directed to the
same fields, this makes looking up these field _names_ faster.

Change-Id: I3cf32b10d22de04a1bd94ecadde37afa8e50b0a1
Signed-off-by: Ivy Mitchell xxx@xxx.xxx


COMMENTS

author: Ivy Mitchell
date: 2014-06-21 11:21:42.000000000

Uploaded patch set 7.

-------------------------------------
author: Brenden Conley
date: 2014-06-21 11:21:48.000000000

Patch Set 7:

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

-------------------------------------
author: Brenden Conley
date: 2014-06-21 12:18:02.000000000

Patch Set 7: Verified+1

Build Successful 

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

-------------------------------------
author: Braxton Mccarthy
date: 2014-06-26 19:58:09.000000000

Patch Set 7: Code-Review-1

(4 comments)

I don't think the comments from patch set 6 were looked at, most still apply.

We're now at +14 "null type safety" warnings, those need to be fixed!

Line:222, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/StructDeclaration.java -> If the map fieldMap is defined, .keySet() cannot return null. At worst you can an empty Set, or a Set that contains null objects. A suppresswarning (if even needed) would be more appropriate here.

Line:226, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/StructDeclaration.java -> same with .values()

Line:230, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/StructDeclaration.java -> same

Line:234, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/StructDeclaration.java -> same

If you KNOW for sure the code cannot return null (like with .copyOf() etc. here), but the compiler doesn't because it's not annotated, then use a SuppressWarnings.

If there is no runtime guarantee about the nullness though (like List.get() where you don't check what is inserted), then it should be null check with throw exception.

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