lkml.org 
[lkml]   [2015]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [EXPERIENCE] My experience on using perf record BPF filter on a real usecase
On 6/4/15 3:17 AM, Wangnan (F) wrote:
> Hi all,
>
> I'd like to share my exprience on using 'perf record' BPF filter in a
> real usecase to show the power and shortcome in my patch series:

thanks for sharing!

> Here is another inconvenience. Currently I only concern on write
> syscall issued by iozone. However, without '-a' I'm unable to collect
> information of the locker. If I want to filter sys_{enter,exit}_write
> belong to iozone out using eBPF, I need to implement another function
> like BPF_FUNC_git_comm. Another method is to use perf '--filter' after
> the two events. However it looks strange to use two filter mechanisms
> together. This time I choose to do filtering offline using perf script.

that doesn't sound clean.
btw, I've been playing for a while with
bpf_get_current_task_info() helper:
https://git.kernel.org/cgit/linux/kernel/git/ast/bpf.git/commit/?id=c5453ffa107ddf95a91920cc947bb8bf9eab16d6
I think it's a better mechanism.
The user can get pid only via:
u32 pid = 0;
bpf_get_current_task_info(&pid, sizeof(pid));
or full pid + comm + future fields via full 'struct bpf_task_info'
Thoughts?



\
 
 \ /
  Last update: 2015-06-10 09:01    [W:0.088 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site