[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YtlpSGp590YJXT22@geo.homenetwork>
Date: Thu, 21 Jul 2022 22:57:12 +0800
From: Tao Zhou <tao.zhou@...ux.dev>
To: Daniel Bristot de Oliveira <bristot@...nel.org>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Wim Van Sebroeck <wim@...ux-watchdog.org>,
Guenter Roeck <linux@...ck-us.net>,
Jonathan Corbet <corbet@....net>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Will Deacon <will@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Marco Elver <elver@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Shuah Khan <skhan@...uxfoundation.org>,
Gabriele Paoloni <gpaoloni@...hat.com>,
Juri Lelli <juri.lelli@...hat.com>,
Clark Williams <williams@...hat.com>,
Randy Dunlap <rdunlap@...radead.org>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-trace-devel@...r.kernel.org, Tao Zhou <tao.zhou@...ux.dev>
Subject: Re: [PATCH V6 11/16] Documentation/rv: Add deterministic automata
instrumentation documentation
On Tue, Jul 19, 2022 at 07:27:16PM +0200, Daniel Bristot de Oliveira wrote:
> +Looking at the automata definition, it is possible to see that the system
> +and the model are expected to return to the initial state after the
> +preempt_enable execution. Hence, it can be used to synchronize the
> +system and the model at the initialization of the monitoring section.
> +
> +The start is informed via a special handle function, the
> +"da_handle_start_event_MONITOR_event)", in this case::
da_handle_start_event_$MONITOR(event) the same as the previous version
should be right.
> +
> + da_handle_start_event_wip(preempt_disable_wip);
I didn't see this in last version that the event should be preempt_enable_wip.
> +
> +So, the callback function will look like::
> +
> + void handle_preempt_enable(void *data, unsigned long ip, unsigned long parent_ip)
> + {
> + da_handle_start_event_wip(preempt_enable_wip);
> + }
> +
> +Finally, the "handle_sched_waking()" will look like::
> +
> + void handle_sched_waking(void *data, struct task_struct *task)
> + {
> + da_handle_event_wip(sched_waking_wip);
> + }
> +
> +And the explanation is left for the reader as an exercise.
> +
> +Start and Stop functions
Start and Stop functions are changed to enable and disable functions.
> +------------------------
> +
> +dot2k automatically creates two special functions::
> +
> + enable_MONITOR()
> + disable_MONITOR()
> +
> +These functions are called when the monitor is enabled and disabled,
> +respectively.
> +
> +They should be used to *attach* and *detach* the instrumentation to the running
> +system. The developer must add to the relative function all that is needed to
> +*attach* and *detach* its monitor to the system.
> +
> +For the wip case, these functions were named::
> +
> + enable_wip()
> + disable_wip()
> +
> +But no change was required because: by default, these functions *attach* and
> +*detach* the tracepoints_to_attach, which was enough for this case.
Powered by blists - more mailing lists