Hi Genevive,
I have found the sollution. Actually, I have replaced the CtfEvent and
CtfIterator by ITmfEvent and ITmfContext. This allows me to read the both
the latest and old format. The sample code is attached below, in case if
some one comes across the same problem.

Best regards,
Shariyar

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>








































*private String fSyscall;    private CtfTmfTrace fTrace;    private
ITmfContext fCtxt;            /**     * Constructor to initialize the
trace     * @param filePath file Name     * @throws TmfTraceException An
exception during trace reading     */    public
CTFSystemCallIterator(String filePath) throws TmfTraceException {
fTrace = new CtfTmfTrace();        fTrace.initTrace(null, filePath,
CtfTmfEvent.class);        fCtxt=fTrace.seekEvent(0);
//fTraceIterator = fTrace.createIterator(); // don't use CtfIterator
}    /**     * Moves Iterator to the next event, and returns true if the
iterator     * can advance or false if the iterator cannot advance
**/    @Override    public boolean advance() {        boolean isAdvance =
true;        fSyscall = ""; //$NON-NLS-1$        ITmfEvent event;
do{        if ((event=fTrace.getNext(fCtxt))!=null){            fSyscall =
handleSysEntryEvent(event);//returns the sys call (entry) event
        }else            isAdvance=false;        } while
(fSyscall.isEmpty() && isAdvance==true);                        if
(!isAdvance)             close();                return isAdvance;    }*
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to