+ * @return true if this is a wake-up event to process, false otherwise
+ */
+ public boolean isWakeupEvent(ITmfEvent event) {
+ String eventName = event.getName();
+ ITmfTrace trace = event.getTrace();
+ IKernelAnalysisEventLayout eventLayout = getProvider().getEventLayout(event.getTrace());
+ String wakeupEventName = NonNullUtils.nullToEmptyString(fWakeupEventMap.get(trace));
+
+ /* First, check if sched_ttwu is the current wake-up event for this trace */
+ if (eventLayout instanceof LttngEventLayout) {
+ LttngEventLayout layoutDefault = (LttngEventLayout) eventLayout;
+ if (wakeupEventName.equals(layoutDefault.eventSchedProcessTTWU())) {
+ return eventName.equals(layoutDefault.eventSchedProcessTTWU());
+ }
+ }
+
+ /* Fall back to built-in sched_waking and sched_wakeup_new */
+ if (eventLayout instanceof Lttng28EventLayout) {
+ Lttng28EventLayout layout28 = (Lttng28EventLayout) eventLayout;
+ if (wakeupEventName.equals(layout28.eventSchedProcessWaking())) {
+ return (eventName.equals(layout28.eventSchedProcessWaking()) ||
+ eventName.equals(layout28.eventSchedProcessWakeupNew()));
+ }
+ }
+
+ /* Legacy support using built-in sched_wakeup and sched_wakeup_new */
+ if (eventLayout instanceof LttngEventLayout) {
+ LttngEventLayout layoutDefault = (LttngEventLayout) eventLayout;
+ if (wakeupEventName.equals(layoutDefault.eventSchedProcessWakeup())) {
+ return (eventName.equals(layoutDefault.eventSchedProcessWakeup()) ||
+ eventName.equals(layoutDefault.eventSchedProcessWakeupNew()));
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Return true if this event is an IPI entry
+ *
+ * @param event
+ * the event
+ * @return true of this is an IPI entry, false otherwise