From: zhaolei@cn.fujitsu.com (Zhaolei)
Subject: [ltt-dev] [PATCH v4 2/2] Add marker interface for panic and kexec related events
Date: Thu, 19 Feb 2009 17:25:53 +0800 [thread overview]
Message-ID: <499D25A1.2050400@cn.fujitsu.com> (raw)
In-Reply-To: <499D24ED.2050100@cn.fujitsu.com>
By this patch, people can trace there events by marker interface.
LTTng can also trace there events.
Signed-off-by: Zhao Lei <zhaolei at cn.fujitsu.com>
---
ltt/probes/kernel-trace.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/ltt/probes/kernel-trace.c b/ltt/probes/kernel-trace.c
index 89552cb..eb03755 100644
--- a/ltt/probes/kernel-trace.c
+++ b/ltt/probes/kernel-trace.c
@@ -395,6 +395,27 @@ void probe_kernel_module_load(struct module *mod)
}
#endif
+void probe_kernel_panic(const char *fmt, va_list args)
+{
+ char info[64];
+ vsnprintf(info, sizeof(info), fmt, args);
+ trace_mark_tp(kernel, panic, kernel_panic, probe_kernel_panic,
+ "info %s", info);
+}
+
+void probe_kernel_kernel_kexec(struct kimage *image)
+{
+ trace_mark_tp(kernel, kernel_kexec, kernel_kernel_kexec,
+ probe_kernel_kernel_kexec, "image %p", image);
+}
+
+void probe_kernel_crash_kexec(struct kimage *image, struct pt_regs *regs)
+{
+ trace_mark_tp(kernel, crash_kexec, kernel_crash_kexec,
+ probe_kernel_crash_kexec, "image %p ip %p", image,
+ regs ? (void *)instruction_pointer(regs) : NULL);
+}
+
/* kernel_page_fault_entry specialized tracepoint probe */
void probe_kernel_page_fault_entry(struct pt_regs *regs, int trapnr,
--
1.5.5.3
next prev parent reply other threads:[~2009-02-19 9:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-19 9:22 [ltt-dev] [PATCH v4 0/2] add tracepoints and markers for panic and kexec event Zhaolei
2009-02-19 9:24 ` [ltt-dev] [PATCH v4 1/2] add tracepoints " Zhaolei
2009-02-19 9:25 ` Zhaolei [this message]
2009-03-14 3:14 ` [ltt-dev] [PATCH v4 0/2] add tracepoints and markers " Mathieu Desnoyers
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=499D25A1.2050400@cn.fujitsu.com \
--to=zhaolei@cn.fujitsu.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