aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-04-20 03:53:55 -0400
committerIngo Molnar <mingo@kernel.org>2014-04-20 03:53:55 -0400
commitfd741edc25600e1660abd00b5c1bbe967018c6a0 (patch)
tree2b0b1e74a2859a102e17cdfe96dc187db64481e0
parent24223657806a0ebd0ae5c9caaf7b021091889cf2 (diff)
parentffa91880a992ec1aaee4b4f7c9ddffda0c277ba9 (diff)
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/urgent
Pull perf/urgent fixes from Jiri Olsa: User visible changes: * Adjust symbols in VDSO to properly resolve its function names (Vladimir Nikulichev) * Improve error reporting for record session failure (Adrien BAK) * Fix 'Min time' counting in report command (Alexander Yarygin) Signed-off-by: Jiri Olsa <jolsa@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--tools/perf/builtin-kvm.c1
-rw-r--r--tools/perf/builtin-record.c2
-rw-r--r--tools/perf/util/data.c9
-rw-r--r--tools/perf/util/symbol-elf.c2
4 files changed, 12 insertions, 2 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 21c164b8f9db..0f1e5a2f6ad7 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -404,6 +404,7 @@ static struct kvm_event *kvm_alloc_init_event(struct event_key *key)
404 } 404 }
405 405
406 event->key = *key; 406 event->key = *key;
407 init_stats(&event->total.stats);
407 return event; 408 return event;
408} 409}
409 410
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index eb524f91bffe..8ce62ef7f6c3 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -374,7 +374,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
374 374
375 session = perf_session__new(file, false, NULL); 375 session = perf_session__new(file, false, NULL);
376 if (session == NULL) { 376 if (session == NULL) {
377 pr_err("Not enough memory for reading perf file header\n"); 377 pr_err("Perf session creation failed.\n");
378 return -1; 378 return -1;
379 } 379 }
380 380
diff --git a/tools/perf/util/data.c b/tools/perf/util/data.c
index 1fbcd8bdc11b..55de44ecebef 100644
--- a/tools/perf/util/data.c
+++ b/tools/perf/util/data.c
@@ -86,10 +86,17 @@ static int open_file_read(struct perf_data_file *file)
86 86
87static int open_file_write(struct perf_data_file *file) 87static int open_file_write(struct perf_data_file *file)
88{ 88{
89 int fd;
90
89 if (check_backup(file)) 91 if (check_backup(file))
90 return -1; 92 return -1;
91 93
92 return open(file->path, O_CREAT|O_RDWR|O_TRUNC, S_IRUSR|S_IWUSR); 94 fd = open(file->path, O_CREAT|O_RDWR|O_TRUNC, S_IRUSR|S_IWUSR);
95
96 if (fd < 0)
97 pr_err("failed to open %s : %s\n", file->path, strerror(errno));
98
99 return fd;
93} 100}
94 101
95static int open_file(struct perf_data_file *file) 102static int open_file(struct perf_data_file *file)
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 3b7dbf51d4a9..6864661a79dd 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -6,6 +6,7 @@
6#include <inttypes.h> 6#include <inttypes.h>
7 7
8#include "symbol.h" 8#include "symbol.h"
9#include "vdso.h"
9#include <symbol/kallsyms.h> 10#include <symbol/kallsyms.h>
10#include "debug.h" 11#include "debug.h"
11 12
@@ -618,6 +619,7 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name,
618 GElf_Shdr shdr; 619 GElf_Shdr shdr;
619 ss->adjust_symbols = (ehdr.e_type == ET_EXEC || 620 ss->adjust_symbols = (ehdr.e_type == ET_EXEC ||
620 ehdr.e_type == ET_REL || 621 ehdr.e_type == ET_REL ||
622 is_vdso_map(dso->short_name) ||
621 elf_section_by_name(elf, &ehdr, &shdr, 623 elf_section_by_name(elf, &ehdr, &shdr,
622 ".gnu.prelink_undo", 624 ".gnu.prelink_undo",
623 NULL) != NULL); 625 NULL) != NULL);