Commit 200bde27 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 404ca80e fd741edc
...@@ -404,6 +404,7 @@ static struct kvm_event *kvm_alloc_init_event(struct event_key *key) ...@@ -404,6 +404,7 @@ static struct kvm_event *kvm_alloc_init_event(struct event_key *key)
} }
event->key = *key; event->key = *key;
init_stats(&event->total.stats);
return event; return event;
} }
......
...@@ -374,7 +374,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) ...@@ -374,7 +374,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
session = perf_session__new(file, false, NULL); session = perf_session__new(file, false, NULL);
if (session == NULL) { if (session == NULL) {
pr_err("Not enough memory for reading perf file header\n"); pr_err("Perf session creation failed.\n");
return -1; return -1;
} }
......
...@@ -86,10 +86,17 @@ static int open_file_read(struct perf_data_file *file) ...@@ -86,10 +86,17 @@ static int open_file_read(struct perf_data_file *file)
static int open_file_write(struct perf_data_file *file) static int open_file_write(struct perf_data_file *file)
{ {
int fd;
if (check_backup(file)) if (check_backup(file))
return -1; return -1;
return open(file->path, O_CREAT|O_RDWR|O_TRUNC, S_IRUSR|S_IWUSR); fd = open(file->path, O_CREAT|O_RDWR|O_TRUNC, S_IRUSR|S_IWUSR);
if (fd < 0)
pr_err("failed to open %s : %s\n", file->path, strerror(errno));
return fd;
} }
static int open_file(struct perf_data_file *file) static int open_file(struct perf_data_file *file)
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <inttypes.h> #include <inttypes.h>
#include "symbol.h" #include "symbol.h"
#include "vdso.h"
#include <symbol/kallsyms.h> #include <symbol/kallsyms.h>
#include "debug.h" #include "debug.h"
...@@ -618,6 +619,7 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name, ...@@ -618,6 +619,7 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name,
GElf_Shdr shdr; GElf_Shdr shdr;
ss->adjust_symbols = (ehdr.e_type == ET_EXEC || ss->adjust_symbols = (ehdr.e_type == ET_EXEC ||
ehdr.e_type == ET_REL || ehdr.e_type == ET_REL ||
is_vdso_map(dso->short_name) ||
elf_section_by_name(elf, &ehdr, &shdr, elf_section_by_name(elf, &ehdr, &shdr,
".gnu.prelink_undo", ".gnu.prelink_undo",
NULL) != NULL); NULL) != NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment