Skip to content

Commit fdbfee9

Browse files
committed
Merge tag 'trace-rv-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull runtime verification updates from Steven Rostedt: - Refactor da_monitor header to share handlers across monitor types No functional changes, only less code duplication. - Add Hybrid Automata model class Add a new model class that extends deterministic automata by adding constraints on transitions and states. Those constraints can take into account wall-clock time and as such allow RV monitor to make assertions on real time. Add documentation and code generation scripts. - Add stall monitor as hybrid automaton example Add a monitor that triggers a violation when a task is stalling as an example of automaton working with real time variables. - Convert the opid monitor to a hybrid automaton The opid monitor can be heavily simplified if written as a hybrid automaton: instead of tracking preempt and interrupt enable/disable events, it can just run constraints on the preemption/interrupt states when events like wakeup and need_resched verify. - Add support for per-object monitors in DA/HA Allow writing deterministic and hybrid automata monitors for generic objects (e.g. any struct), by exploiting a hash table where objects are saved. This allows to track more than just tasks in RV. For instance it will be used to track deadline entities in deadline monitors. - Add deadline tracepoints and move some deadline utilities Prepare the ground for deadline monitors by defining events and exporting helpers. - Add nomiss deadline monitor Add first example of deadline monitor asserting all entities complete before their deadline. - Improve rvgen error handling Introduce AutomataError exception class and better handle expected exceptions while showing a backtrace for unexpected ones. - Improve python code quality in rvgen Refactor the rvgen generation scripts to align with python best practices: use f-strings instead of %, use len() instead of __len__(), remove semicolons, use context managers for file operations, fix whitespace violations, extract magic strings into constants, remove unused imports and methods. - Fix small bugs in rvgen The generator scripts presented some corner case bugs: logical error in validating what a correct dot file looks like, fix an isinstance() check, enforce a dot file has an initial state, fix type annotations and typos in comments. - rvgen refactoring Refactor automata.py to use iterator-based parsing and handle required arguments directly in argparse. - Allow epoll in rtapp-sleep monitor The epoll_wait call is now rt-friendly so it should be allowed in the sleep monitor as a valid sleep method. * tag 'trace-rv-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (32 commits) rv: Allow epoll in rtapp-sleep monitor rv/rvgen: fix _fill_states() return type annotation rv/rvgen: fix unbound loop variable warning rv/rvgen: enforce presence of initial state rv/rvgen: extract node marker string to class constant rv/rvgen: fix isinstance check in Variable.expand() rv/rvgen: make monitor arguments required in rvgen rv/rvgen: remove unused __get_main_name method rv/rvgen: remove unused sys import from dot2c rv/rvgen: refactor automata.py to use iterator-based parsing rv/rvgen: use class constant for init marker rv/rvgen: fix DOT file validation logic error rv/rvgen: fix PEP 8 whitespace violations rv/rvgen: fix typos in automata and generator docstring and comments rv/rvgen: use context managers for file operations rv/rvgen: remove unnecessary semicolons rv/rvgen: replace __len__() calls with len() rv/rvgen: replace % string formatting with f-strings rv/rvgen: remove bare except clauses in generator rv/rvgen: introduce AutomataError exception class ...
2 parents 5ed1957 + 00f0dad commit fdbfee9

50 files changed

Lines changed: 3883 additions & 686 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/tools/rv/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ Runtime verification (rv) tool
1616
rv-mon-wip
1717
rv-mon-wwnr
1818
rv-mon-sched
19+
rv-mon-stall
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
============
4+
rv-mon-stall
5+
============
6+
--------------------
7+
Stalled task monitor
8+
--------------------
9+
10+
:Manual section: 1
11+
12+
SYNOPSIS
13+
========
14+
15+
**rv mon stall** [*OPTIONS*]
16+
17+
DESCRIPTION
18+
===========
19+
20+
The stalled task (**stall**) monitor is a sample per-task timed monitor that
21+
checks if tasks are scheduled within a defined threshold after they are ready.
22+
23+
See kernel documentation for further information about this monitor:
24+
<https://docs.kernel.org/trace/rv/monitor_stall.html>
25+
26+
OPTIONS
27+
=======
28+
29+
.. include:: common_ikm.rst
30+
31+
SEE ALSO
32+
========
33+
34+
**rv**\(1), **rv-mon**\(1)
35+
36+
Linux kernel *RV* documentation:
37+
<https://www.kernel.org/doc/html/latest/trace/rv/index.html>
38+
39+
AUTHOR
40+
======
41+
42+
Written by Gabriele Monaco <gmonaco@redhat.com>
43+
44+
.. include:: common_appendix.rst

Documentation/trace/rv/deterministic_automata.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ where:
1111
- *E* is the finite set of events;
1212
- x\ :subscript:`0` is the initial state;
1313
- X\ :subscript:`m` (subset of *X*) is the set of marked (or final) states.
14-
- *f* : *X* x *E* -> *X* $ is the transition function. It defines the state
14+
- *f* : *X* x *E* -> *X* is the transition function. It defines the state
1515
transition in the occurrence of an event from *E* in the state *X*. In the
1616
special case of deterministic automata, the occurrence of the event in *E*
1717
in a state in *X* has a deterministic next state from *X*.

0 commit comments

Comments
 (0)