lkml.org 
[lkml]   [2015]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/32] perf tools: Enable passing bpf object file to --event


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.





\
 
 \ /
  Last update: 2015-08-29 03:21    [W:0.410 / U:1.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site