Re: [PATCH v3 1/6] perf tools: Derive trigger class from auxtrace_snapshot

From: Jiri Olsa
Date: Sun Apr 17 2016 - 07:51:59 EST


On Fri, Apr 15, 2016 at 06:20:15PM +0000, Wang Nan wrote:
> Create a new class named 'trigger' to model the state of a trigger and
> implement auxtrace_snapshot with it.
>
> auxtrace_record__snapshot_started and auxtrace_snapshot_err are absorbed.
>
> 'trigger' defines 4 state transitioning functions ('on', 'released',
> 'toggle' and 'colddown') and 2 state query function ('is_released') and
> ('is_toggled'). The state 'ON' and 'OFF' take higher priority than
> 'RELEASED' and 'TOGGLED'. A trigger must be 'on' before 'enable' and
> 'disable' take effect. A trigger can be colddown after being triggered.

what's the COLDDOWN state for?

could you please document all the transitions of this state machine
in the change log and the trigger.h file?

thanks,
jirka