File tree Expand file tree Collapse file tree 1 file changed +40
-2
lines changed Expand file tree Collapse file tree 1 file changed +40
-2
lines changed Original file line number Diff line number Diff line change @@ -635,8 +635,46 @@ struct perf_addr_filter_range {
635635 unsigned long size ;
636636};
637637
638- /**
639- * enum perf_event_state - the states of an event:
638+ /*
639+ * The normal states are:
640+ *
641+ * ACTIVE --.
642+ * ^ |
643+ * | |
644+ * sched_{in,out}() |
645+ * | |
646+ * v |
647+ * ,---> INACTIVE --+ <-.
648+ * | | |
649+ * | {dis,en}able()
650+ * sched_in() | |
651+ * | OFF <--' --+
652+ * | |
653+ * `---> ERROR ------'
654+ *
655+ * That is:
656+ *
657+ * sched_in: INACTIVE -> {ACTIVE,ERROR}
658+ * sched_out: ACTIVE -> INACTIVE
659+ * disable: {ACTIVE,INACTIVE} -> OFF
660+ * enable: {OFF,ERROR} -> INACTIVE
661+ *
662+ * Where {OFF,ERROR} are disabled states.
663+ *
664+ * Then we have the {EXIT,REVOKED,DEAD} states which are various shades of
665+ * defunct events:
666+ *
667+ * - EXIT means task that the even was assigned to died, but child events
668+ * still live, and further children can still be created. But the event
669+ * itself will never be active again. It can only transition to
670+ * {REVOKED,DEAD};
671+ *
672+ * - REVOKED means the PMU the event was associated with is gone; all
673+ * functionality is stopped but the event is still alive. Can only
674+ * transition to DEAD;
675+ *
676+ * - DEAD event really is DYING tearing down state and freeing bits.
677+ *
640678 */
641679enum perf_event_state {
642680 PERF_EVENT_STATE_DEAD = -5 ,
You can’t perform that action at this time.
0 commit comments