* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
- * Contributors: Alvaro Sanchez-Leon - Initial implementation
+ * Contributors:
+ * Alvaro Sanchez-Leon - Initial implementation
+ * Michel Dagenais (michel.dagenais@polymtl.ca) - Reference C implementation, used with permission
*******************************************************************************/
package org.eclipse.linuxtools.lttng.ui.views.controlflow.evProcessor;
import java.util.Vector;
-import org.eclipse.linuxtools.lttng.state.StateStrings.ProcessStatus;
-import org.eclipse.linuxtools.lttng.state.evProcessor.ILttngEventProcessor;
-import org.eclipse.linuxtools.lttng.state.model.LttngProcessState;
-import org.eclipse.linuxtools.lttng.state.model.LttngTraceState;
+import org.eclipse.linuxtools.lttng.core.state.StateStrings.ProcessStatus;
+import org.eclipse.linuxtools.lttng.core.state.evProcessor.ILttngEventProcessor;
+import org.eclipse.linuxtools.lttng.core.state.model.LttngProcessState;
+import org.eclipse.linuxtools.lttng.core.state.model.LttngTraceState;
+import org.eclipse.linuxtools.lttng.ui.TraceDebug;
import org.eclipse.linuxtools.lttng.ui.model.trange.TimeRangeComponent;
import org.eclipse.linuxtools.lttng.ui.model.trange.TimeRangeEvent;
import org.eclipse.linuxtools.lttng.ui.model.trange.TimeRangeEvent.Type;
// TimeRangeEventProcess localProcess = new TimeRangeEventProcess(id, name, startTime, stopTime, groupName, className)
TimeRangeEventProcess localProcess = new TimeRangeEventProcess(
procContainer.getUniqueId(), stateProcess.getName(),
- traceStartTime, traceEndTime, "", stateProcess.getType()
+ traceStartTime, traceEndTime, "", stateProcess.getType() //$NON-NLS-1$
.getInName(), stateProcess.getCpu(), stateProcess
.getInsertion_time());
localProcess.setTraceID(traceId);
localProcess.setProcessType(stateProcess.getType().getInName());
procContainer.addItem(localProcess);
+
+ if (TraceDebug.isCFV()) {
+ TraceDebug.traceCFV("addLocalProcess():" + localProcess); //$NON-NLS-1$
+ }
+
return localProcess;
}
* @param stateMode
* @return
*/
+ @SuppressWarnings("deprecation")
protected boolean makeDraw(LttngTraceState traceSt, long startTime,
long endTime, TimeRangeEventProcess localProcess,
ParamsUpdater params, String stateMode) {
+ if (TraceDebug.isCFV()) {
+ TraceDebug.traceCFV("makeDraw():[" + localProcess + //$NON-NLS-1$
+ ",candidate=[stime=" + startTime + //$NON-NLS-1$
+ ",etime=" + endTime + //$NON-NLS-1$
+ ",state=" + stateMode + "]]"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
// Determine start and end times to establish duration
Long stime = startTime;
Long etime = endTime;
// Display a "more information" indication by allowing non visible event
// as long as its previous event is visible.
boolean visible = true;
- if (pixels < 1) {
+ if (pixels < 1.0) {
boolean prevEventVisibility = true;
// Get the visibility indication on previous event for
// this process
// return i.e. event discarded to free up memory
Long eventSpan = stime - prevEvent.getStartTime();
if (prevEventVisibility == false
- && ((double) eventSpan * k) < 2) {
+ && ((double) eventSpan * k) < 2.0) {
// discard the item
params.incrementEventsDiscarded(ParamsUpdater.NOT_VISIBLE);