From: zhaolei@cn.fujitsu.com (Zhaolei)
Subject: [ltt-dev] [PATCH] Separateltt_trace_create()intoltt_trace_create() and ltt_trace_alloc()
Date: Fri, 31 Oct 2008 09:13:36 +0800 [thread overview]
Message-ID: <38E91C920F734A5C8E06B14CB8F8F91D@zhaoleiwin> (raw)
In-Reply-To: <20081030144944.GB13812@Krystal>
*Mathieu wrote:
>* Zhaolei (zhaolei at cn.fujitsu.com) wrote:
>> `-- debugfs
>> `-- ltt
>> |-- buffers
>> | `-- ...
>> |-- control
>> | `-- trace1
>> | |-- alloc
>> | |-- channel
>> | | |-- control
>> | | | |-- interrupts
>> | | | | |-- subbuf_num
>> | | | | `-- subbuf_size
>> | | | |-- metadata
>> | | | | |-- subbuf_num
>> | | | | `-- subbuf_size
>> | | | |-- modules
>> | | | | |-- subbuf_num
>> | | | | `-- subbuf_size
>> | | | |-- network
>> | | | | |-- subbuf_num
>> | | | | `-- subbuf_size
>> | | | `-- processes
>> | | | |-- subbuf_num
>> | | | `-- subbuf_size
>> | | `-- cpu
>> | | |-- mode
>> | | |-- subbuf_num
>> | | `-- subbuf_size
>> | `-- enabled
>> `-- setup_trace
>>
>> It lakes control-file for destroy a trace and setup trace_type.
>> So I think we should change tree struct as follow,
>> Do you hace some comment?
>>
>> `-- debugfs
>> `-- ltt
>> |-- buffers
>> | `-- ...
>> |-- control
>> | `-- trace1
>> | |-- alloc
>
> echo 1 > alloc -> allocate
> echo 0 > alloc -> free ?
>
Hello, Mathieu,
Thanks for your answer.
>> | |-- channel
>> | | |-- control
>> | | | |-- interrupts
>> | | | | |-- subbuf_num
>> | | | | `-- subbuf_size
> \-- overwrite (1/0)
>> | | | |-- metadata
>> | | | | |-- subbuf_num
>> | | | | `-- subbuf_size
> \-- overwrite
>> | | | |-- modules
>> | | | | |-- subbuf_num
>> | | | | `-- subbuf_size
> \-- overwrite
>> | | | |-- network
>> | | | | |-- subbuf_num
>> | | | | `-- subbuf_size
> \-- overwrite
>> | | | `-- processes
>> | | | |-- subbuf_num
>> | | | `-- subbuf_size
> \-- overwrite
>> | | `-- cpu
>> | | |-- mode
>> | | |-- subbuf_num
>> | | `-- subbuf_size
>> | |-- enabled
>> | `-- type ******new******
>
> Nope, the overwrite above will be more flexible. Then people can select
> per-channel which one they want in flight recorder mode (overwrite = 1).
> Default would be non-flight (normal mode, overwrite = 0). Hybrid is
> really just a combination of the two.
>
> Note that the metadata channel must be forced to "normal" mode. This is
> a special-case.
"type" in my question means const char *type in:
static int ltt_trace_create(const char *trace_name, const char *trace_type,
enum trace_mode mode,
unsigned subbuf_size_low, unsigned n_subbufs_low,
unsigned subbuf_size_med, unsigned n_subbufs_med,
unsigned subbuf_size_high, unsigned n_subbufs_high);
Its value is "relay" and "relay-locked", so i think we can add a control file named:
/debugfs/ltt/control/trace_name/channel/type (or transport) for it.
And, we will add function for set each channel's overwrite, so control tree will be:
`-- debugfs
`-- ltt
|-- buffers
| `-- ...
|-- control
| `-- trace1
| |-- alloc
| |-- channel
| | |-- control
| | | |-- interrupts
| | | | |-- subbuf_num
| | | | |-- subbuf_size
| | | | `-- overwrite
| | | |-- metadata
| | | | |-- subbuf_num
| | | | |-- subbuf_size
| | | | `-- overwrite
| | | |-- modules
| | | | |-- subbuf_num
| | | | |-- subbuf_size
| | | | `-- overwrite
| | | |-- network
| | | | |-- subbuf_num
| | | | |-- subbuf_size
| | | | `-- overwrite
| | | `-- processes
| | | |-- subbuf_num
| | | |-- subbuf_size
| | | `-- overwrite
| | `-- cpu
| | |-- subbuf_num
| | |-- subbuf_size
| | `-- overwrite
| |-- enabled
| `-- transport
`-- setup_trace
Changes are:
1: add transport to set ltt_trace_create()'s const char *trace_type.
2: delete cpu's mode file
3: add overwrite for each channel include cpu.
Questions:
1: make echo 1 > metadata/overwrite return error (*it is my prefer)
OR
make metadata/overwrite non-exist?
2: Why we put channel of cpu in channel/control/?
it looks some complex for user.
btw:
Following mail failed sending to you because our mail-server.
Cound you tell your opinion of this mail?
(you can see it in ltt-ml)
Date: Wed, 29 Oct 2008 12:04:30 +0800
To: Mathieu Desnoyers <compudj at krystal.dyndns.org>
Cc: ltt-dev at lists.casi.polymtl.ca
X-Mailer: Microsoft Outlook Express 6.00.2900.5512
From: Zhaolei <zhaolei@cn.fujitsu.com>
Subject: Re: [ltt-dev] [PATCH] Separate ltt_trace_create()
intoltt_trace_create() and ltt_trace_alloc()
next prev parent reply other threads:[~2008-10-31 1:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <B42BD3DB473F4EA5AC9BE686AEF2338E@zhaoleiwin>
2008-10-30 14:49 ` [ltt-dev] [PATCH] Separate ltt_trace_create()intoltt_trace_create() " Mathieu Desnoyers
2008-10-31 1:13 ` Zhaolei [this message]
2008-10-31 2:00 ` [ltt-dev] [PATCH] Separateltt_trace_create()intoltt_trace_create() " Zhaolei
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=38E91C920F734A5C8E06B14CB8F8F91D@zhaoleiwin \
--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