Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753607AbcDRCda (ORCPT ); Sun, 17 Apr 2016 22:33:30 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:59726 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753560AbcDRCd0 (ORCPT ); Sun, 17 Apr 2016 22:33:26 -0400 Subject: Re: [PATCH v3 1/6] perf tools: Derive trigger class from auxtrace_snapshot To: Jiri Olsa References: <1460744420-175165-1-git-send-email-wangnan0@huawei.com> <1460744420-175165-2-git-send-email-wangnan0@huawei.com> <20160417115037.GA31336@krava.brq.redhat.com> CC: , , , Adrian Hunter , He Kuang , Jiri Olsa , Masami Hiramatsu , Namhyung Kim , Zefan Li , "Arnaldo Carvalho de Melo" From: "Wangnan (F)" Message-ID: <57144532.3090500@huawei.com> Date: Mon, 18 Apr 2016 10:23:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160417115037.GA31336@krava.brq.redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.66.109] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.57144594.0072,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 3b7b489d0c8c8e173e81944571d7fe47 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1217 Lines: 32 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