[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1543953560.2790.18.camel@kernel.org>
Date: Tue, 04 Dec 2018 13:59:20 -0600
From: Tom Zanussi <zanussi@...nel.org>
To: Masami Hiramatsu <mhiramat@...nel.org>
Cc: rostedt@...dmis.org, tglx@...utronix.de, namhyung@...nel.org,
vedang.patel@...el.com, bigeasy@...utronix.de,
joel@...lfernandes.org, mathieu.desnoyers@...icios.com,
julia@...com, linux-kernel@...r.kernel.org,
linux-rt-users@...r.kernel.org
Subject: Re: [PATCH v7 09/16] tracing: Add hist trigger snapshot() action
test case
Hi Masami,
On Mon, 2018-11-26 at 22:03 +0900, Masami Hiramatsu wrote:
> On Wed, 14 Nov 2018 14:18:06 -0600
> Tom Zanussi <zanussi@...nel.org> wrote:
>
> > From: Tom Zanussi <tom.zanussi@...ux.intel.com>
> >
> > Add a test case verifying the basic functionality of the
> > hist:snapshot() action.
> >
> > Signed-off-by: Tom Zanussi <tom.zanussi@...ux.intel.com>
> > ---
> > .../inter-event/trigger-snapshot-action-hist.tc | 43
> > ++++++++++++++++++++++
> > 1 file changed, 43 insertions(+)
> > create mode 100644
> > tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-
> > snapshot-action-hist.tc
> >
> > diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-
> > event/trigger-snapshot-action-hist.tc
> > b/tools/testing/selftests/ftrace/test.d/trigger/inter-
> > event/trigger-snapshot-action-hist.tc
> > new file mode 100644
> > index 000000000000..a0a51e6a6a0c
> > --- /dev/null
> > +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-
> > event/trigger-snapshot-action-hist.tc
> > @@ -0,0 +1,43 @@
> > +#!/bin/sh
> > +# SPDX-License-Identifier: GPL-2.0
> > +# description: event trigger - test inter-event histogram trigger
> > snapshot action
> > +
> > +fail() { #msg
> > + echo $1
> > + exit_fail
> > +}
> > +
> > +if [ ! -f set_event ]; then
> > + echo "event tracing is not supported"
> > + exit_unsupported
> > +fi
> > +
> > +if [ ! -f snapshot ]; then
> > + echo "snapshot is not supported"
> > + exit_unsupported
> > +fi
> > +
> > +grep -q "onchange(var)" README > /dev/null || exit_unsupported #
> > version issue
> > +
> > +grep -q "snapshot()" README > /dev/null || exit_unsupported #
> > version issue
>
> "grep -q ... > /dev/null" is redundant, since -q doesn't show
> anything.
> please drop "> /dev/null" redirection.
>
> > +
> > +echo "Test snapshot action"
> > +
> > +echo 1 > /sys/kernel/debug/tracing/events/sched/enable
> > +
> > +echo
> > 'hist:keys=comm:newprio=prio:onchange($newprio).save(comm,prio):onc
> > hange($newprio).snapshot() if comm=="ping"' >>
> > /sys/kernel/debug/tracing/events/sched/sched_waking/trigger
>
> This tests onchange().snapshot(), but document change only describes
> onmax().snapshot().
> Maybe we should improve document too.
>
Actually, onchange().snapshot() is documented in '[PATCH v7 11/16]
tracing: Add hist trigger onchange() handler Documentation'. I can
change the order of the patches if it matters.
Thanks,
Tom
Powered by blists - more mailing lists