DESCRIPTION

ctf: Add support for arrays or any type.

A null pointer exception occured for events that contained an array
of something else than "int". For example, an array of struct:

fields := struct {
  ...
  struct {
    string arg_name;
    string arg_value;
  } arguments[4];
};

With this fix, all arrays of CTF types are supported.
Sample output in the "Properties" view: http://i.imgur.com/31tqbgG.png

Change-Id: I3f2be314d1fd2bda8c95b208d018227477572fa8
Signed-off-by: Bradyn Guerra xxx@xxx.xxx


COMMENTS

author: Bradyn Guerra
date: 2013-12-02 06:07:54.000000000

Uploaded patch set 5.

-------------------------------------
author: Brenden Conley
date: 2013-12-02 06:08:00.000000000

Patch Set 5:

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

-------------------------------------
author: Bradyn Guerra
date: 2013-12-02 06:14:30.000000000

Patch Set 5:

I updated the patch with the changes that you suggested. I also added a few unit tests.

I didn't remove CTFIntegerArrayField yet, because it's still used by sequences. I will work on a different patch to support all CTF types in sequences and remove CTFIntegerArrayField in it.

-------------------------------------
author: Brenden Conley
date: 2013-12-02 06:47:02.000000000

Patch Set 5: Verified+1

Build Successful 

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

-------------------------------------
author: Ivy Mitchell
date: 2013-12-02 22:20:06.000000000

Patch Set 5: Verified+1 Code-Review+1 IP-Clean+1

-------------------------------------
author: Braxton Mccarthy
date: 2013-12-02 22:24:54.000000000

Patch Set 5:

(2 comments)

Thanks for the tests, it looks pretty good!

It doesn't apply cleanly on latest lttng-luna though, can you rebase it please (small comments at the same time).

I would have done it, but there's quite a few conflicts, and I'm not sure what the final result is supposed to be...

Line:384, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.java -> Use a CtfTmfEventField[] for parameter type. That way the cast in the getValue() below will always be safe.

Line:394, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.java -> Method could be marked 'synchronized' (to ensure only one caller gets to build the array). Minor issue, because it will work either way, but it'd make it look like we actually look out for these things ;)

I guess we'll have to fix IntegerArrayField too.

-------------------------------------
author: Braxton Mccarthy
date: 2013-12-02 22:25:08.000000000

Patch Set 5: Code-Review-1

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