From: guijianfeng@cn.fujitsu.com (Gui Jianfeng)
Subject: [ltt-dev] [PATCH] LTTNG: Make marker enabled in advance
Date: Thu, 05 Mar 2009 09:05:30 +0800 [thread overview]
Message-ID: <49AF255A.4040502@cn.fujitsu.com> (raw)
In-Reply-To: <20090304171022.GA2554@Krystal>
Mathieu Desnoyers wrote:
> * Gui Jianfeng (guijianfeng at cn.fujitsu.com) wrote:
>> Hi Mathieu,
>>
>> This patch makes marker enabled in advance.
>> IOW, even if the marker isn't present for the moment,
>> you can still enable it for future use.
>> As soon as the marker is inserted into kernel, tracing
>> work can be started immediately.
>>
>> Here is an example for using the user interface:
>> This patch assumes the marker control patch is applied.
>>
>> [root at localhost markers]# cd /mnt/debugfs/ltt/markers
>> [root at localhost markers]# mkdir fs
>> [root at localhost markers]# cd fs
>> [root at localhost fs]# mkdir close
>> [root at localhost fs]# cd close/
>> [root at localhost close]# ls
>> enable info
>> [root at localhost close]# echo 1 > enable
>> [root at localhost close]# cat enable
>> 2
>> [root at localhost close]# cat info
>> marker is not present now!
>> [root at localhost close]# modprobe fs_trace
>> [root at localhost close]# cat enable
>> 1
>> [root at localhost close]# cat info
>> format: "fd %u"
>> state: 1
>> event_id: 1
>> call: 0xc0468167
>> probe single : 0xc0520cdc
>>
>> Signed-off-by: Gui Jianfeng <guijianfeng at cn.fujitsu.com>
>> ---
>> ltt/ltt-trace-control.c | 357 ++++++++++++++++++++++++++++++++---------------
>> 1 files changed, 247 insertions(+), 110 deletions(-)
>>
>> diff --git a/ltt/ltt-trace-control.c b/ltt/ltt-trace-control.c
>> index 128db4e..7e1c32e 100644
>> --- a/ltt/ltt-trace-control.c
>> +++ b/ltt/ltt-trace-control.c
>> @@ -19,6 +19,7 @@
>> #include <linux/debugfs.h>
>> #include <linux/ltt-tracer.h>
>> #include <linux/notifier.h>
>> +#include <linux/mutex.h>
>>
>> #define LTT_CONTROL_DIR "control"
>> #define MARKERS_CONTROL_DIR "markers"
>> @@ -27,9 +28,240 @@
>>
>> #define LTT_WRITE_MAXLEN (128)
>>
>> +#define MARKER_ENABLE_MASK 0x7UL
>
> What is this doing ?
marker is 8 bytes aligned, the last 3 bit must 0.
I use these bits to identify whether the marker is enabled in advance.
>
>> +
>> +static DEFINE_MUTEX(unload_mutex);
>
> Can you tell me exactly what this protects, where it is nested ?
when doing mkdir to create a new dir by debugfs_create_dir(), I have to drop
the parent's i_mutex, because debugfs_create_dir() need it. To prevent the
parent to be removed, this mutex is introduced.
>
> Mathieu
>
>> +
--
Regards
Gui Jianfeng
next prev parent reply other threads:[~2009-03-05 1:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-03 2:56 Gui Jianfeng
2009-03-04 17:10 ` Mathieu Desnoyers
2009-03-05 1:05 ` Gui Jianfeng [this message]
2009-03-05 18:53 ` Mathieu Desnoyers
2009-03-06 2:58 ` Gui Jianfeng
2009-03-06 3:37 ` Mathieu Desnoyers
2009-03-06 6:40 ` Gui Jianfeng
2009-03-06 18:21 ` Mathieu Desnoyers
2009-03-09 1:23 ` Gui Jianfeng
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=49AF255A.4040502@cn.fujitsu.com \
--to=guijianfeng@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