lkml.org 
[lkml]   [2016]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 1/6] perf tools: Derive trigger class from auxtrace_snapshot
From
Date


On 2016/4/17 19:50, Jiri Olsa wrote:
> 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?

COLDDOWN is for auxtrace_record__snapshot_started. Once signal received,
auxtrace subsystem doesn't process following signal, until
record__read_auxtrace_snapshot finished successful. Mapping to trigger,
once the state of a trigger moves to 'TRIGGERED', there must be a state
neither RELEASED nor ERROR, which disallow triggering, but allow transiting
to RELEASED.


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

Will do. Thank you.

> thanks,
> jirka


\
 
 \ /
  Last update: 2016-04-18 05:41    [W:0.105 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site