DESCRIPTION

[ctf] Hoist getLong into BitBuffer.

Even if the ByteBuffer does not support getLong natively,
the abstraction should still stay in the BitBuffer and not
at each use site.

And the complex computation for signed-extension is useless
when you let Java do the signed extension and truncate
when the resquested number representation is unsigned.

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


COMMENTS

author: Jordon Obrien
date: 2013-11-24 08:16:49.000000000

Uploaded patch set 7.

-------------------------------------
author: Brenden Conley
date: 2013-11-24 08:16:54.000000000

Patch Set 7:

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

-------------------------------------
author: Jordon Obrien
date: 2013-11-24 08:42:59.000000000

Patch Set 7:

(1 comment)

This patch-set has the same behavior than before.
But, I'm pretty sure there is a bug with bitfields in "64 bits unit".

Probably not used until now.

Line:121, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/IntegerDefinition.java -> I suspect a bug here for values between 33..63.
The current behavior is the same than before.

-------------------------------------
author: Tessa Dickson
date: 2013-11-24 09:04:26.000000000

Patch Set 7: Code-Review+1

(3 comments)

small nits to fix, otherwise good. clear improvement. A fix for 33 to 63 bit integers should come as a follow up.

Line:196, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> comment "getInt" vs code getLong... ?

Line:206, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> comment vs code mismatch.

Line:121, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/IntegerDefinition.java -> oh god yes. this should be fixed in a separate patch.

-------------------------------------
author: Jordon Obrien
date: 2013-11-24 20:16:16.000000000

Patch Set 7:

(3 comments)

address Mathieu comments.

I added a runtime exception for an unsupported case.
I prefer an exception than chasing a silent bug.

Line:196, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> oups, copy paste. Nice catch.

Line:206, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> Done

Line:121, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/IntegerDefinition.java -> I agree, but I will add a exception until this is supported.
Now, it's a silent bug.

-------------------------------------
author: Brenden Conley
date: 2013-11-25 14:39:54.000000000

Patch Set 7: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/4124/ : ABORTED

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