Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [linuxtools-dev] Headless TMF Experiment ?

Hi,

Many thanks - I will try that ASAP.

Xavier


----- Mail original -----
De: "Francis Giraldeau" <francis.giraldeau@xxxxxxxxx>
À: "Linux Tools developer discussions" <linuxtools-dev@xxxxxxxxxxx>
Envoyé: Lundi 15 Juillet 2013 20:21:16
Objet: Re: [linuxtools-dev] Headless TMF Experiment ?

Hi,

TmfExperiment can be created manually, here is an example:

        public static TmfExperiment makeTmfExperiment(ITmfTrace[] traceSet) {
                return new TmfExperiment(ITmfEvent.class, "none", traceSet);
        }

        public static TmfExperiment makeTmfExperiment(File[] files)
throws TmfTraceException, IOException {
                CtfTmfTrace[] ctf = new CtfTmfTrace[files.length];
                for (int i = 0; i < files.length; i++) {
                        ctf[i] = new CtfTmfTrace();
                        ctf[i].initTrace(null,
files[i].getCanonicalPath(), ITmfEvent.class);
                }
                return makeTmfExperiment(ctf);
        }

Then, events can be processed by creating a TmfRequest:

            TmfExperiment myExperiment = makeTmfExperiment(tracePaths);
            TmfDataRequest request = new TmfDataRequest(ITmfEvent.class) {
                    @Override
                    public void handleData(final ITmfEvent event) {
                                // process event here
                            }
                    }
            };
            myExperiment.sendRequest(request);
            request.waitForCompletion();

Cheers,

Francis Giraldeau

2013/7/15 Xavier Raynaud <xavier.raynaud@xxxxxxxxx>:
> Hi,
>
> I've requests from some customers to have *more* than a RCP for trace
> viewer:
> They want to dump some trace analysis from command line.
>
> Is it possible to create a TmfExperiment in headless mode ?
> Has somebody tried to do something like that ?
>
> Xavier Raynaud
>
>
>
> _______________________________________________
> linuxtools-dev mailing list
> linuxtools-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/linuxtools-dev
>
_______________________________________________
linuxtools-dev mailing list
linuxtools-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/linuxtools-dev
This message contains information that may be privileged or confidential and is the property of the KALRAY SA. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.


Back to the top