Re: Is it a good idea to export certain internal structure declaration to make bcc/ebpf happier?

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

 




On 2019/4/2 下午5:34, Johannes Thumshirn wrote:
> On 02/04/2019 10:45, Qu Wenruo wrote:
>> OK, after some though, the overhead for a new tracepoint is pretty small.
>> The only overhead when the tracepoint is disabled is, a ktimer_get_ns()
>> call at the beginning of btrfs_tree_lock() and btrfs_tree_read_lock().
>
> If you only need the ktime_get_ns() call for the tracepoint, you can
> wrap it in sth. like this IIRC:
>
> if (trace_btrfs_tree_lock_enabled())
> 	start_time = ktime_get_ns();
>
> [...]
>
> trace_btrfs_tree_lock(start_time, end_time);

Oh, I just get your email seconds after I send out my initial patch.

This helps a lot!

I'll update the patch.

Thanks,
Qu

>
> Byte,
> 	Johannes
>




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux