summaryrefslogtreecommitdiff
path: root/tools/perf/util
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-05-01 08:24:59 +0200
committerIngo Molnar <mingo@kernel.org>2014-05-01 08:24:59 +0200
commit3617660e4e1618a888a2e3a4067224534302cb33 (patch)
tree2fc27376eafe21b878b4cdcc450179c60f8beb37 /tools/perf/util
parentaeffe2abc894b585acbe0923c0d4f21b4c5c1035 (diff)
parent8ab596afb97bc9e2f9140dc1d993e81749acff42 (diff)
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core
Pull perf/core improvements and fixes from Jiri Olsa: * Wire up perf_regs and unwind support for ARM64 (Jean Pihet) * Move u64_swap union to its single user's header, evsel.h (Borislav Petkov) * Fix for s390 to properly parse tracepoints plus test code (Alexander Yarygin) * Handle EINTR error for readn/writen (Namhyung Kim) Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/evsel.h5
-rw-r--r--tools/perf/util/parse-events.y12
-rw-r--r--tools/perf/util/types.h5
-rw-r--r--tools/perf/util/util.c2
4 files changed, 19 insertions, 5 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 0c9926cfb292..0c581d0d5eb6 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -91,6 +91,11 @@ struct perf_evsel {
char *group_name;
};
+union u64_swap {
+ u64 val64;
+ u32 val32[2];
+};
+
#define hists_to_evsel(h) container_of(h, struct perf_evsel, hists)
struct cpu_map;
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index 4eb67ec333f1..ac9db9f699f3 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -299,6 +299,18 @@ PE_PREFIX_MEM PE_VALUE sep_dc
}
event_legacy_tracepoint:
+PE_NAME '-' PE_NAME ':' PE_NAME
+{
+ struct parse_events_evlist *data = _data;
+ struct list_head *list;
+ char sys_name[128];
+ snprintf(&sys_name, 128, "%s-%s", $1, $3);
+
+ ALLOC_LIST(list);
+ ABORT_ON(parse_events_add_tracepoint(list, &data->idx, &sys_name, $5));
+ $$ = list;
+}
+|
PE_NAME ':' PE_NAME
{
struct parse_events_evlist *data = _data;
diff --git a/tools/perf/util/types.h b/tools/perf/util/types.h
index c51fa6b70a28..5f3689a3d085 100644
--- a/tools/perf/util/types.h
+++ b/tools/perf/util/types.h
@@ -16,9 +16,4 @@ typedef signed short s16;
typedef unsigned char u8;
typedef signed char s8;
-union u64_swap {
- u64 val64;
- u32 val32[2];
-};
-
#endif /* __PERF_TYPES_H */
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 9f66549562bd..7fff6be07f07 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -166,6 +166,8 @@ static ssize_t ion(bool is_read, int fd, void *buf, size_t n)
ssize_t ret = is_read ? read(fd, buf, left) :
write(fd, buf, left);
+ if (ret < 0 && errno == EINTR)
+ continue;
if (ret <= 0)
return ret;