diff options
Diffstat (limited to 'tools/perf/util')
-rwxr-xr-x | tools/perf/util/PERF-VERSION-GEN | 3 | ||||
-rw-r--r-- | tools/perf/util/evlist.c | 2 | ||||
-rw-r--r-- | tools/perf/util/evsel.h | 5 | ||||
-rw-r--r-- | tools/perf/util/session.c | 4 | ||||
-rw-r--r-- | tools/perf/util/sort.h | 1 |
5 files changed, 7 insertions, 8 deletions
diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN index ce7a804b2951..39f17507578d 100755 --- a/tools/perf/util/PERF-VERSION-GEN +++ b/tools/perf/util/PERF-VERSION-GEN @@ -19,6 +19,9 @@ if test -d ../../.git -o -f ../../.git then TAG=$(git describe --abbrev=0 --match "v[0-9].[0-9]*" 2>/dev/null ) CID=$(git log -1 --abbrev=4 --pretty=format:"%h" 2>/dev/null) && CID="-g$CID" +elif test -f ../../PERF-VERSION-FILE +then + TAG=$(cut -d' ' -f3 ../../PERF-VERSION-FILE | sed -e 's/\"//g') fi if test -z "$TAG" then diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 1c173ccb0ef2..b939221efd8d 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -255,7 +255,7 @@ int perf_evlist__add_newtp(struct perf_evlist *evlist, if (evsel == NULL) return -1; - evsel->handler.func = handler; + evsel->handler = handler; perf_evlist__add(evlist, evsel); return 0; } diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index 5aa68cddc7d9..64ec8e1a7a28 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h @@ -74,10 +74,7 @@ struct perf_evsel { off_t id_offset; }; struct cgroup_sel *cgrp; - struct { - void *func; - void *data; - } handler; + void *handler; struct cpu_map *cpus; unsigned int sample_size; int id_pos; diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 0ce46943d627..f36d24a02445 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1650,9 +1650,9 @@ int __perf_session__set_tracepoints_handlers(struct perf_session *session, continue; err = -EEXIST; - if (evsel->handler.func != NULL) + if (evsel->handler != NULL) goto out; - evsel->handler.func = assocs[i].handler; + evsel->handler = assocs[i].handler; } err = 0; diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index f4cc147e0220..43e5ff42a609 100644 --- a/tools/perf/util/sort.h +++ b/tools/perf/util/sort.h @@ -22,7 +22,6 @@ #include "parse-events.h" #include "thread.h" -#include "sort.h" extern regex_t parent_regex; extern const char *sort_order; |