import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.Attributes;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
* the state system
*
* @return the current thread node quark
- * @throws AttributeNotFoundException
- * current cpu node not found
*/
- public static int getCurrentThreadNode(Integer cpuNumber, ITmfStateSystemBuilder ss) throws AttributeNotFoundException {
+ public static int getCurrentThreadNode(Integer cpuNumber, ITmfStateSystemBuilder ss) {
/*
* Shortcut for the "current thread" attribute node. It requires
* querying the current CPU's current thread.
* The current thread node
* @param ssb
* the state system
- * @throws AttributeNotFoundException
- * an attribute does not exists yet
* @throws TimeRangeException
* the time is out of range
* @throws StateValueTypeException
* the attribute was not set with int values
*/
public static void setProcessToRunning(long timestamp, int currentThreadNode, ITmfStateSystemBuilder ssb)
- throws AttributeNotFoundException, TimeRangeException,
+ throws TimeRangeException,
StateValueTypeException {
int quark;
ITmfStateValue value;
* State system
* @throws StateValueTypeException
* the attribute is not set as an int
- * @throws AttributeNotFoundException
- * the attribute was not created yet
* @throws TimeRangeException
* the time is out of range
*/
public static void cpuExitInterrupt(long timestamp, Integer cpuNumber, ITmfStateSystemBuilder ssb)
- throws StateValueTypeException, AttributeNotFoundException,
- TimeRangeException {
+ throws StateValueTypeException, TimeRangeException {
int quark;
int currentCPUNode = getCurrentCPUNode(cpuNumber, ssb);
* The *quark* of the CPU we are looking for. Careful, this is
* NOT the CPU number (or attribute name)!
* @return The state value that represents the status of the given CPU
- * @throws AttributeNotFoundException
*/
- private static ITmfStateValue getCpuStatus(ITmfStateSystemBuilder ssb, int cpuQuark)
- throws AttributeNotFoundException {
+ private static ITmfStateValue getCpuStatus(ITmfStateSystemBuilder ssb, int cpuQuark) {
/* Check if there is a IRQ running */
int irqQuarks = ssb.getQuarkRelativeAndAdd(cpuQuark, Attributes.IRQS);
return StateValues.CPU_STATUS_IDLE_VALUE;
}
int threadSystemCallQuark = ssb.getQuarkAbsoluteAndAdd(Attributes.THREADS, Integer.toString(tid), Attributes.SYSTEM_CALL);
- return (ssb.queryOngoingState(threadSystemCallQuark).isNull() ?
- StateValues.CPU_STATUS_RUN_USERMODE_VALUE :
- StateValues.CPU_STATUS_RUN_SYSCALL_VALUE);
+ return (ssb.queryOngoingState(threadSystemCallQuark).isNull() ? StateValues.CPU_STATUS_RUN_USERMODE_VALUE : StateValues.CPU_STATUS_RUN_SYSCALL_VALUE);
}
}