From: Masami Hiramatsu <mhiramat@kernel.org>
To: Tom Zanussi <tom.zanussi@linux.intel.com>
Cc: rostedt@goodmis.org, tglx@linutronix.de, namhyung@kernel.org,
vedang.patel@intel.com, bigeasy@linutronix.de,
joel.opensrc@gmail.com, joelaf@google.com,
mathieu.desnoyers@efficios.com, baohong.liu@intel.com,
rajvi.jingar@intel.com, julia@ni.com, fengguang.wu@intel.com,
linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org
Subject: Re: [PATCH 3/4] tracing: Add action comparisons when testing matching hist triggers
Date: Fri, 6 Apr 2018 10:53:09 +0900 [thread overview]
Message-ID: <20180406105309.b50ea1a21d2cbd9b0e39dbfd@kernel.org> (raw)
In-Reply-To: <1522971253.32118.47.camel@tzanussi-mobl.amr.corp.intel.com>
Hi Tom,
On Thu, 05 Apr 2018 18:34:13 -0500
Tom Zanussi <tom.zanussi@linux.intel.com> wrote:
> Hi Masami,
>
> On Thu, 2018-04-05 at 12:50 +0900, Masami Hiramatsu wrote:
>
> [...]
>
> > Can you print out the error with which event we should see? e.g.
> >
> > ERROR: Variable already defined at sched_wakeup: ts0
> >
>
> How about printing the event name along with the last command, for any
> error? :
>
> ERROR: Variable already defined: ts0
> Last command: [sched:sched_wakeup] keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"
Hmm, is the Last command shows the last command on sched_wakeup ? or sched_switch??
[...]
> Before:
>
> # echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger
>
> # echo '!hist:keys=next_pid:ts0=common_timestamp.usecs if comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger
>
> And other commands making us think we cleared everything out so the
> below error is a surprise
>
> # echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger
> -su: echo: write error: Invalid argument
No, my senario is different.
Your senario tries
1) define ts0 on sched_wakeup
2) remove ts0 from sched_switch (but silently failed)
3) re-define ts0 on sched_wakeup and get an error
In this case, user can dump sched_wakeup/trigger and see there is already ts0 defined.
My senario is a bit different
1) define ts0 on sched_wakeup
2) remove ts0 from sched_switch (but silently failed)
3) re-define ts0 on *sched_switch* and get an error
The 3rd operation failed on "sched_switch" not on "sched_wakeup". In this case we will totally lost where the ts0 defined.
That's why I have asked you to show "where the ts0 is defined" at error line.
Anyway, I think it is a good chance to introduce <tracefs>/error_log file, since we have too many non-critical errors on operations. I feel that checking hist file by errors on trigger file is not a bit intuitive.
# cat /sys/kernel/debug/tracing/error_log
ERROR(events/sched/sched_switch/trigger): Variable already defined: ts0@sched:sched_wakeup
Command: keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"
This can be used from probe events too :)
e.g.
ERROR(kprobe_events): Unsupported type: uint8
Command: p vfs_read arg1=%di:uint8
Any thought?
Thank you,
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2018-04-06 1:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-28 20:10 [PATCH 0/4] tracing: A few inter-event bugfixes Tom Zanussi
2018-03-28 20:10 ` [PATCH 1/4] tracing: Fix display of hist trigger expressions containing timestamps Tom Zanussi
2018-03-28 20:10 ` [PATCH 2/4] tracing: Don't add flag strings when displaying variable references Tom Zanussi
2018-03-28 20:10 ` [PATCH 3/4] tracing: Add action comparisons when testing matching hist triggers Tom Zanussi
2018-04-02 15:10 ` Masami Hiramatsu
2018-04-02 17:09 ` Tom Zanussi
2018-04-04 12:33 ` Masami Hiramatsu
2018-04-04 13:01 ` Steven Rostedt
2018-04-04 15:17 ` Tom Zanussi
2018-04-05 3:50 ` Masami Hiramatsu
2018-04-05 23:34 ` Tom Zanussi
2018-04-06 1:53 ` Masami Hiramatsu [this message]
2018-04-06 16:47 ` Tom Zanussi
2018-04-07 12:16 ` Masami Hiramatsu
2018-04-12 15:22 ` Tom Zanussi
2018-03-28 20:10 ` [PATCH 4/4] tracing: Make sure variable string fields are NULL-terminated Tom Zanussi
2018-04-02 15:26 ` [PATCH 0/4] tracing: A few inter-event bugfixes Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180406105309.b50ea1a21d2cbd9b0e39dbfd@kernel.org \
--to=mhiramat@kernel.org \
--cc=baohong.liu@intel.com \
--cc=bigeasy@linutronix.de \
--cc=fengguang.wu@intel.com \
--cc=joel.opensrc@gmail.com \
--cc=joelaf@google.com \
--cc=julia@ni.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=namhyung@kernel.org \
--cc=rajvi.jingar@intel.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=tom.zanussi@linux.intel.com \
--cc=vedang.patel@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).