From: Kenneth Lee <nek.in.cn@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org
Subject: An small ftrace enhancement idea
Date: Wed, 30 Oct 2013 15:39:50 -0700 [thread overview]
Message-ID: <4A791BBD-EBBE-420F-8199-E4BAAF6A3C46@gmail.com> (raw)
Dear Steven,
I want to add a new function to ftrace subsystem. Sometimes, we will face such a problem: system do not response to the input on time one to two times everyday. It is not easy to capture because it rarely happens. So I want to add a function to the kernel. If I have such problem, I insert a kernel module, who add a hook to the position that receive the input and another to the position that response to the input (with a session id if necessary). And I can compare the time between them and if the period is longer then a pre-set threshold, I can give a signal to a user helper application (maybe a script waiting on the file), which then can save the trace event to a file for later inspection.
The user helper script may look like this:
#/bin/sh
echo ‘sched:*’ > /sys/kernel/debug/tracing/set_event
modprobe delay_inspector.ko threshold=500
cat /sys/kernel/debug/tracing/waiter #wait for signal
cp /sys/kernel/debug/tracing/trace /var/log/delay_infomation
It looks like a standalone function. But I don’t have place to put it. Do you think I can implement it in ftrace? And do you think if there are better solution?
Thank you.
Kenneth Lee
next reply other threads:[~2013-10-30 22:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 22:39 Kenneth Lee [this message]
2013-10-31 20:50 ` Steven Rostedt
2013-10-31 23:40 ` Kenneth Lee
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=4A791BBD-EBBE-420F-8199-E4BAAF6A3C46@gmail.com \
--to=nek.in.cn@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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
all inboxes | Powered by JetHome®