I'v read this blog post

https://facebookmicrosites.github.io/bpf/blog/2020/02/19/bpf-portability-and-co-re.html

And want to apply this technique to my program:

> 
> extern u32 LINUX_KERNEL_VERSION __kconfig; extern u32 CONFIG_HZ __kconfig;
> u64 utime_ns; if (LINUX_KERNEL_VERSION >= KERNEL_VERSION( 4 , 11 , 0 ))
> utime_ns = BPF_CORE_READ(task, utime); else /* convert jiffies to
> nanoseconds */ utime_ns = BPF_CORE_READ(task, utime) * ( 1000000000U L /
> CONFIG_HZ);


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#1974): https://lists.iovisor.org/g/iovisor-dev/message/1974
Mute This Topic: https://lists.iovisor.org/mt/81401199/21656
Group Owner: [email protected]
Unsubscribe: https://lists.iovisor.org/g/iovisor-dev/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to