DESCRIPTION

tmf: Integration of the pcap parser within TMF

Change-Id: I1f5cdac29ceaa8e513467965b889bf152d2f4edb
Signed-off-by: Itzel Singleton xxx@xxx.xxx


COMMENTS

author: Itzel Singleton
date: 2014-08-06 14:47:09.000000000

Uploaded patch set 15.

-------------------------------------
author: Brenden Conley
date: 2014-08-06 14:47:16.000000000

Patch Set 15:

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

-------------------------------------
author: Brenden Conley
date: 2014-08-06 15:30:22.000000000

Patch Set 15: Verified+1

Build Successful 

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

-------------------------------------
author: Luciana Barry
date: 2014-08-07 21:15:27.000000000

Patch Set 15: Code-Review-1

(21 comments)

More comments on pcap.ui may follow.

Line:90, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/PcapEventFactory.java -> Extract a constant

Line:91, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/PcapEventFactory.java -> The TmfEventType's toString() is not really user-friendly for the Properties view. You should create a PcapEventType with its own toString(). We haven't really been using context in there.

Line:49, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEvent.java -> Unnecessary, there is already Collections.EMPTY_LIST

Line:161, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEvent.java -> Looks like the extra trailing * is not shown by JDT's Javadoc parser, but nevertheless should it be there?

Line:170, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEvent.java -> *

Line:181, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEvent.java -> Is it possible for the packet to not be the top packet?

Line:189, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEvent.java -> Use Collections.EMPTY_LIST.

Line:194, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEvent.java -> move this line inside the loop then you only need to check for packet != null as a while condition and you can remove 197-199

Line:212, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEvent.java -> Replace plugins with packages, however it's not really necessary to explain Java here...

Line:415, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamListView.java -> Don't need to do this is previous condition is false

Line:419, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamListView.java -> Should use getViewReferences and getView(false). You do not need to open the view if it is closed?

Line:488, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamListView.java -> I don't think it's necessary to dispose any children of a view or widget. Everything gets disposed automatically when the view parent gets disposed. Unless there's something special with CTabFolder?

Line:40, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/editor/PcapEventsTable.java -> This column does not seem very useful for a single trace. We might have a Trace column in the future for experiments. I'm not sure that the trace name should be stored in the event reference.

Line:64, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/PcapTrace.java -> synchronized

Line:65, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/PcapTrace.java -> Just use fPcapFile in the method?

Line:108, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/PcapTrace.java -> synchronized

Line:228, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/PcapTrace.java -> seconds (or sec).

File Comment: lttng/org.eclipse.linuxtools.tmf.pcap.ui/icons/network.svg -> I get this in Windows when I press the Open Perspective button:

org.eclipse.swt.SWTException: Unsupported or unrecognized format

Line:21, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/signal/TmfNewPacketStreamSignal.java -> request > requests, but maybe selects

Line:26, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/signal/TmfNewPacketStreamSignal.java -> Would TmfPacketStreamSelectedSignal be more appropriate? "New" sounds related to creation.

Line:47, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/signal/TmfNewPacketStreamSignal.java -> fStream = stream; works in both cases? Mind corrupted by too much null annotations ;)

-------------------------------------
author: Luciana Barry
date: 2014-08-08 14:55:58.000000000

Patch Set 15:

(7 comments)

Line:72, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamListView.java -> I tried to make it fail using breakpoints. It seems OK because TmfTraceClosed and TmfTraceSelected are always sent from main thread. The worst I was able to achieve is that the updateUI() can end up refreshing for a newer trace that the one that was current when it was called.

Line:74, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamListView.java -> Not sure you want to commit hearsay in open source ;)

Line:346, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamListView.java -> I don't think this can be null

Line:390, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamListView.java -> I don't think this can be null

Line:25, lttng/org.eclipse.linuxtools.tmf.pcap.ui/plugin.properties -> Seeking 2nd opinion whether Networking is OK for us to use. Do we see it being used for other purpose by other (non-TMF) plug-ins?

Line:33, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/graph/NetworkGraphView.java -> Obviously, use something else in the final version. Should be a NLS string?

Line:45, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamDiagramView.java -> Use a NLS string

-------------------------------------
author: Itzel Singleton
date: 2014-08-08 20:18:41.000000000

Patch Set 15:

(10 comments)

Line:181, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEvent.java -> Yes it is possible. In fact, the packet is likely to be the most encapsulated one or the second most encapsulated packet (in case of unknown protocol).

Line:346, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamListView.java -> Yes, but it is still xxx@xxx.xxx so I still have to do a null check

Line:415, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamListView.java -> I still need to do this. The filter view and the XML are not synchronized until the user click save. So the filter in the Filter View can differ from those in the XML, and I might have to add it in one but not the other.

Line:419, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamListView.java -> If the user choose "Extract as Filter", chances are he wants to use the filter view afterward. Might as well open it for him.

Line:488, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamListView.java -> Done

Line:40, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/editor/PcapEventsTable.java -> ATM, opening many pcap traces is supported, so we should still keep that column in the meantime.

Line:65, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/PcapTrace.java -> Needed for NonNull annotation.

There is no guarantee that another thread won't nullify fPcapFile while this function is executed. Thus, we have to buffer it with a local reference that won't be nullified outside this function.

Line:228, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/PcapTrace.java -> s is the standard abbreviation for second.

File Comment: lttng/org.eclipse.linuxtools.tmf.pcap.ui/icons/network.svg -> Done

Line:47, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/signal/TmfNewPacketStreamSignal.java -> Yeah...

-------------------------------------
author: Luciana Barry
date: 2014-08-09 04:01:23.000000000

Patch Set 15:

(3 comments)

Line:415, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamListView.java -> True. The use case is you deleted it from the Filter view without saving, and now you want to add it again.

Line:40, lttng/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/editor/PcapEventsTable.java -> Do you mean many 'TMF' pcap traces open at the same time? That is true for all traces. But we can revisit this later.

Line:65, lttng/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/PcapTrace.java -> Everywhere the file is used (whether directly or through a reference like here) it should be within a synchronized block/method otherwise the file could be closed or its position modified while you're using it. Then you can null check it and use it directly, I believe.

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