aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/evsel.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-07-12 09:44:07 +0200
committerIngo Molnar <mingo@kernel.org>2013-07-12 09:44:07 +0200
commitc3a1b0cb290601a141ae327b884b3b9cc83a514d (patch)
treebc11a23330d1d1288c684c4f9a4e1bda18715a5e /tools/perf/util/evsel.c
parente5302920da9ef23f9d19d4e9ac85704cc25bee7a (diff)
parent750ade7e82709c2835cb221a7b6a9ef0a6a9c0ac (diff)
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/urgent fixes from Arnaldo Carvalho de Melo: * Fix some freeing bugs on the parsing error paths, from Adrian Hunter. * Update symbol_conf.nr_events when processing attribute events, fix from Adrian Hunter. * Fix missing increment in sample parsing when PERF_SAMPLE_STACK_USER is present, from Adrian Hunt. * Fix count parameter to read call in event_format__new, from David Ahern. * Remove -A/--append option, not working for a long time, from Jiri Olsa. * Remove -f/--force option, was a no-op for quite some time, from Jiri Olsa. * Fix -x/--exclude-other option for report command, from Jiri Olsa. * Cross build fixes, at least one for Android, from Joonsoo Kim. * Fix memory allocation fail check in mem{set,cpy} 'perf bench' workloads, from Kirill A. Shutemov. * Revert regression in configuration of Python support, from Michael Witten. * Fix -ldw/-lelf link test when static linking, from Mike Frysinger. * Fix issues with multiple children processing in perf_evlist__start_workload(), from Namhyung Kim. * Fix broken include in Context.xs ('perf script'), from Ramkumar Ramachandra. * Fixes for build problems, from Robert Richter. * Fix a typo of a Power7 event name, from Runzhen Wang. * Avoid sending SIGTERM to random processes in 'perf stat', fix from Stephane Eranian. * Fix per-socket output bug for uncore events in 'perf stat', from Stephane Eranian. * Fix vdso list searching, from Waiman Long. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r--tools/perf/util/evsel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 63b6f8c8edf2..c9c7494506a1 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -124,7 +124,7 @@ struct event_format *event_format__new(const char *sys, const char *name)
bf = nbf;
}
- n = read(fd, bf + size, BUFSIZ);
+ n = read(fd, bf + size, alloc_size - size);
if (n < 0)
goto out_free_bf;
size += n;
@@ -1170,7 +1170,7 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
} else {
data->user_stack.data = (char *)array;
array += size / sizeof(*array);
- data->user_stack.size = *array;
+ data->user_stack.size = *array++;
}
}