This is a common use case with experiments that have multiple nodes
Change-Id: I3a2bcd583473cb9bd9fa6f5a2d69eecb9e4fb291
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/71105
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
List<ITmfTreeViewerEntry> entryList = root.getChildren();
try {
List<ITmfTreeViewerEntry> entryList = root.getChildren();
try {
- List<ITmfStateInterval> memoryStates = ss.queryFullState(start);
+ long newStart = Math.max(start, ss.getStartTime());
+ long newEnd = Math.min(end, ss.getCurrentEndTime());
+ if (ss.getStartTime() > newEnd || ss.getCurrentEndTime() < start) {
+ return root;
+ }
+ List<ITmfStateInterval> memoryStates = ss.queryFullState(newStart);
List<Integer> threadQuarkList = ss.getSubAttributes(ITmfStateSystem.ROOT_ATTRIBUTE, false);
for (Integer threadQuark : threadQuarkList) {
List<Integer> threadQuarkList = ss.getSubAttributes(ITmfStateSystem.ROOT_ATTRIBUTE, false);
for (Integer threadQuark : threadQuarkList) {
ITmfStateSystem ss = module.getStateSystem();
if (ss == null) {
ITmfStateSystem ss = module.getStateSystem();
if (ss == null) {
- throw new IllegalStateException();
+ throw new IllegalStateException("No state system for the module " + module.toString()); //$NON-NLS-1$
}
double[] xvalues = getXAxis(start, end, nb);
if (xvalues.length == 0) {
return;
}
}
double[] xvalues = getXAxis(start, end, nb);
if (xvalues.length == 0) {
return;
}
+ long clampedEnd = Math.min(end, ss.getCurrentEndTime());
+ if (clampedEnd < ss.getStartTime()) {
+ return;
+ }
double x = xvalues[i];
long t = (long) x + getTimeOffset();
double x = xvalues[i];
long t = (long) x + getTimeOffset();
+ if( ss.getCurrentEndTime() < t || ss.getStartTime() > t) {
+ selectedThreadValues[i] = 0;
+ continue;
+ }
List<ITmfStateInterval> kernelState = ss.queryFullState(t);
/* The subattributes of the root are the different threads */
List<ITmfStateInterval> kernelState = ss.queryFullState(t);
/* The subattributes of the root are the different threads */
* The lowest value we are searching is at the end of the current
* selected zone
*/
* The lowest value we are searching is at the end of the current
* selected zone
*/
- List<ITmfStateInterval> kernelState = ss.queryFullState(end);
+ List<ITmfStateInterval> kernelState = ss.queryFullState(clampedEnd);
List<Integer> threadQuarkList = ss.getSubAttributes(-1, false);
/* We add the lowest value of each thread */
for (Integer threadQuark : threadQuarkList) {
List<Integer> threadQuarkList = ss.getSubAttributes(-1, false);
/* We add the lowest value of each thread */
for (Integer threadQuark : threadQuarkList) {