+ @Override
+ public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) {
+ if (bounds.width <= gc.getFontMetrics().getAverageCharWidth()) {
+ return;
+ }
+ if (!(event instanceof TimeEvent)) {
+ return;
+ }
+ ControlFlowEntry entry = (ControlFlowEntry) event.getEntry();
+ LttngKernelAnalysisModule module = entry.getTrace().getAnalysisModuleOfClass(LttngKernelAnalysisModule.class, LttngKernelAnalysisModule.ID);
+ if (module == null) {
+ return;
+ }
+ ITmfStateSystem ss = module.getStateSystem();
+ if (ss == null) {
+ return;
+ }
+ int status = ((TimeEvent) event).getValue();
+
+ if (status != StateValues.PROCESS_STATUS_RUN_SYSCALL) {
+ return;
+ }
+ try {
+ int syscallQuark = ss.getQuarkRelative(entry.getThreadQuark(), Attributes.SYSTEM_CALL);
+ ITmfStateInterval value = ss.querySingleState(event.getTime(), syscallQuark);
+ if (!value.getStateValue().isNull()) {
+ ITmfStateValue state = value.getStateValue();
+ gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_WHITE));
+ Utils.drawText(gc, state.toString().substring(4), bounds.x, bounds.y - 2, bounds.width, true, true);
+ }
+ } catch (AttributeNotFoundException | TimeRangeException e) {
+ Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
+ } catch (StateSystemDisposedException e) {
+ /* Ignored */
+ }
+ }