Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966560AbbLRJLI (ORCPT ); Fri, 18 Dec 2015 04:11:08 -0500 Received: from terminus.zytor.com ([198.137.202.10]:52445 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934822AbbLRJJu (ORCPT ); Fri, 18 Dec 2015 04:09:50 -0500 Date: Fri, 18 Dec 2015 01:09:34 -0800 From: tip-bot for Jiri Olsa Message-ID: Cc: a.p.zijlstra@chello.nl, acme@redhat.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, jolsa@kernel.org, hpa@zytor.com, kan.liang@intel.com, namhyung@kernel.org, dsahern@gmail.com, mingo@kernel.org Reply-To: jolsa@kernel.org, kan.liang@intel.com, hpa@zytor.com, dsahern@gmail.com, namhyung@kernel.org, mingo@kernel.org, acme@redhat.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, a.p.zijlstra@chello.nl In-Reply-To: <1446734469-11352-6-git-send-email-jolsa@kernel.org> References: <1446734469-11352-6-git-send-email-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf evlist: Export id_add_fd() Git-Commit-ID: 1c59612de0264790698e32eb0368daf3fcba4c65 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2477 Lines: 61 Commit-ID: 1c59612de0264790698e32eb0368daf3fcba4c65 Gitweb: http://git.kernel.org/tip/1c59612de0264790698e32eb0368daf3fcba4c65 Author: Jiri Olsa AuthorDate: Thu, 5 Nov 2015 15:40:49 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 17 Dec 2015 15:15:19 -0300 perf evlist: Export id_add_fd() Will be used to storing the event IDs in evlist object so it get stored into perf.data file. Signed-off-by: Jiri Olsa Tested-by: Kan Liang Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1446734469-11352-6-git-send-email-jolsa@kernel.org [ Split from the patch storing the ids in the perf.data file ] Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/evlist.c | 6 +++--- tools/perf/util/evlist.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 8c44aad..b9eac0d 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -534,9 +534,9 @@ void perf_evlist__id_add(struct perf_evlist *evlist, struct perf_evsel *evsel, evsel->id[evsel->ids++] = id; } -static int perf_evlist__id_add_fd(struct perf_evlist *evlist, - struct perf_evsel *evsel, - int cpu, int thread, int fd) +int perf_evlist__id_add_fd(struct perf_evlist *evlist, + struct perf_evsel *evsel, + int cpu, int thread, int fd) { u64 read_data[4] = { 0, }; int id_idx = 1; /* The first entry is the counter value */ diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index a459fe7..139a500 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h @@ -97,6 +97,9 @@ perf_evlist__find_tracepoint_by_name(struct perf_evlist *evlist, void perf_evlist__id_add(struct perf_evlist *evlist, struct perf_evsel *evsel, int cpu, int thread, u64 id); +int perf_evlist__id_add_fd(struct perf_evlist *evlist, + struct perf_evsel *evsel, + int cpu, int thread, int fd); int perf_evlist__add_pollfd(struct perf_evlist *evlist, int fd); int perf_evlist__alloc_pollfd(struct perf_evlist *evlist); -- 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/