Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1433681
| From | Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 1/4] perf: Utility function to fetch arch |
| Date | 2016-06-29 13:20 +0200 |
| Message-ID | <rPlHb-3vT-11@gated-at.bofh.it> (permalink) |
| References | <rPlHb-3vT-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Add Utility function to fetch arch using evsel. (evsel->env->arch)
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
---
Changes in v2:
- No changes
tools/perf/util/evsel.c | 7 +++++++
tools/perf/util/evsel.h | 2 ++
2 files changed, 9 insertions(+)
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 1d8f2bb..0fea724 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2422,3 +2422,10 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
err, strerror_r(err, sbuf, sizeof(sbuf)),
perf_evsel__name(evsel));
}
+
+char *perf_evsel__env_arch(struct perf_evsel *evsel)
+{
+ if (evsel && evsel->evlist && evsel->evlist->env)
+ return evsel->evlist->env->arch;
+ return NULL;
+}
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 828ddd1..86fed7a 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -435,4 +435,6 @@ typedef int (*attr__fprintf_f)(FILE *, const char *, const char *, void *);
int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
attr__fprintf_f attr__fprintf, void *priv);
+char *perf_evsel__env_arch(struct perf_evsel *evsel);
+
#endif /* __PERF_EVSEL_H */
--
2.5.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/4] perf annotate: Enable cross arch annotate Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2016-06-29 13:20 +0200
[PATCH v2 2/4] perf annotate: Enable cross arch annotate Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2016-06-29 13:20 +0200
[PATCH v2 3/4] perf annotate: add powerpc support Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2016-06-29 13:20 +0200
Re: [PATCH v2 3/4] perf annotate: add powerpc support Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2016-06-29 17:30 +0200
Re: [PATCH v2 3/4] perf annotate: add powerpc support "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-06-29 18:30 +0200
[PATCH v2 1/4] perf: Utility function to fetch arch Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2016-06-29 13:20 +0200
[PATCH v2 4/4] perf annotate: Define macro for arch names Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2016-06-29 13:20 +0200
csiph-web