Re: [PATCH v9 4/4] perf tools: add support for libpfm4

From: Jiri Olsa
Date: Thu Apr 16 2020 - 05:56:16 EST


On Wed, Apr 15, 2020 at 11:35:51PM -0700, Ian Rogers wrote:

SNIP

> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index 1ab349abe904..80ac598f125b 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -43,6 +43,7 @@
> #include "util/time-utils.h"
> #include "util/units.h"
> #include "util/bpf-event.h"
> +#include "util/pfm.h"
> #include "asm/bug.h"
> #include "perf.h"
>
> @@ -64,6 +65,9 @@
> #include <linux/zalloc.h>
> #include <linux/bitmap.h>
>
> +
> +
> +

extra new lines..

jirka

> struct switch_output {
> bool enabled;
> bool signal;
> @@ -2421,6 +2425,11 @@ static struct option __record_options[] = {
> #endif
> OPT_CALLBACK(0, "max-size", &record.output_max_size,
> "size", "Limit the maximum size of the output file", parse_output_max_size),
> +#ifdef HAVE_LIBPFM
> + OPT_CALLBACK(0, "pfm-events", &record.evlist, "event",
> + "libpfm4 event selector. use 'perf list' to list available events",
> + parse_libpfm_events_option),
> +#endif
> OPT_END()
> };

SNIP