import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
+import java.util.logging.Logger;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.common.core.log.TraceCompassLog;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
import org.eclipse.tracecompass.statesystem.core.backend.IStateHistoryBackend;
import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
private static final String PARENT = ".."; //$NON-NLS-1$
private static final String WILDCARD = "*"; //$NON-NLS-1$
+ private static final Logger LOGGER = TraceCompassLog.getLogger(StateSystem.class);
+
/* References to the inner structures */
private final AttributeTree attributeTree;
private final TransientState transState;
throw new StateSystemDisposedException();
}
+ LOGGER.info(() -> "[StateSystem:FullQueryStart] ssid=" + this.getSSID() + ", ts=" + t); //$NON-NLS-1$//$NON-NLS-2$
+
final int nbAttr = getNbAttributes();
List<@Nullable ITmfStateInterval> stateInfo = new ArrayList<>(nbAttr);
throw new IllegalStateException("Incoherent interval storage"); //$NON-NLS-1$
}
}
+ LOGGER.info(() -> "[StateSystem:FullQueryEnd]"); //$NON-NLS-1$
return stateInfo;
}
throw new StateSystemDisposedException();
}
+ LOGGER.info(() -> "[StateSystem:SingleQueryStart] ssid=" + this.getSSID() + ", ts=" + t + ", attribute=" + attributeQuark); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+
ITmfStateInterval ret = transState.getIntervalAt(t, attributeQuark);
if (ret == null) {
/*
*/
throw new IllegalStateException("Incoherent interval storage"); //$NON-NLS-1$
}
+ LOGGER.info(() -> "[StateSystem:SingleQueryEnd]"); //$NON-NLS-1$
return ret;
}
import java.io.IOException;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.FileChannel;
+import java.util.logging.Logger;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.tracecompass.common.core.log.TraceCompassLog;
import org.eclipse.tracecompass.internal.statesystem.core.Activator;
/**
* HistoryTree must contain 1 and only 1 HT_IO element.
*
* @author Alexandre Montplaisir
- *
*/
class HT_IO {
private static final int CACHE_MASK = CACHE_SIZE - 1;
private static final CacheElement NODE_CACHE[] = new CacheElement[CACHE_SIZE];
+ private static final Logger LOGGER = TraceCompassLog.getLogger(HT_IO.class);
+
/**
* Standard constructor
*
CacheElement cachedNode = NODE_CACHE[offset];
if (cachedNode != null && cachedNode.getKey() == this && cachedNode.getValue().getSequenceNumber() == seqNumber) {
+ LOGGER.finest(() -> "[HtIo:CacheHit] seqNum=" + seqNumber); //$NON-NLS-1$
return cachedNode.getValue();
}
try {
seekFCToNodePos(fFileChannelIn, seqNumber);
HTNode readNode = HTNode.readNode(fConfig, fFileChannelIn);
+ LOGGER.finest(() -> "[HtIo:CacheMiss] seqNum=" + seqNumber); //$NON-NLS-1$
/* Put the node in the cache. */
NODE_CACHE[offset] = new CacheElement(this, readNode);