Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1272496

[PATCH] perf test: Add bpf-output event

From Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [PATCH] perf test: Add bpf-output event
Date 2015-11-18 20:30 +0100
Message-ID <qwgAy-7es-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From 8f71d55dd3e27e6ca2138e3ed6dfeceb1c00a426 Mon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Date: Wed, 18 Nov 2015 19:06:08 -0500
Subject: [PATCH] perf test: Add bpf-output event

The kernel has added support for 'PERF_COUNT_SW_BPF_OUTPUT' but that is
missing from the perf tool. Among other things, results in the 'roundtrip
evsel->name check' test case of 'perf test' failing on Powerpc.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
---
 tools/perf/util/evsel.c        | 1 +
 tools/perf/util/parse-events.c | 4 ++++
 tools/perf/util/parse-events.l | 1 +
 3 files changed, 6 insertions(+)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 397fb4e..2033632 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -342,6 +342,7 @@ const char *perf_evsel__sw_names[PERF_COUNT_SW_MAX] = {
 	"alignment-faults",
 	"emulation-faults",
 	"dummy",
+	"bpf-output",
 };
 
 static const char *__perf_evsel__sw_name(u64 config)
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index e48d9da..40ae92a 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -124,6 +124,10 @@ struct event_symbol event_symbols_sw[PERF_COUNT_SW_MAX] = {
 		.symbol = "dummy",
 		.alias  = "",
 	},
+	[PERF_COUNT_SW_BPF_OUTPUT] = {
+		.symbol = "bpf-output",
+		.alias  = "",
+	},
 };
 
 #define __PERF_EVENT_FIELD(config, name) \
diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
index 58c5831..380298d 100644
--- a/tools/perf/util/parse-events.l
+++ b/tools/perf/util/parse-events.l
@@ -238,6 +238,7 @@ cpu-migrations|migrations			{ return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COU
 alignment-faults				{ return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_ALIGNMENT_FAULTS); }
 emulation-faults				{ return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_EMULATION_FAULTS); }
 dummy						{ return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_DUMMY); }
+bpf-output						{ return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_BPF_OUTPUT); }
 
 	/*
 	 * We have to handle the kernel PMU event cycles-ct/cycles-t/mem-loads/mem-stores separately.
-- 
1.8.3.1

--
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/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] perf test: Add bpf-output event Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> - 2015-11-18 20:30 +0100
  Re: [PATCH] perf test: Add bpf-output event Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-11-18 22:00 +0100
    Re: [PATCH] perf test: Add bpf-output event Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2015-11-19 00:20 +0100
      Re: [PATCH] perf test: Add bpf-output event "Wangnan (F)" <wangnan0@huawei.com> - 2015-11-19 02:40 +0100
        Re: [PATCH] perf test: Add bpf-output event Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> - 2015-11-20 00:40 +0100
          Re: [PATCH] perf test: Add bpf-output event "Wangnan (F)" <wangnan0@huawei.com> - 2015-11-20 03:30 +0100

csiph-web