Re: [PATCH tracepoints v3] nilfs2: add a tracepoint for transaction events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 11, 2014 at 3:14 PM, Ryusuke Konishi
<konishi.ryusuke@xxxxxxxxxxxxx> wrote:
> On Sun, 28 Sep 2014 19:22:44 +0900, Mitake Hitoshi wrote:
>> This patch adds a tracepoint for transaction events of nilfs. With the
>> tracepoint, these events can be tracked: begin, abort, commit,
>> trylock, lock, and unlock. Basically, these events have corresponding
>> functions e.g. begin event corresponds nilfs_transaction_begin(). The
>> unlock event is an exception. It corresponds to the iteration in
>> nilfs_transaction_lock().
>>
>> Only one tracepoint is introcued: nilfs2_transaction_transition. The
>> above events are distinguished with newly introduced enum. With this
>> tracepoint, we can analyse a critical section of segment constructoin.
>>
>> Sample output by tpoint of perf-tools:
>>               cp-4457  [000] ...1    63.266220: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800bf5ccc58 count = 1 flags = 9 state = BEGIN
>>               cp-4457  [000] ...1    63.266221: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800bf5ccc58 count = 0 flags = 9 state = COMMIT
>>               cp-4457  [000] ...1    63.266221: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800bf5ccc58 count = 0 flags = 9 state = COMMIT
>>         segctord-4371  [001] ...1    68.261196: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 0 flags = 10 state = TRYLOCK
>>         segctord-4371  [001] ...1    68.261280: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 0 flags = 10 state = LOCK
>>         segctord-4371  [001] ...1    68.261877: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 1 flags = 10 state = BEGIN
>>         segctord-4371  [001] ...1    68.262116: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 0 flags = 18 state = COMMIT
>>         segctord-4371  [001] ...1    68.265032: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 0 flags = 18 state = UNLOCK
>>         segctord-4371  [001] ...1   132.376847: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 0 flags = 10 state = TRYLOCK
>>
>> This patch also does trivial cleaning of comma usage in collection
>> stage transition event for consistent coding style.
>>
>> Signed-off-by: Hitoshi Mitake <mitake.hitoshi@xxxxxxxxxxxxx>
> <snip>
>> -         TP_printk("sci = %p, stage = %s",
>> +         TP_printk("sci = %p stage = %s",
>>                     __entry->sci,
>>                     show_collection_stage(__entry->stage))
> <snip>
>> +         TP_printk("sb = %p ti = %p count = %d flags = %x state = %s",
>> +                   __entry->sb,
>> +                   __entry->ti,
>> +                   __entry->count,
>> +                   __entry->flags,
>> +                   show_transaction_state(__entry->state))
>
> May I change these as follows ?
>
>             TP_printk("sci=%p stage=%s",
>                       __entry->sci,
>                       show_collection_stage(__entry->stage))
>             TP_printk("sb=%p ti=%p count=%d flags=%x state=%s",
>                       __entry->sb,
>                       __entry->ti,
>                       __entry->count,
>                       __entry->flags,
>                       show_transaction_state(__entry->state))

Sure, should I send v4?

>
> Or, is there a reason that you left space chars around "=" symbol ?

The TP_printk() just follows btrfs's style. Seems that there's no
strict guide line about the style.

Thanks,
Hitoshi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux BTRFS]     [Linux CIFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux