DESCRIPTION

ctf: Cleanup StructDeclaration

No need to keep separate lists for the fields and values of structs.
A LinkedHashMap preserves the insertion order, and Iterable defines
a specific iteration order.

No apparent performance impact, both versions hover around 975-980 ns/ev
on my machine.

Change-Id: I487b2c756d5827a7489a2ef65e550fb3d018cb72
Signed-off-by: Braxton Mccarthy xxx@xxx.xxx


COMMENTS

author: Braxton Mccarthy
date: 2014-06-25 23:08:55.000000000

Uploaded patch set 1.

-------------------------------------
author: Braxton Mccarthy
date: 2014-06-25 23:21:16.000000000

Patch Set 1:

(3 comments)

self-comments

Line:72, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/StructDefinition.java -> No idea why I have to put 3.1 here, it should be 3.0... but somehow the API tool always complains unless I put it this way (even though it removes the class's "API was broken" error...)

Line:175, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/StructDeclaration.java -> I actually found a use case for Iterator!

Line:589, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java -> Here's the fun part.

What is actually happening here? If you find an integer with a different byte order, you add a *new* field to the struct for this reversed integer? In addition to the old one? (since one does not simply remove struct fields)

Not only is "ss.getFields().put(...)" head-to-wall-banging-ly bad, but with all our test traces (and the CTF testsuite etc.) I've never hit this combination of two checks. Which is why I removed the whole thing, but maybe there's a reason that my feeble mind cannot comprehend...

-------------------------------------
author: Brenden Conley
date: 2014-06-26 00:46:11.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2014-06-26 01:38:25.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Ivy Mitchell
date: 2014-06-26 17:23:12.000000000

Patch Set 1: Code-Review-1

(1 comment)

This is definitily a good thing. I would tag it CTF cleanup. It needs IMO a small thing: tests to prove that there is a bug or not. This changes the behaviour of byteordered ints.

Line:589, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java -> this needs actual traces to test it.

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