1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 * Bernd Hufmann - Bug fixes
12 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.lttng
.ui
.views
.common
;
15 import java
.util
.Arrays
;
17 import org
.eclipse
.linuxtools
.internal
.lttng
.core
.LttngConstants
;
18 import org
.eclipse
.linuxtools
.internal
.lttng
.core
.control
.LttngCoreProviderFactory
;
19 import org
.eclipse
.linuxtools
.internal
.lttng
.core
.control
.LttngSyntheticEventProvider
;
20 import org
.eclipse
.linuxtools
.internal
.lttng
.core
.event
.LttngSyntheticEvent
;
21 import org
.eclipse
.linuxtools
.internal
.lttng
.core
.event
.LttngTimestamp
;
22 import org
.eclipse
.linuxtools
.internal
.lttng
.core
.request
.ILttngSyntEventRequest
;
23 import org
.eclipse
.linuxtools
.internal
.lttng
.core
.request
.IRequestStatusListener
;
24 import org
.eclipse
.linuxtools
.internal
.lttng
.core
.request
.LttngSyntEventRequest
;
25 import org
.eclipse
.linuxtools
.internal
.lttng
.core
.request
.RequestCompletedSignal
;
26 import org
.eclipse
.linuxtools
.internal
.lttng
.core
.request
.RequestStartedSignal
;
27 import org
.eclipse
.linuxtools
.internal
.lttng
.core
.state
.evProcessor
.ITransEventProcessor
;
28 import org
.eclipse
.linuxtools
.lttng
.ui
.TraceDebug
;
29 import org
.eclipse
.linuxtools
.lttng
.ui
.model
.trange
.ItemContainer
;
30 import org
.eclipse
.linuxtools
.tmf
.core
.event
.ITmfTimestamp
;
31 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfEvent
;
32 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfTimeRange
;
33 import org
.eclipse
.linuxtools
.tmf
.core
.experiment
.TmfExperiment
;
34 import org
.eclipse
.linuxtools
.tmf
.core
.request
.ITmfDataRequest
.ExecutionType
;
35 import org
.eclipse
.linuxtools
.tmf
.core
.request
.TmfDataRequest
;
36 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfExperimentDisposedSignal
;
37 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfRangeSynchSignal
;
38 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfSignalHandler
;
39 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfSignalManager
;
40 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfTimeSynchSignal
;
41 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.timeAnalysis
.ITimeAnalysisViewer
;
42 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.timeAnalysis
.TmfTimeScaleSelectionEvent
;
43 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.timeAnalysis
.TmfTimeSelectionEvent
;
44 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.timeAnalysis
.model
.ITmfTimeAnalysisEntry
;
45 import org
.eclipse
.linuxtools
.tmf
.ui
.views
.TmfView
;
46 import org
.eclipse
.swt
.widgets
.Display
;
50 * Abstract class used as a base for views handling specific time range data
54 * The class handles a single element queue of data requests, i.e. request can
55 * be triggered from different sources e.g. opening a file as well as a new
56 * selected time window
62 public abstract class AbsTimeUpdateView
extends TmfView
implements IRequestStatusListener
{
64 // ========================================================================
66 // ========================================================================
68 // private static final long INITIAL_WINDOW_OFFSET = (1L * 1 * 1000 * 1000); // .001sec
69 // private static final long INITIAL_WINDOW_OFFSET = (1L * 10 * 1000 * 1000); // .01sec
70 private static final long INITIAL_WINDOW_OFFSET
= (1L * 100 * 1000 * 1000); // .1sec
71 // private static final long INITIAL_WINDOW_OFFSET = (1L * 1000 * 1000 * 1000); // 1sec
74 * Number of events before a GUI refresh
76 protected static final Long INPUT_CHANGED_REFRESH
= 75000L;
77 private static final long DEFAULT_OFFSET
= 0;
79 protected boolean synch
= true; // time synchronization, used to be an option
80 protected ITimeAnalysisViewer tsfviewer
= null;
82 private LttngSyntEventRequest fCurrentRequest
= null;
84 protected LttngSyntheticEventProvider fProvider
= LttngCoreProviderFactory
.getEventProvider(getProviderId());
86 // ========================================================================
88 // ========================================================================
89 public AbsTimeUpdateView(String viewID
) {
91 // freqState = UiCommonFactory.getQueue(this);
94 // ========================================================================
96 // ========================================================================
99 * Returns the number of events after which the relevant display will
104 protected Long
getInputChangedRefresh() {
105 return INPUT_CHANGED_REFRESH
;
109 * Cancel the ongoing request if another experiment is being selected
110 * @param experimentDisposedSignal
113 public void experimentDisposed(TmfExperimentDisposedSignal
<?
extends TmfEvent
> experimentDisposedSignal
) {
114 if (experimentDisposedSignal
.getExperiment() != TmfExperiment
.getCurrentExperiment()) {
117 fProvider
.conditionallyCancelRequests();
123 * @seeorg.eclipse.linuxtools.lttng.state.IStateDataRequestListener#
124 * processingStarted(org.eclipse.linuxtools.lttng.state.StateDataRequest)
128 public synchronized void processingStarted(RequestStartedSignal signal
) {
129 LttngSyntEventRequest request
= signal
.getRequest();
130 if (request
!= null) {
131 // update queue with the id of the current request.
132 // freqState.requestStarted(request);
134 // if there was no new request then this one is still on
135 // prepare for the reception of new data
138 // no new time range for zoom orders
139 TmfTimeRange trange
= null;
140 // Time Range will be used to filter out events which are
141 // not visible in one pixel
142 trange
= request
.getRange();
144 // indicate if the data model needs to be cleared e.g. a new
145 // experiment is being selected
146 boolean clearData
= request
.isclearDataInd();
147 // Indicate if current data needs to be cleared and if so
148 // specify the new experiment time range that applies
149 modelUpdatePrep(trange
, clearData
);
156 * @seeorg.eclipse.linuxtools.lttng.state.IStateDataRequestListener#
157 * processingCompleted(org.eclipse.linuxtools.lttng.state.StateDataRequest)
161 public void processingCompleted(RequestCompletedSignal signal
) {
162 ILttngSyntEventRequest request
= signal
.getRequest();
164 if (request
== null) {
168 // Update wait cursor
171 // No data refresh actions for cancelled requests.
172 if (request
.isCancelled() || request
.isFailed()) {
173 if (TraceDebug
.isDEBUG()) {
174 TmfTimeRange trange
= request
.getRange();
175 if (request
.isCancelled()) {
176 TraceDebug
.debug("Request cancelled " //$NON-NLS-1$
177 + trange
.getStartTime() + "-" + trange
.getEndTime() //$NON-NLS-1$
178 + " Handled Events: " + request
.getSynEventCount() //$NON-NLS-1$
179 + " " + request
.toString(), 15); //$NON-NLS-1$
180 } else if (request
.isFailed()) {
181 TraceDebug
.debug("Request Failed " + trange
.getStartTime() //$NON-NLS-1$
182 + "-" + trange
.getEndTime() + " Handled Events: " //$NON-NLS-1$ //$NON-NLS-2$
183 + request
.getSynEventCount() + " " //$NON-NLS-1$
184 + request
.toString());
190 modelInputChanged(request
, true);
195 * Registers as listener of time selection from other views
199 public void synchToTime(TmfTimeSynchSignal signal
) {
203 Object source
= signal
.getSource();
204 if (source
!= null && source
!= this) {
206 if ((tsfviewer
!= null) && (!tsfviewer
.getControl().isDisposed())) {
208 // Check for GUI thread
209 if (Display
.getCurrent() != null) {
210 // GUI thread - execute update right away.
212 // Internal value is expected in nano seconds.
213 long selectedTime
= signal
.getCurrentTime().getValue();
214 if (tsfviewer
!= null) {
215 tsfviewer
.setSelectedTime(selectedTime
, true, source
);
217 ParamsUpdater paramUpdater
= getParamsUpdater();
218 Long savedSelTime
= paramUpdater
.getSelectedTime();
219 if ((savedSelTime
== null) || (savedSelTime
!= selectedTime
)) {
220 // Update the parameter updater to save the selected time
221 paramUpdater
.setSelectedTime(selectedTime
);
225 // Perform the updates on the UI thread
227 // We need to clone the timestamp in the signal so that it won't be overwritten duo to multipe thread access
228 final TmfTimeSynchSignal savedSignal
= new TmfTimeSynchSignal(signal
.getSource(), signal
.getCurrentTime().clone());
229 tsfviewer
.getControl().getDisplay().asyncExec(new Runnable() {
232 if ((tsfviewer
!= null) && (!tsfviewer
.getControl().isDisposed())) {
233 synchToTime(savedSignal
);
244 * Process the reception of time window adjustment in this view if the
245 * source of the update is not this view.
248 * @param clearingData
250 public void synchToTimeRange(TmfRangeSynchSignal signal
, boolean clearingData
) {
254 Object source
= signal
.getSource();
255 if (source
!= null && source
!= this) {
256 // Internal value is expected in nano seconds.
257 TmfTimeRange trange
= signal
.getCurrentRange();
258 TmfExperiment
<?
> experiment
= TmfExperiment
.getCurrentExperiment();
259 if (experiment
== null) {
260 TraceDebug
.debug("Current selected experiment is null"); //$NON-NLS-1$
264 // Clearing of process data is configurable
265 eventRequest(trange
, experiment
.getTimeRange(), clearingData
, ExecutionType
.FOREGROUND
);
271 * Trigger time synchronisation to other views this method shall be called
272 * when a check has been performed to note that an actual change of time has
273 * been performed vs a pure re-selection of the same time
278 protected void synchTimeNotification(long time
, Object source
) {
279 // if synchronisation selected
281 // Notify other views
282 TmfSignalManager
.dispatchSignal(new TmfTimeSynchSignal(source
, new LttngTimestamp(time
)));
287 * Common implementation of ITmfTimeSelectionListener, not used by all the
288 * views extending this abstract class
292 protected void tsfTmProcessSelEvent(TmfTimeSelectionEvent event
) {
293 Object source
= event
.getSource();
294 if (source
== null) {
298 ParamsUpdater paramUpdater
= getParamsUpdater();
299 Long savedSelTime
= paramUpdater
.getSelectedTime();
301 long selTimens
= event
.getSelectedTime();
303 // make sure the new selected time is different than saved before
305 if (savedSelTime
== null || savedSelTime
!= selTimens
) {
306 // Notify listener views.
307 synchTimeNotification(selTimens
, source
);
309 // Update the parameter updater to save the selected time
310 paramUpdater
.setSelectedTime(selTimens
);
312 if (TraceDebug
.isDEBUG()) {
313 TraceDebug
.debug("Selected Time: " + new LttngTimestamp(selTimens
) + "\n\t\t" + getName()); //$NON-NLS-1$ //$NON-NLS-2$
319 * Common implementation of ITmfTimeScaleSelectionListener, not used by all
320 * the views extending this abstract class
324 protected void tsfTmProcessTimeScaleEvent(TmfTimeScaleSelectionEvent event
) {
325 // source needed to keep track of source values
326 Object source
= event
.getSource();
328 boolean newParams
= false;
329 TmfTimeRange trange
= null;
330 Long selectedTime
= null;
332 // update all information and get relevant data
333 synchronized (this) {
334 if (source
!= null) {
335 // Update the parameter updater before carrying out a read request
336 ParamsUpdater paramUpdater
= getParamsUpdater();
337 newParams
= paramUpdater
.processTimeScaleEvent(event
);
340 // Read the updated time window
341 trange
= paramUpdater
.getTrange();
342 if (trange
!= null) {
343 selectedTime
= paramUpdater
.getSelectedTime();
349 // Check for selectedTime is sufficient since it is only set if
350 // newParams is true and trange is not null
351 if (selectedTime
!= null) {
352 // Notify listener views. to perform data requests
353 // upon this notification
355 // Note that this has to be done outside the synchronized statement
356 // because otherwise we could end-up in a deadlock if a ongoing
357 // request needs to be canceled.
358 synchTimeRangeNotification(trange
, selectedTime
, source
);
363 * Inform registered listeners about the new time range
366 * @param selectedTime
369 protected void synchTimeRangeNotification(TmfTimeRange trange
, Long selectedTime
, Object source
) {
370 // if synchronisation selected
372 // Notify other views
373 TmfSignalManager
.dispatchSignal(new TmfRangeSynchSignal(source
, trange
, new LttngTimestamp(selectedTime
)));
378 * @param zoomedTRange
379 * @param experimentTRange
380 * @param clearingData
383 public void eventRequest(TmfTimeRange zoomedTRange
, TmfTimeRange experimentTRange
, boolean clearingData
, ExecutionType execType
) {
385 // timeRange is the Experiment time range
386 boolean sent
= processDataRequest(zoomedTRange
, experimentTRange
, DEFAULT_OFFSET
, TmfDataRequest
.ALL_DATA
, clearingData
, execType
);
397 * @param clearingData
400 public void eventRequest(long offset
, TmfTimeRange range
, boolean clearingData
, ExecutionType execType
) {
402 // timeRange is the Experiment time range
403 boolean sent
= processDataRequest(range
, null, offset
, TmfDataRequest
.ALL_DATA
, clearingData
, execType
);
411 // * @param zoomedTRange
412 // * @param experimentTRange
415 // public void dataRequest(TmfTimeRange zoomedTRange,
416 // TmfTimeRange experimentTRange, boolean clearingData) {
418 // // timeRange is the Experiment time range
419 // boolean sent = processDataRequest(zoomedTRange, experimentTRange, clearingData);
427 * send data request directly e.g. doesn't use a queue
429 * @param requestTrange
431 * @param experimentTRange
436 private boolean processDataRequest(TmfTimeRange requestTrange
,
437 TmfTimeRange experimentTRange
, long offset
, int nbRequested
, boolean clearingData
, ExecutionType execType
) {
439 if (requestTrange
== null) {
440 TraceDebug
.debug("Invalid input"); //$NON-NLS-1$
444 // Cancel the currently executing request before starting a new one
445 fProvider
.conditionallyCancelRequests();
446 fCurrentRequest
= new LttngSyntEventRequest(
447 requestTrange
, offset
, nbRequested
,
448 LttngConstants
.DEFAULT_BLOCK_SIZE
, this, experimentTRange
, getEventProcessor(),
449 TmfExperiment
.getCurrentExperiment().getName(), execType
) {
451 Long fCount
= getSynEventCount();
452 ITransEventProcessor processor
= getProcessor();
453 ITmfTimestamp frunningTimeStamp
;
459 * org.eclipse.linuxtools.lttng.request.LttngSyntEventRequest#handleData
462 //// int handleDataCount = 0;
463 //// int handleDataValidCount = 0;
465 // public void handleData() {
466 // LttngSyntheticEvent[] result = getData();
468 // TmfEvent evt = (result.length > 0) ? result[0] : null;
469 //// handleDataCount++;
472 public void handleData(LttngSyntheticEvent event
) {
473 super.handleData(event
);
475 // handleDataValidCount++;
476 LttngSyntheticEvent synEvent
= (LttngSyntheticEvent
) event
;
478 switch (synEvent
.getSynType()) {
481 handleRequestStarted();
486 processor
.process(event
, synEvent
.getTraceModel());
488 if ((fCount
!= 0) && (fCount
% getInputChangedRefresh() == 0)) {
489 // send partial update
490 modelInputChanged(this, false);
492 if (TraceDebug
.isDEBUG()) {
493 frunningTimeStamp
= event
.getTimestamp();
494 TraceDebug
.debug("handled: " + fCount
+ " sequence: " + synEvent
.getSynType()); //$NON-NLS-1$ //$NON-NLS-2$
503 processor
.process(event
, synEvent
.getTraceModel());
514 public void handleRequestStarted() {
520 // if (TraceDebug.isDEBUG()) {
521 // TraceDebug.debug("AbsTimeUpdateView: Received=" + handleDataCount + ", Valid=" + handleDataCount + ", fCount=" + fCount);
527 public void handleCompleted() {
528 super.handleCompleted();
530 // Data is not complete and should be handled as such
531 if (isFailed() || isCancelled()) {
532 modelIncomplete(this);
535 if (TraceDebug
.isDEBUG()) {
536 if (frunningTimeStamp
!= null) {
537 TraceDebug
.debug("Last event time stamp: " + frunningTimeStamp
.getValue()); //$NON-NLS-1$
543 // send the request to TMF
544 fCurrentRequest
.startRequestInd(fProvider
);
545 fCurrentRequest
.setclearDataInd(clearingData
);
550 * Returns an initial smaller window to allow the user to select the area of
553 * @param experimentTRange
556 protected TmfTimeRange
getInitTRange(TmfTimeRange experimentTRange
) {
557 ITmfTimestamp expStartTime
= experimentTRange
.getStartTime();
558 ITmfTimestamp expEndTime
= experimentTRange
.getEndTime();
559 ITmfTimestamp initialEndOfWindow
= new LttngTimestamp(expStartTime
561 + INITIAL_WINDOW_OFFSET
);
562 if (initialEndOfWindow
.compareTo(expEndTime
, false) < 0) {
563 return new TmfTimeRange(expStartTime
, initialEndOfWindow
);
566 // The original size of the experiment is smaller than proposed adjusted
568 return experimentTRange
;
572 * Request the Time Analysis widget to enable or disable the wait cursor
573 * e.g. data request in progress or data request completed
577 protected void waitCursor(final boolean waitInd
) {
578 if ((tsfviewer
!= null) && (!tsfviewer
.getControl().isDisposed())) {
579 Display display
= tsfviewer
.getControl().getDisplay();
581 // Perform the updates on the UI thread
582 display
.asyncExec(new Runnable() {
585 if ((tsfviewer
!= null) && (!tsfviewer
.getControl().isDisposed())) {
586 tsfviewer
.waitCursor(waitInd
);
594 * View preparation to override the current local information
597 * - new total time range e.g. Experiment level
598 * @param clearAllData
600 protected void modelUpdatePrep(TmfTimeRange timeRange
, boolean clearAllData
) {
601 ItemContainer
<?
> itemContainer
= getItemContainer();
603 // start fresh e.g. new experiment selected
604 itemContainer
.clearItems();
606 // clear children but keep processes
607 itemContainer
.clearChildren();
610 // Obtain the current resource array
611 ITmfTimeAnalysisEntry
[] itemArr
= itemContainer
.readItems();
613 // clean up data and boundaries
614 displayModel(itemArr
, -1, -1, false, -1, -1, null);
616 ParamsUpdater updater
= getParamsUpdater();
617 if (updater
!= null) {
619 updater
.setEventsDiscarded(0);
621 // Update new visible time range if available
622 if (timeRange
!= null) {
623 updater
.update(timeRange
.getStartTime().getValue(), timeRange
.getEndTime().getValue());
629 * Initialize the model and view before reloading items
631 * @param boundaryRange
632 * @param visibleRange
635 protected void modelUpdateInit(TmfTimeRange boundaryRange
, TmfTimeRange visibleRange
, Object source
) {
636 // Update the view boundaries
637 if (boundaryRange
!= null) {
638 ItemContainer
<?
> itemContainer
= getItemContainer();
639 if (itemContainer
!= null) {
640 itemContainer
.clearItems();
641 // Obtain the current process array
642 ITmfTimeAnalysisEntry
[] itemArr
= itemContainer
.readItems();
644 long startTime
= boundaryRange
.getStartTime().getValue();
645 long endTime
= boundaryRange
.getEndTime().getValue();
647 // Update the view part
648 displayModel(itemArr
, startTime
, endTime
, true, visibleRange
.getStartTime().getValue(), visibleRange
649 .getEndTime().getValue(), source
);
653 // update the view filtering parameters
654 if (visibleRange
!= null) {
655 ParamsUpdater updater
= getParamsUpdater();
656 if (updater
!= null) {
658 updater
.setEventsDiscarded(0);
659 // Update new visible time range if available
660 updater
.update(visibleRange
.getStartTime().getValue(), visibleRange
.getEndTime().getValue());
666 * Actions taken by the view to refresh its widget(s) with the updated data
671 * true: yes, false: partial update
673 @SuppressWarnings("deprecation")
674 protected void modelInputChanged(ILttngSyntEventRequest request
, boolean complete
) {
675 long experimentStartTime
= -1;
676 long experimentEndTime
= -1;
677 TmfTimeRange experimentTimeRange
= request
.getExperimentTimeRange();
678 if (experimentTimeRange
!= null) {
679 experimentStartTime
= experimentTimeRange
.getStartTime().getValue();
680 experimentEndTime
= experimentTimeRange
.getEndTime().getValue();
683 // Obtain the current resource list
684 ITmfTimeAnalysisEntry
[] itemArr
= getItemContainer().readItems();
686 if (itemArr
!= null) {
687 // Sort the array by pid
688 Arrays
.sort(itemArr
);
690 // Update the view part
691 displayModel(itemArr
, experimentStartTime
, experimentEndTime
, false, request
.getRange().getStartTime()
692 .getValue(), request
.getRange().getEndTime().getValue(), request
.getSource());
696 // reselect to original time
697 ParamsUpdater paramUpdater
= getParamsUpdater();
698 if ((paramUpdater
!= null) && (tsfviewer
!= null) && (!tsfviewer
.getControl().isDisposed())) {
699 final Long selTime
= paramUpdater
.getSelectedTime();
700 if (selTime
!= null) {
701 TraceDebug
.debug("View: " + getName() + "\n\t\tRestoring the selected time to: " + selTime
); //$NON-NLS-1$ //$NON-NLS-2$
702 Display display
= tsfviewer
.getControl().getDisplay();
703 display
.asyncExec(new Runnable() {
706 if ((tsfviewer
!= null) && (!tsfviewer
.getControl().isDisposed())) {
707 tsfviewer
.setSelectedTime(selTime
, false, this);
713 // System.out.println(System.currentTimeMillis() + ": AbsTimeUpdate (" + getName() + ") completed");
715 if (TraceDebug
.isDEBUG()) {
717 Long count
= request
.getSynEventCount();
718 for (int pos
= 0; pos
< itemArr
.length
; pos
++) {
719 eventCount
+= itemArr
[pos
].getTraceEvents().size();
722 int discarded
= paramUpdater
.getEventsDiscarded();
723 int discardedOutofOrder
= paramUpdater
.getEventsDiscardedWrongOrder();
724 int discardedOutofViewRange
= paramUpdater
.getEventsDiscardedOutOfViewRange();
725 int dicardedNotVisible
= paramUpdater
.getEventsDiscardedNotVisible();
727 TmfTimeRange range
= request
.getRange();
728 StringBuilder sb
= new StringBuilder("View: " + getName() + ", Events handled: " + count
//$NON-NLS-1$ //$NON-NLS-2$
729 + ", Events loaded in view: " + eventCount
+ ", Number of events discarded: " + discarded
//$NON-NLS-1$ //$NON-NLS-2$
730 + "\n\tNumber of events discarded with start time earlier than next good time: " //$NON-NLS-1$
731 + discardedOutofOrder
+ "\n\tDiscarded Not visible: " + dicardedNotVisible
//$NON-NLS-1$
732 + "\n\tDiscarded out of view Range: " + discardedOutofViewRange
); //$NON-NLS-1$
734 sb
.append("\n\t\tRequested Time Range: " + range
.getStartTime() + "-" + range
.getEndTime()); //$NON-NLS-1$ //$NON-NLS-2$
735 sb
.append("\n\t\tExperiment Time Range: " + experimentStartTime
+ "-" + experimentEndTime
); //$NON-NLS-1$ //$NON-NLS-2$
736 TraceDebug
.debug(sb
.toString());
744 // * Obtains the remainder fraction on unit Seconds of the entered value in
745 // * nanoseconds. e.g. input: 1241207054171080214 ns The number of seconds
747 // * be obtain by removing the last 9 digits: 1241207054 the fractional
748 // * portion of seconds, expressed in ns is: 171080214
753 // protected String formatNs(long v) {
754 // StringBuffer str = new StringBuffer();
755 // boolean neg = v < 0;
761 // String strVal = String.valueOf(v);
762 // if (v < 1000000000) {
766 // // Extract the last nine digits (e.g. fraction of a S expressed in ns
767 // return strVal.substring(strVal.length() - 9);
771 * The request was stopped, the data is incomplete
775 protected abstract void modelIncomplete(ILttngSyntEventRequest request
);
778 * Returns the Event processor instance related to a specific view
782 protected abstract ITransEventProcessor
getEventProcessor();
785 * To be overridden by some sub-classes although may not be needed in some
786 * e.g. statistics view
789 * @param startBoundTime
790 * @param endBoundTime
791 * @param updateTimeBounds
792 * - Time bounds updated needed e.g. if a new Experiment or trace
794 * @param startVisibleWindow
795 * @param endVisibleWindow
798 protected abstract void displayModel(final ITmfTimeAnalysisEntry
[] items
, final long startBoundTime
,
799 final long endBoundTime
, final boolean updateTimeBounds
, final long startVisibleWindow
,
800 final long endVisibleWindow
, final Object source
);
803 * To be overridden by some sub-classes although may not be needed in some
804 * e.g. statistics view
808 protected abstract ParamsUpdater
getParamsUpdater();
811 * Returns the model's item container
815 protected abstract ItemContainer
<?
> getItemContainer();
818 * Returns LTTng Synthetic Provider ID used for current view
822 protected abstract int getProviderId();