Skip to content

Commit 200bde2

Browse files
committed
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf tooling fixes from Ingo Molnar: "Three small tooling fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf tools: Improve error reporting perf tools: Adjust symbols in VDSO perf kvm: Fix 'Min time' counting in report command
2 parents 404ca80 + fd741ed commit 200bde2

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

tools/perf/builtin-kvm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ static struct kvm_event *kvm_alloc_init_event(struct event_key *key)
404404
}
405405

406406
event->key = *key;
407+
init_stats(&event->total.stats);
407408
return event;
408409
}
409410

tools/perf/builtin-record.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
374374

375375
session = perf_session__new(file, false, NULL);
376376
if (session == NULL) {
377-
pr_err("Not enough memory for reading perf file header\n");
377+
pr_err("Perf session creation failed.\n");
378378
return -1;
379379
}
380380

tools/perf/util/data.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,17 @@ static int open_file_read(struct perf_data_file *file)
8686

8787
static int open_file_write(struct perf_data_file *file)
8888
{
89+
int fd;
90+
8991
if (check_backup(file))
9092
return -1;
9193

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;
93100
}
94101

95102
static int open_file(struct perf_data_file *file)

tools/perf/util/symbol-elf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <inttypes.h>
77

88
#include "symbol.h"
9+
#include "vdso.h"
910
#include <symbol/kallsyms.h>
1011
#include "debug.h"
1112

@@ -618,6 +619,7 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name,
618619
GElf_Shdr shdr;
619620
ss->adjust_symbols = (ehdr.e_type == ET_EXEC ||
620621
ehdr.e_type == ET_REL ||
622+
is_vdso_map(dso->short_name) ||
621623
elf_section_by_name(elf, &ehdr, &shdr,
622624
".gnu.prelink_undo",
623625
NULL) != NULL);

0 commit comments

Comments
 (0)