- } else if (resourcesEntry.getType().equals(Type.IRQ)) {
- List<ITmfStateInterval> irqIntervals = StateSystemUtils.queryHistoryRange(ssq, quark, realStart, realEnd - 1, resolution, monitor);
- eventList = new ArrayList<>(irqIntervals.size());
- long lastEndTime = -1;
- boolean lastIsNull = true;
- for (ITmfStateInterval irqInterval : irqIntervals) {
- if (monitor.isCanceled()) {
- return null;
- }
- long time = irqInterval.getStartTime();
- long duration = irqInterval.getEndTime() - time + 1;
- if (!irqInterval.getStateValue().isNull()) {
- int cpu = irqInterval.getStateValue().unboxInt();
- eventList.add(new TimeEvent(entry, time, duration, cpu));
- lastIsNull = false;
- } else {
- if (lastEndTime == -1) {
- // add null event if it intersects the start time
- eventList.add(new NullTimeEvent(entry, time, duration));
- } else {
- if (lastEndTime != time && lastIsNull) {
- /* This is a special case where we want to show IRQ_ACTIVE state but we don't know the CPU (it is between two null samples) */
- eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime, -1));
- }
- if (time + duration >= endTime) {
- // add null event if it intersects the end time
- eventList.add(new NullTimeEvent(entry, time, duration));
- }
- }
- lastIsNull = true;
- }
- lastEndTime = time + duration;
+ ITmfStateInterval statusInterval = fullState.get(statusQuark);
+ int status = statusInterval.getStateValue().unboxInt();
+ long time = statusInterval.getStartTime();
+ long duration = statusInterval.getEndTime() - time + 1;
+ if (time == lastStartTime) {
+ continue;