Re: [PATCH v19 08/15] mm/damon: Add a tracepoint

From: SeongJae Park
Date: Wed Aug 05 2020 - 02:23:52 EST


On Tue, 4 Aug 2020 18:01:47 -0400 Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> On Tue, 4 Aug 2020 11:14:09 +0200
> SeongJae Park <sjpark@xxxxxxxxxx> wrote:
>
> > From: SeongJae Park <sjpark@xxxxxxxxx>
> >
> > This commit adds a tracepoint for DAMON. It traces the monitoring
> > results of each region for each aggregation interval. Using this, DAMON
> > can easily integrated with tracepoints supporting tools such as perf.
> >
> > Signed-off-by: SeongJae Park <sjpark@xxxxxxxxx>
> > Reviewed-by: Leonard Foerster <foersleo@xxxxxxxxx>
> > ---
> > include/trace/events/damon.h | 43 ++++++++++++++++++++++++++++++++++++
> > mm/damon.c | 4 ++++
> > 2 files changed, 47 insertions(+)
> > create mode 100644 include/trace/events/damon.h
> >
[...]
> > --- a/mm/damon.c
> > +++ b/mm/damon.c
> > @@ -20,6 +20,8 @@
> >
> > #define pr_fmt(fmt) "damon: " fmt
> >
> > +#define CREATE_TRACE_POINTS
> > +
> > #include <linux/damon.h>
> > #include <linux/delay.h>
> > #include <linux/kthread.h>
> > @@ -31,6 +33,7 @@
> > #include <linux/sched/mm.h>
> > #include <linux/sched/task.h>
> > #include <linux/slab.h>
>
> It's best to place the #define CREATE_TRACE_POINTS here, so that it
> doesn't cause any side effects when including the other headers.

Agreed, I will do so in the next spin!

>
> Other than that:
>
> Reviewed-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
>
> -- Steve


Thanks,
SeongJae Park