From: Wengang Wang <wen.gang.wang@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 0/2] ocfs2: add trace event support for ocfs2
Date: Thu, 17 Sep 2009 15:51:47 +0800 [thread overview]
Message-ID: <4AB1EA93.6060908@oracle.com> (raw)
In-Reply-To: <200909170419.n8H4JFWY027973@rgminet13.oracle.com>
Wengang Wang wrote:
> following patches add trace event support for ocfs2.
> for tracepoint, see Documentation/trace/tracepoints.txt
> for trace events, see Documentation/trace/events.txt
>
> the first patch add file include/trace/events/ocfs2.h to kernel tree. it is used
> to store trace declarations. it's contents are self-explained.
> NOTE that each ocfs2 header file should be above "#include <linux/tracepoint.h>"
>
> the second one is an example which adds trace event to ocfs2_file_aio_read().
> NOTE that CREATE_TRACE_POINTS must be defined before including trace/event/ocfs2.h
> when trace event is used.
and CREATE_TRACE_POINTS should be defined in only one .c file please.
regards,
wengang.
>
> enable/disable the trace event:
> 1) debugfs is need to be mount for using trace event.
> mount -t debugfs debugfs /sys/kernel/debug(or somewhere else)
> 2) enable/disable some specific event,
> echo '1'/'0'>/sys/kernel/debug/tracing/events/ocfs2/ocfs2_file_aio_read/enable
> 3) to see the trace log,
> cat /sys/kernel/debug/tracing/trace
>
> an output example is:
> [root at cool ocfs2_file_aio_read]# cat /sys/kernel/debug/tracing/trace
> # tracer: nop
> #
> # TASK-PID CPU# TIMESTAMP FUNCTION
> # | | | | |
> cat-2587 [001] 708.929889: ocfs2_file_aio_read: 0xf544bed8 0xf544bf5c 1 0
>
> cat-2587 [000] 708.944128: ocfs2_file_aio_read: 0xf544bed8 0xf544bf5c 1 43
>
> examples of using filter.
> 1) if pid is 0, do the trace:
> echo "common_pid == 0" >/sys/kernel/debug/tracing/events/ocfs2/ocfs2_file_aio_read/filter
> 2) if group id not 0, do the trace:
> echo "common_tgid != 0" >filter
>
> for filter expression, so far, see http://article.gmane.org/gmane.linux.kernel/887690?
>
>
next prev parent reply other threads:[~2009-09-17 7:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-16 22:19 [Ocfs2-devel] [PATCH 0/2] ocfs2: add trace event support for ocfs2 Wengang Wang
2009-09-17 7:51 ` Wengang Wang [this message]
2009-10-13 20:33 ` Joel Becker
2009-10-14 1:07 ` Wengang Wang
2009-10-15 3:05 ` Tao Ma
2009-10-15 9:15 ` Joel Becker
2009-10-15 22:29 ` TaoMa
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=4AB1EA93.6060908@oracle.com \
--to=wen.gang.wang@oracle.com \
--cc=ocfs2-devel@oss.oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.