Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753082AbbH2Avm (ORCPT ); Fri, 28 Aug 2015 20:51:42 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:10358 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752899AbbH2Avl (ORCPT ); Fri, 28 Aug 2015 20:51:41 -0400 Message-ID: <55E101E6.7090401@huawei.com> Date: Sat, 29 Aug 2015 08:50:46 +0800 From: "Wangnan (F)" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: , CC: , , , , , , , , , , , Subject: Re: [PATCH 06/32] perf tools: Enable passing bpf object file to --event References: <1440745570-150857-1-git-send-email-wangnan0@huawei.com> <1440745570-150857-7-git-send-email-wangnan0@huawei.com> In-Reply-To: <1440745570-150857-7-git-send-email-wangnan0@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.66.109] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1775 Lines: 55 On 2015/8/28 15:05, Wang Nan wrote: > diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c > index ef5fde6..24c8b63 100644 > --- a/tools/perf/builtin-trace.c > +++ b/tools/perf/builtin-trace.c > @@ -3090,6 +3090,7 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused) > if (trace.evlist->nr_entries > 0) > evlist__set_evsel_handler(trace.evlist, trace__event_handler); > > + /* trace__record calls cmd_record, which calls bpf__clear() */ > if ((argc >= 1) && (strcmp(argv[0], "record") == 0)) > return trace__record(&trace, argc-1, &argv[1]); > > @@ -3100,7 +3101,8 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused) > if (!trace.trace_syscalls && !trace.trace_pgfaults && > trace.evlist->nr_entries == 0 /* Was --events used? */) { > pr_err("Please specify something to trace.\n"); > - return -1; > + err = -1; > + goto out; > } > > if (output_name != NULL) { > @@ -3159,5 +3161,6 @@ out_close: > if (output_name != NULL) > fclose(trace.output); > out: > + bpf__clear(); > return err; > } > Sorry, here is a silly mistake that I miss #include "bpf-loader.h" at the head of builtin-trace.c. In my default environment builtin-trace.c is not compiled so I find this problem today when I compile it on another machine. I'll fix in my tree. Arnaldo, since you suggest Ingo to pull directly, shall I make another pull request with the whole 32 patches sent for fixing that line? Thank you. -- 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/