DESCRIPTION

Update Grammar and Add support for callsites

A new feature coming in LTTng 2.2
Add test cases for callsites
Improve other test cases

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


COMMENTS

author: Ivy Mitchell
date: 2012-11-02 15:28:05.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2012-11-02 15:28:15.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/510/ 

-------------------------------------
author: Brenden Conley
date: 2012-11-02 15:47:04.000000000

Patch Set 2: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/510/ : SUCCESS

-------------------------------------
author: Braxton Mccarthy
date: 2012-11-02 17:44:40.000000000

Patch Set 2: I would prefer that you didn't submit this

(24 inline comments)

Mostly style comments. I didn't test with a real trace with callsites, but the unit tests seem to work fine.

Also, SuppressWarnings should be added to the auto-generated files like before, there's like 200 in each.

Line:47, lttng/org.eclipse.linuxtools.ctf.parser/Grammar/CTFLexer.g -> whitespace

Line:17, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/CTFCallsite.java -> too many \n, should be only 1

Line:67, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/CTFCallsite.java -> While this is technically fine since the fields are final, Sonar will probably complain. I think we should have private fields and proper getters, like everywhere else in the code...

Line:81, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/CTFCallsite.java -> This could be a private static final class member.

Line:18, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java -> unused import

Line:265, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java -> maybe comment what this regex is for?

Line:141, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEvent.java -> maybe add "&& entry.getValue() instanceof IntegerDefinition"

Line:148, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEvent.java -> don't wrap this

Line:154, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEvent.java -> no need for "this" here, it's implied in fTrace (field trace)

Line:16, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceCallsitePerformanceTest.java -> The tests should be properly documented instead...

Line:24, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceCallsitePerformanceTest.java -> It's Heron and Meerkat, but it doesn't really matter ;)

Line:40, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceCallsitePerformanceTest.java -> Missing a b in Babby ;)

Line:69, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceCallsitePerformanceTest.java -> Might as well have no Javadoc than wasting 3 lines

Line:76, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceCallsitePerformanceTest.java -> here too

Line:101, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceCallsitePerformanceTest.java -> nls warnings

Line:21, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/event/CTFCallsiteTest.java -> the tests should be properly documented...

Line:3, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/event/TestAll.java -> unused

Line:5, lttng/org.eclipse.linuxtools.ctf.parser/Grammar/regenGrammar.sh -> Very good idea to have this. Trailing whitespaces tho!

Line:783, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java -> auto-format these two lines

Line:797, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java -> shouldn't it return an empty list if there is no match? (I'm thinking about the xxx@xxx.xxx annotations...)

Line:809, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java -> can it be null? Should be documented

Line:821, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java -> Here too, could the return be null if the ip matches nothing?

Line:836, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java -> or null if none is found

Line:842, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java -> ctrl+shift+f this method

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