From 5a551405d26d3967d32ed9f5c5ee885450dec49f Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Fri, 4 Mar 2022 12:07:22 +0000 Subject: [PATCH 1/3] tools/kmodules/: Make a symlink per file FIX Instead of a blanket symlink to lisa/_assets/kmodules/, create a specific symlink per file. This avoids sharing the actual folder with lisa/_assets/kmodules. This separate is critical to ensuring the build of kmodules from lisa._kmod is reliable, since files mtimes are lost when building from Python, and out-of-date build artifacts can therefore sometimes be reused. --- tools/kmodules | 1 - tools/kmodules/build_module | 1 + tools/kmodules/sched_tp/Makefile | 1 + tools/kmodules/sched_tp/private_types.txt | 1 + tools/kmodules/sched_tp/sched_events.h | 1 + tools/kmodules/sched_tp/sched_tp.c | 1 + tools/kmodules/sched_tp/sched_tp_helpers.h | 1 + 7 files changed, 6 insertions(+), 1 deletion(-) delete mode 120000 tools/kmodules create mode 120000 tools/kmodules/build_module create mode 120000 tools/kmodules/sched_tp/Makefile create mode 120000 tools/kmodules/sched_tp/private_types.txt create mode 120000 tools/kmodules/sched_tp/sched_events.h create mode 120000 tools/kmodules/sched_tp/sched_tp.c create mode 120000 tools/kmodules/sched_tp/sched_tp_helpers.h diff --git a/tools/kmodules b/tools/kmodules deleted file mode 120000 index fe5e76586..000000000 --- a/tools/kmodules +++ /dev/null @@ -1 +0,0 @@ -../lisa/_assets/kmodules \ No newline at end of file diff --git a/tools/kmodules/build_module b/tools/kmodules/build_module new file mode 120000 index 000000000..6bec5562a --- /dev/null +++ b/tools/kmodules/build_module @@ -0,0 +1 @@ +../../lisa/_assets/kmodules/build_module \ No newline at end of file diff --git a/tools/kmodules/sched_tp/Makefile b/tools/kmodules/sched_tp/Makefile new file mode 120000 index 000000000..24d871131 --- /dev/null +++ b/tools/kmodules/sched_tp/Makefile @@ -0,0 +1 @@ +../../../lisa/_assets/kmodules/sched_tp/Makefile \ No newline at end of file diff --git a/tools/kmodules/sched_tp/private_types.txt b/tools/kmodules/sched_tp/private_types.txt new file mode 120000 index 000000000..c029dfee8 --- /dev/null +++ b/tools/kmodules/sched_tp/private_types.txt @@ -0,0 +1 @@ +../../../lisa/_assets/kmodules/sched_tp/private_types.txt \ No newline at end of file diff --git a/tools/kmodules/sched_tp/sched_events.h b/tools/kmodules/sched_tp/sched_events.h new file mode 120000 index 000000000..2684da41c --- /dev/null +++ b/tools/kmodules/sched_tp/sched_events.h @@ -0,0 +1 @@ +../../../lisa/_assets/kmodules/sched_tp/sched_events.h \ No newline at end of file diff --git a/tools/kmodules/sched_tp/sched_tp.c b/tools/kmodules/sched_tp/sched_tp.c new file mode 120000 index 000000000..2f34f2c5c --- /dev/null +++ b/tools/kmodules/sched_tp/sched_tp.c @@ -0,0 +1 @@ +../../../lisa/_assets/kmodules/sched_tp/sched_tp.c \ No newline at end of file diff --git a/tools/kmodules/sched_tp/sched_tp_helpers.h b/tools/kmodules/sched_tp/sched_tp_helpers.h new file mode 120000 index 000000000..49303803d --- /dev/null +++ b/tools/kmodules/sched_tp/sched_tp_helpers.h @@ -0,0 +1 @@ +../../../lisa/_assets/kmodules/sched_tp/sched_tp_helpers.h \ No newline at end of file -- GitLab From eda4002a7e45e86f3877f6a12c5963ce0279c0f7 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Fri, 4 Mar 2022 12:13:02 +0000 Subject: [PATCH 2/3] doc/setup.rst: Fix manual kmod setup instruction FIX Do not refer to lisa/_assets/ anymore, refer to tools/kmodules/. This is critical in ensuring lisa/_assets/ stays read-only with a pristine content. Failure to do so leads to old artifacts (notably vmlinux.h) being reused when they should not, as files mtime is lost when building the module from Python code. Since lisa/ folder is expected to be readonly anyway, redirect the user to tools/kmodules where symlinks to specific source files are established, rather than a blanket symlink for the whole folder. --- doc/setup.rst | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/setup.rst b/doc/setup.rst index 1de01a342..633a6bb1e 100644 --- a/doc/setup.rst +++ b/doc/setup.rst @@ -160,7 +160,7 @@ them. To help expose these tracepoints (and any additional one we might require in the future) as trace events, an external module is required and is provided -under the name of sched_tp in $LISA_HOME/lisa/_assets/kmodules/sched_tp +under the name of sched_tp in $LISA_HOME/tools/kmodules/sched_tp Building a module ----------------- @@ -210,18 +210,24 @@ Build .. code-block:: sh - $LISA_HOME/lisa/_assets/kmodules/build_module path/to/kernel path/to/kmodule [path/to/install/modules] + $LISA_HOME/tools/kmodules/build_module path/to/kernel path/to/kmodule [path/to/install/modules] This will build the module against the provided kernel tree and install it in ``path/to/install/module`` if provided otherwise install it in ``$LISA_HOME/tools/kmodules``. +.. warning:: The documentation used to refer to + ``$LISA_HOME/lisa/_assets/kmodules`` rather than + ``tools/kmodules``. This was an oversight, DO NOT build from + ``lisa/_assets``. If you still do, any remaining build artifact + could be reused in fresh builds, leading to segfaults and such. + Clean ..... .. code-block:: sh - $LISA_HOME/lisa/_assets/kmodules/clean_module path/to/kernel path/to/kmodule + $LISA_HOME/tools/kmodules/clean_module path/to/kernel path/to/kmodule Highly recommended to clean when switching kernel trees to avoid unintentional breakage for using stale binaries. -- GitLab From f02417c15b363637d177861101d8e2cbe9e5a39c Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Fri, 4 Mar 2022 12:50:36 +0000 Subject: [PATCH 3/3] doc: Fix broken matplotlib docstring xref FIX Ignore warnings of broken matplotlib's xref when building the documentation, as they seem to have all started failing: https://github.com/matplotlib/matplotlib/issues/22601 --- doc/conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index 99e08c106..34ae2b919 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -411,6 +411,10 @@ ignored_refs = { r'docutils\.parsers.*', r'ipywidgets.*', + # TODO: revisit depending on outcome of: + # https://github.com/matplotlib/matplotlib/issues/22601 + r'matplotlib.*', + # Since trappy is not always installed, just hardcode the references we # have since there wont be more in the future. r'trappy.*', -- GitLab