[ltt-dev] [PATCH v2 2/3] Export ltt_root_dentry forltt_channel_control and other

Zhaolei zhaolei at cn.fujitsu.com
Tue Nov 11 01:33:53 EST 2008


* From: "Mathieu Desnoyers" <compudj at krystal.dyndns.org>
>* Zhaolei (zhaolei at cn.fujitsu.com) wrote:
>> ltt_channel_control and other controls in future need to create
>> subdir in ltt's debugfs dir.
>> 
>> Signed-off-by: Zhao Lei <zhaolei at cn.fujitsu.com>
>> ---
>>  include/linux/ltt-relay.h |    5 +++++
>>  ltt/ltt-relay-locked.c    |    4 +++-
>>  ltt/ltt-relay.c           |    4 +++-
>>  3 files changed, 11 insertions(+), 2 deletions(-)
>> 
>> diff --git a/include/linux/ltt-relay.h b/include/linux/ltt-relay.h
>> index 1225a6a..7f29eb1 100644
>> --- a/include/linux/ltt-relay.h
>> +++ b/include/linux/ltt-relay.h
>> @@ -175,5 +175,10 @@ extern void ltt_relay_close(struct rchan *chan);
>>   */
>>  extern const struct file_operations ltt_relay_file_operations;
>>  
>> +/*
>> + * exported ltt's debugfs dir for other control interface module
>> + */
>> +extern struct dentry *ltt_root_dentry;
>> +
>>  #endif /* _LINUX_LTT_RELAY_H */
>>  
>> diff --git a/ltt/ltt-relay-locked.c b/ltt/ltt-relay-locked.c
>> index c40bdb2..0d9919a 100644
>> --- a/ltt/ltt-relay-locked.c
>> +++ b/ltt/ltt-relay-locked.c
>> @@ -122,7 +122,9 @@ static inline int last_tsc_overflow(struct ltt_channel_buf_struct *ltt_buf,
>>  }
>>  #endif
>>  
>> -static struct dentry *ltt_root_dentry;
>> +struct dentry *ltt_root_dentry;
>> +EXPORT_SYMBOL_GPL(ltt_root_dentry);
>> +
>>  static struct file_operations ltt_file_operations;
>>  
>>  /*
>> diff --git a/ltt/ltt-relay.c b/ltt/ltt-relay.c
>> index c6e1d52..358374f 100644
>> --- a/ltt/ltt-relay.c
>> +++ b/ltt/ltt-relay.c
>> @@ -131,7 +131,9 @@ static inline int last_tsc_overflow(struct ltt_channel_buf_struct *ltt_buf,
>>  }
>>  #endif
>>  
>> -static struct dentry *ltt_root_dentry;
>> +struct dentry *ltt_root_dentry;
>> +EXPORT_SYMBOL_GPL(ltt_root_dentry);
>> +
> 
> Hrm, I think it will cause a double declaration of ltt_root_dentry if
> both ltt-relay and ltt-relay-locked are loaded. ltt_root_dentry should
> probably sit in ltt-core.c.
Hello, Mathieu

I agree it.

btw, I am write v3 of ltt-trace-control to support overwrite mode on each channel.
I'll post it to ltt-ml today.

And we can't delete parent dir by echo 1 > debugfs/ltt/control/tracename/destroy.
(I have wrote a source to impl it, but result is we can't delete whole parent dir)
So we can echo trace_name > debugfs/ltt/destory_trace.

> 
> Mathieu
> 
> 
>>  static struct file_operations ltt_file_operations;
>>  
>>  /*
>> -- 
>> 1.5.5.3
>> 
>> 
>> 
>> _______________________________________________
>> ltt-dev mailing list
>> ltt-dev at lists.casi.polymtl.ca
>> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>> 
> 
> -- 
> Mathieu Desnoyers
> OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
> 
>


More information about the lttng-dev mailing list