Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965712AbbEEQe0 (ORCPT ); Tue, 5 May 2015 12:34:26 -0400 Received: from mail4.hitachi.co.jp ([133.145.228.5]:55648 "EHLO mail4.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965494AbbEEQeX (ORCPT ); Tue, 5 May 2015 12:34:23 -0400 Message-ID: <5548F106.3010902@hitachi.com> Date: Wed, 06 May 2015 01:34:14 +0900 From: Masami Hiramatsu Organization: Hitachi, Ltd., Japan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Wang Nan , ast@plumgrid.com, davem@davemloft.net, acme@kernel.org, mingo@redhat.com, a.p.zijlstra@chello.nl, jolsa@kernel.org CC: lizefan@kernel.org, linux-kernel@vger.kernel.org, pi3orama@163.com, hekuang@huawei.com Subject: Re: [RFC PATCH 21/22] perf bpf: probe at kprobe points. References: <1430391165-30267-1-git-send-email-wangnan0@huawei.com> <1430391165-30267-22-git-send-email-wangnan0@huawei.com> In-Reply-To: <1430391165-30267-22-git-send-email-wangnan0@huawei.com> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1525 Lines: 55 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, 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); > -- Masami HIRAMATSU Linux Technology Research Center, System Productivity Research Dept. Center for Technology Innovation - Systems Engineering Hitachi, Ltd., Research & Development Group E-mail: masami.hiramatsu.pt@hitachi.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/