[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55497E3F.5090404@huawei.com>
Date: Wed, 6 May 2015 10:36:47 +0800
From: Wang Nan <wangnan0@...wei.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
<ast@...mgrid.com>, <davem@...emloft.net>, <acme@...nel.org>,
<mingo@...hat.com>, <a.p.zijlstra@...llo.nl>, <jolsa@...nel.org>
CC: <lizefan@...nel.org>, <linux-kernel@...r.kernel.org>,
<pi3orama@....com>, <hekuang@...wei.com>
Subject: Re: [RFC PATCH 21/22] perf bpf: probe at kprobe points.
On 2015/5/6 0:34, Masami Hiramatsu wrote:
> At least we need a description what this patch does... what will be
> done with this patch, and what the user will see and what/how they can do.
>
> Thank you,
>
Sorry. I manually checked patch commit message after 'git format-patch' but
forgot this one. I'll fix it in the next version.
What this patch do is simply calls 'add_perf_probe_events' (originally used for
perf probe) to create kprobe events. Previous patch has puts all events into a
uniform array.
> On 2015/04/30 19:52, Wang Nan wrote:
>> ---
>> tools/perf/util/bpf-loader.c | 18 ++++++++++++++++++
>> 1 file changed, 18 insertions(+)
>>
>> diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
>> index 208f5e8..186a3d0 100644
>> --- a/tools/perf/util/bpf-loader.c
>> +++ b/tools/perf/util/bpf-loader.c
>> @@ -952,8 +952,26 @@ out:
>> return -1;
>> }
>>
>> +static int bpf_probe(void)
>> +{
>> + int err = add_perf_probe_events(params.event_array,
>> + params.nr_events,
>> + MAX_PROBES, 0);
>> + /* add_perf_probe_events return negative when fail */
>> + if (err < 0)
>> + pr_err("bpf probe: failed to probe events\n");
>> +
>> + return err < 0 ? err : 0;
>> +}
>> +
>> int bpf__run(void)
>> {
>> + int err;
>> +
>> + pr_debug("bpf: probing\n");
>> + if ((err = bpf_probe()))
>> + return err;
>> +
>> pr_info("BPF is running. Use Ctrl-c to stop.\n");
>> while(1)
>> sleep(1);
>>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists