Automate manual steps in monitor creation
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | verification/dot2k: Fix template directory detectiontools/ | +8 | 0 replies | |
| 2/8 | verification/dot2k: Unify main.c templatestools/ tools/ tools/ +1 more | +7 | 0 replies | |
| 3/8 | verification/dot2k: More robust template variablestools/ tools/ | +32 | 0 replies | |
| 4/8 | verification/dot2k: Add support for name and description optionstools/ tools/ tools/ +2 more | +12 | 0 replies | |
| 5/8 | Simplify manual steps in monitor creationkernel/ kernel/ kernel/ +7 more | +66 | 0 replies | |
| 6/8 | verification/dot2k: Simplify manual steps in monitor creationtools/ tools/ tools/ +2 more | +110 | 0 replies | |
| 7/8 | verification/dot2k: Auto patch current kernel sourcekernel/ kernel/ kernel/ +2 more | +86 | 2 replies | |
| 8/8 | verification/dot2k: Implement event type detectiontools/ tools/ | +41 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/8] rv: Automate manual steps in monitor creation
While creating a new monitor in RV, besides generating code from dot2k, there are a few manual steps which can be tedious and error prone, like adding the tracepoints, makefile lines and kconfig, or selecting events that start the monitor in the initial state.
This patchset tries to automate as much as possible among those steps to make creating a new RV monitor much quicker. It is still required to select proper tracepoints, this step is harder to automate in a general way and, in several cases, would still need user intervention.
The first 3 patches are preparatory work around the templates.
Patch 1 fixes the template directory used if dot2k is not installed but is run from the kernel tree (tools/verification/).
Patch 2 unifies the templates for the 3 monitor types to change them easier.
Patch 3 makes the format used for variables replaced by the dot2k script a bit more robust.
Patch 4 implements the already present -n and -D flags to set the monitor name and description, respectively.
Patch 5 moves most of the monitor-specific code to the monitor directory (tracepoints, Kconfig). The user still needs to manually fill some content but the copy-paste-change is reduced.
Patch 6 adapts dot2k to produce monitors as defined in patch 5, adding the necessary templates. Additionally, while printing the checklist, dot2k also suggests what lines to add and where.
Patch 7 adds the possibility to further automate what is done in patch 5 and 6. If dot2k finds a valid kernel source and the -a flag is passed, it automatically changes the files accordingly (RV Makefile, tracepoints and Kconfig) and moves the new monitor folder in the final position.
Patch 8 allows to automatically select events that start the monitor, to achieve this, the automata parser can now understand if there are events that always lead to the initial state or are only valid in the initial state. dot2k uses da_handle_start_event with the former and, as a fallback, da_handle_start_run_event for the latter.
Gabriele Monaco (8):
verification/dot2k: Fix template directory detection verification/dot2k: Unify main.c templates verification/dot2k: More robust template variables verification/dot2k: Add support for name and description options
rv: Simplify manual steps in monitor creation verification/dot2k: Simplify manual steps in monitor creation verification/dot2k: Auto patch current kernel source verification/dot2k: Implement event type detection
kernel/trace/rv/Kconfig | 27 +-- kernel/trace/rv/Makefile | 3 + kernel/trace/rv/monitors/wip/Kconfig | 12 + kernel/trace/rv/monitors/wip/wip.c | 2 +- kernel/trace/rv/monitors/wip/wip_trace.h | 15 ++ kernel/trace/rv/monitors/wwnr/Kconfig | 11 + kernel/trace/rv/monitors/wwnr/wwnr.c | 2 +- kernel/trace/rv/monitors/wwnr/wwnr_trace.h | 16 ++ kernel/trace/rv/rv.c | 2 +- .../events/rv.h => kernel/trace/rv/rv_trace.h | 26 +- tools/verification/dot2/automata.py | 36 ++- tools/verification/dot2/dot2c.py | 4 +- tools/verification/dot2/dot2k | 17 +- tools/verification/dot2/dot2k.py | 226 +++++++++++++++--- .../verification/dot2/dot2k_templates/Kconfig | 6 + .../verification/dot2/dot2k_templates/main.c | 91 +++++++ .../dot2/dot2k_templates/main_global.c | 91 ------- .../dot2/dot2k_templates/main_per_cpu.c | 91 ------- .../dot2/dot2k_templates/main_per_task.c | 91 ------- .../verification/dot2/dot2k_templates/trace.h | 13 + 20 files changed, 419 insertions(+), 363 deletions(-) create mode 100644 kernel/trace/rv/monitors/wip/Kconfig create mode 100644 kernel/trace/rv/monitors/wip/wip_trace.h create mode 100644 kernel/trace/rv/monitors/wwnr/Kconfig create mode 100644 kernel/trace/rv/monitors/wwnr/wwnr_trace.h rename include/trace/events/rv.h => kernel/trace/rv/rv_trace.h (79%) create mode 100644 tools/verification/dot2/dot2k_templates/Kconfig create mode 100644 tools/verification/dot2/dot2k_templates/main.c delete mode 100644 tools/verification/dot2/dot2k_templates/main_global.c delete mode 100644 tools/verification/dot2/dot2k_templates/main_per_cpu.c delete mode 100644 tools/verification/dot2/dot2k_templates/main_per_task.c create mode 100644 tools/verification/dot2/dot2k_templates/trace.h
base-commit: aef25be35d23ec768eed08bfcf7ca3cf9685bc28
Signature · 1 line
2.47.1