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 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);

Byte,
	Johannes
-- 
Johannes Thumshirn                            SUSE Labs Filesystems
jthumshirn@xxxxxxx                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850



[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