/*******************************************************************************
- * Copyright (c) 2013 Ericsson
+ * Copyright (c) 2013, 2014 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*
* Contributors:
* Alexandre Montplaisir - Initial API and implementation
+ * Patrick Tasse - Add support for thread id
*******************************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ust.core.trace.callstack;
import java.util.Set;
import org.eclipse.linuxtools.tmf.core.callstack.CallStackStateProvider;
-import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfEvent;
/**
* Callstack provider for LTTng-UST traces.
* Version number of this state provider. Please bump this if you modify
* the contents of the generated state history in some way.
*/
- private static final int VERSION = 1;
+ private static final int VERSION = 2;
// ------------------------------------------------------------------------
// Constructor
return new String(procName + '-' + vtid.toString());
}
+
+ @Override
+ protected Long getThreadId(ITmfEvent event) {
+ ITmfEventField content = ((CtfTmfEvent) event).getContent();
+ return (Long) content.getField(CONTEXT_VTID).getValue();
+ }
}