DESCRIPTION

Remove unused getCPU method.

This method seems unused and will not work with the way etw2ctf produce CPU information.
I assume this is old code and is not used anywhere else.

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


COMMENTS

author: Braxton Mccarthy
date: 2013-11-17 05:44:52.000000000

Patch Set 1: Code-Review-1

Makes sense, getCPU() doesn't sound CTF-agnostic. StreamInputPacketReader.getCPU() should probably also be removed in this case (does StreamInputPacketReader#currentCpu get populated at all with ETW traces?)

-------------------------------------
author: Brenden Conley
date: 2013-11-17 05:58:14.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2013-11-17 06:09:36.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/3982/ : FAILURE

-------------------------------------
author: Jordon Obrien
date: 2013-11-17 06:18:07.000000000

Patch Set 1:

Seems to have more dependency. Specific to lttng.

// gets the CPU the event was generated by. Slightly LTTng specific

-------------------------------------
author: Jordon Obrien
date: 2013-11-17 06:25:51.000000000

Patch Set 1:

With ETW2CTF we could produced the same cpuid than lttng.
Actually, we produce it in each event (context).
A stream/packet is not force to be on a single CPU.

-------------------------------------
author: Bradyn Guerra
date: 2013-11-20 00:31:01.000000000

Patch Set 1: Code-Review+1

-------------------------------------
author: Ivy Mitchell
date: 2013-11-20 20:29:54.000000000

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

This makes sense, I want this in, but it is not ready. It does not yet compile, let alone pass tests. Also, we would need to propose an alternative to getCPU for tmf to stay happy. great pertinent idea, needs 20% more love.

-------------------------------------
author: Jordon Obrien
date: 2013-11-20 20:42:54.000000000

Patch Set 1:

I realized after submitting that I do not compile at the tests on my setup. Thus, I missed the other cases where it's used.

I do not need this fix, it was a cleanup I saw. And I believe this cleanup should be done...

I may take a look, but I won't spend lot of time on it.

-------------------------------------
author: Ivy Mitchell
date: 2013-11-21 17:49:36.000000000

Patch Set 1:

Cool, It's a great idea, needs more work, thanks for highlighting it. :)

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-27 00:14:23.000000000

Patch Set 1:

I dug into this a bit, what seems to be the problem is that we don't save the packet context in the EventDefinition. We do save the *event* context, and make the *stream* context available, and expose that information in the CtfTmfEvent's, but no mention of the *packet* context. And from what I understand according to StreamInput.java, the "cpu_id" field present in LTTng traces is part of the packet context.

If we made the packet context available, then it'd be simple in the LTTng traces to just query that to get CPU number. And we could remove those LTTng-specific workarounds in the parser plugin.

Disclaimer: CTF newb here, please tell me if/where I'm wrong

-------------------------------------
author: Jordon Obrien
date: 2013-11-27 04:35:17.000000000

Patch Set 1:

The field in the context is "optional", not mandatory.

The traces produced by ETW2CTF don't produce this field.
I wonder the effects of not producing the field, and which kind of optimisation TMF made about it. TMF should try to stay general when possible. I won't expect (except for lttng) this is common to produce the CPUID.

Thus, I'm not against to keep this field. I was thinking this is only old code that need a cleanup.

-------------------------------------
author: Braxton Mccarthy
date: 2013-12-05 23:44:29.000000000

Abandoned

The method is actually used at the moment, to retrieve the CPU for LTTng traces. The issue is a bit deeper, I opened bug #423390 about it.

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