- try {
- int cpusNode = kernelSs.getQuarkAbsolute(Attributes.THREADS);
-
- /* Get the quarks for each cpu */
- List<Integer> cpuNodes = kernelSs.getSubAttributes(cpusNode, false);
-
- for (Integer tidQuark : cpuNodes) {
- if (kernelSs.getAttributeName(tidQuark).equals(tid)) {
- int execNameQuark;
- List<ITmfStateInterval> execNameIntervals;
- try {
- execNameQuark = kernelSs.getQuarkRelative(tidQuark, Attributes.EXEC_NAME);
- execNameIntervals = StateSystemUtils.queryHistoryRange(kernelSs, execNameQuark, getStartTime(), getEndTime());
- } catch (TimeRangeException | AttributeNotFoundException e) {
- /*
- * No information on this thread (yet?), skip it for now
- */
- continue;
- } catch (StateSystemDisposedException e) {
- /* State system is closing down, no point continuing */
- break;
- }
+ /* Retrieve the quark for process tid's execName */
+ int execNameQuark = kernelSs.optQuarkAbsolute(Attributes.THREADS, tid, Attributes.EXEC_NAME);
+ if (execNameQuark == ITmfStateSystem.INVALID_ATTRIBUTE) {
+ /*
+ * No information on this thread (yet?), skip it for now
+ */
+ return tid;
+ }