Re: [PATCH v23 11/15] tools: Introduce a minimal user-space tool for DAMON

From: SeongJae Park
Date: Wed Dec 23 2020 - 13:39:14 EST


On Tue, 15 Dec 2020 12:54:44 +0100 SeongJae Park <sjpark@xxxxxxxxxx> wrote:

> From: SeongJae Park <sjpark@xxxxxxxxx>
>
> 'damon-dbgfs' provides simple user space interface for DAMON, but using
> the interface for complex usages could require annoying repetitive
> works. Writing a user space data access monitoring applications on top
> of the debugfs interface and using the application would be better for
> such complex cases.
>
> This commit introduces a reference implementation of such user space
> application built on top of the debugfs interface, namely 'DAMon
> Operator' (DAMO). It contains a shallow wrapper python script of the
> debugfs interface and various visualization of the monitoring results
> convenient user interface.
>
> Note that it is initially aimed to be used for minimal reference of the
> 'damon-dbgfs' interface and for debugging of the DAMON itself.
>
> Signed-off-by: SeongJae Park <sjpark@xxxxxxxxx>
> ---
> tools/damon/.gitignore | 1 +
> tools/damon/_damon.py | 130 ++++++++++++++
> tools/damon/_dist.py | 35 ++++
> tools/damon/_recfile.py | 23 +++
> tools/damon/bin2txt.py | 67 +++++++
> tools/damon/damo | 37 ++++
> tools/damon/heats.py | 362 ++++++++++++++++++++++++++++++++++++++
> tools/damon/nr_regions.py | 91 ++++++++++
> tools/damon/record.py | 135 ++++++++++++++
> tools/damon/report.py | 45 +++++
> tools/damon/wss.py | 100 +++++++++++
> 11 files changed, 1026 insertions(+)

I will drop this patch from the next version of this patchset, because this is
not the essential part but could only make the code review time consuming. I
will post another DAMON RFC patchset for convenient user space usages including
this and the perf integration.