Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933345AbbKRT3B (ORCPT ); Wed, 18 Nov 2015 14:29:01 -0500 Received: from e18.ny.us.ibm.com ([129.33.205.208]:58907 "EHLO e18.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754619AbbKRT27 (ORCPT ); Wed, 18 Nov 2015 14:28:59 -0500 X-IBM-Helo: d01dlp02.pok.ibm.com X-IBM-MailFrom: sukadev@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Wed, 18 Nov 2015 11:26:04 -0800 From: Sukadev Bhattiprolu To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: ast@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] perf test: Add bpf-output event Message-ID: <20151118192603.GA374@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: Linux 2.0.32 on an i486 User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15111819-0045-0000-0000-0000026629B2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2457 Lines: 63 >From 8f71d55dd3e27e6ca2138e3ed6dfeceb1c00a426 Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu 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 --- 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/