[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-384c4ad192a01fe235c7ac9e9fd8605d12a807e8@git.kernel.org>
Date: Tue, 30 Jul 2019 12:00:03 -0700
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, hpa@...or.com, namhyung@...nel.org,
peterz@...radead.org, acme@...hat.com, mpetlan@...hat.com,
alexey.budankov@...ux.intel.com, jolsa@...nel.org,
ak@...ux.intel.com, alexander.shishkin@...ux.intel.com,
linux-kernel@...r.kernel.org, tglx@...utronix.de
Subject: [tip:perf/core] libperf: Add perf_evsel__attr() function
Commit-ID: 384c4ad192a01fe235c7ac9e9fd8605d12a807e8
Gitweb: https://git.kernel.org/tip/384c4ad192a01fe235c7ac9e9fd8605d12a807e8
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Sun, 21 Jul 2019 13:24:57 +0200
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 29 Jul 2019 18:34:46 -0300
libperf: Add perf_evsel__attr() function
Add a perf_evsel__attr() function to get attr pointer from a perf_evsel
instance.
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Alexey Budankov <alexey.budankov@...ux.intel.com>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: Michael Petlan <mpetlan@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/20190721112506.12306-71-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/lib/evsel.c | 5 +++++
tools/perf/lib/include/perf/evsel.h | 1 +
tools/perf/lib/libperf.map | 1 +
3 files changed, 7 insertions(+)
diff --git a/tools/perf/lib/evsel.c b/tools/perf/lib/evsel.c
index 8dbe0e841b8f..24abc80dd767 100644
--- a/tools/perf/lib/evsel.c
+++ b/tools/perf/lib/evsel.c
@@ -225,3 +225,8 @@ struct perf_thread_map *perf_evsel__threads(struct perf_evsel *evsel)
{
return evsel->threads;
}
+
+struct perf_event_attr *perf_evsel__attr(struct perf_evsel *evsel)
+{
+ return &evsel->attr;
+}
diff --git a/tools/perf/lib/include/perf/evsel.h b/tools/perf/lib/include/perf/evsel.h
index ae9f7eeb53a2..4388667f265c 100644
--- a/tools/perf/lib/include/perf/evsel.h
+++ b/tools/perf/lib/include/perf/evsel.h
@@ -34,5 +34,6 @@ LIBPERF_API int perf_evsel__enable(struct perf_evsel *evsel);
LIBPERF_API int perf_evsel__disable(struct perf_evsel *evsel);
LIBPERF_API struct perf_cpu_map *perf_evsel__cpus(struct perf_evsel *evsel);
LIBPERF_API struct perf_thread_map *perf_evsel__threads(struct perf_evsel *evsel);
+LIBPERF_API struct perf_event_attr *perf_evsel__attr(struct perf_evsel *evsel);
#endif /* __LIBPERF_EVSEL_H */
diff --git a/tools/perf/lib/libperf.map b/tools/perf/lib/libperf.map
index 2068e3d52227..e24d3cec01c1 100644
--- a/tools/perf/lib/libperf.map
+++ b/tools/perf/lib/libperf.map
@@ -23,6 +23,7 @@ LIBPERF_0.0.1 {
perf_evsel__read;
perf_evsel__cpus;
perf_evsel__threads;
+ perf_evsel__attr;
perf_evlist__new;
perf_evlist__delete;
perf_evlist__open;
Powered by blists - more mailing lists