aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-11-12 01:37:53 -0500
committerIngo Molnar <mingo@kernel.org>2015-11-12 01:37:53 -0500
commit492cf7a0be68676382050daa06335f56db2cdb08 (patch)
tree5dc68fcd308f62b3081773a941326e78af9418fa /tools
parentb71b437eedaed985062492565d9d421d975ae845 (diff)
parent5602ea09c19e85557f2b4d30be1d6ba349b7a038 (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: - Add missing newlines to some pr_err() calls (Arnaldo Carvalho de Melo) - Print full source file paths when using 'perf annotate --print-line --full-paths' (Michael Petlan) - Fix 'perf probe -d' when just one out of uprobes and kprobes is enabled (Wang Nan) - Add compiler.h to list.h to fix 'make perf-tar-src-pkg' generated tarballs, i.e. out of tree building (Arnaldo Carvalho de Melo) - Add the llvm-src-base.c and llvm-src-kbuild.c files, generated by the 'perf test' LLVM entries, when running it in-tree, to .gitignore (Yunlong Song) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/include/linux/list.h1
-rw-r--r--tools/perf/tests/.gitignore2
-rw-r--r--tools/perf/util/annotate.c1
-rw-r--r--tools/perf/util/probe-file.c6
-rw-r--r--tools/perf/util/session.c8
5 files changed, 14 insertions, 4 deletions
diff --git a/tools/include/linux/list.h b/tools/include/linux/list.h
index 76b014c96893..a017f1595676 100644
--- a/tools/include/linux/list.h
+++ b/tools/include/linux/list.h
@@ -1,3 +1,4 @@
1#include <linux/compiler.h>
1#include <linux/kernel.h> 2#include <linux/kernel.h>
2#include <linux/types.h> 3#include <linux/types.h>
3 4
diff --git a/tools/perf/tests/.gitignore b/tools/perf/tests/.gitignore
new file mode 100644
index 000000000000..489fc9ffbcb0
--- /dev/null
+++ b/tools/perf/tests/.gitignore
@@ -0,0 +1,2 @@
1llvm-src-base.c
2llvm-src-kbuild.c
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index f2974da0185a..1dd1949b0e79 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1620,6 +1620,7 @@ int symbol__tty_annotate(struct symbol *sym, struct map *map,
1620 len = symbol__size(sym); 1620 len = symbol__size(sym);
1621 1621
1622 if (print_lines) { 1622 if (print_lines) {
1623 srcline_full_filename = full_paths;
1623 symbol__get_source_line(sym, map, evsel, &source_line, len); 1624 symbol__get_source_line(sym, map, evsel, &source_line, len);
1624 print_summary(&source_line, dso->long_name); 1625 print_summary(&source_line, dso->long_name);
1625 } 1626 }
diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c
index 89dbeb92c68e..e3b3b92e4458 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -138,6 +138,9 @@ struct strlist *probe_file__get_rawlist(int fd)
138 char *p; 138 char *p;
139 struct strlist *sl; 139 struct strlist *sl;
140 140
141 if (fd < 0)
142 return NULL;
143
141 sl = strlist__new(NULL, NULL); 144 sl = strlist__new(NULL, NULL);
142 145
143 fp = fdopen(dup(fd), "r"); 146 fp = fdopen(dup(fd), "r");
@@ -271,6 +274,9 @@ int probe_file__get_events(int fd, struct strfilter *filter,
271 const char *p; 274 const char *p;
272 int ret = -ENOENT; 275 int ret = -ENOENT;
273 276
277 if (!plist)
278 return -EINVAL;
279
274 namelist = __probe_file__get_namelist(fd, true); 280 namelist = __probe_file__get_namelist(fd, true);
275 if (!namelist) 281 if (!namelist)
276 return -ENOENT; 282 return -ENOENT;
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 428149bc64d2..c35ffdd360fe 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -29,7 +29,7 @@ static int perf_session__open(struct perf_session *session)
29 struct perf_data_file *file = session->file; 29 struct perf_data_file *file = session->file;
30 30
31 if (perf_session__read_header(session) < 0) { 31 if (perf_session__read_header(session) < 0) {
32 pr_err("incompatible file format (rerun with -v to learn more)"); 32 pr_err("incompatible file format (rerun with -v to learn more)\n");
33 return -1; 33 return -1;
34 } 34 }
35 35
@@ -37,17 +37,17 @@ static int perf_session__open(struct perf_session *session)
37 return 0; 37 return 0;
38 38
39 if (!perf_evlist__valid_sample_type(session->evlist)) { 39 if (!perf_evlist__valid_sample_type(session->evlist)) {
40 pr_err("non matching sample_type"); 40 pr_err("non matching sample_type\n");
41 return -1; 41 return -1;
42 } 42 }
43 43
44 if (!perf_evlist__valid_sample_id_all(session->evlist)) { 44 if (!perf_evlist__valid_sample_id_all(session->evlist)) {
45 pr_err("non matching sample_id_all"); 45 pr_err("non matching sample_id_all\n");
46 return -1; 46 return -1;
47 } 47 }
48 48
49 if (!perf_evlist__valid_read_format(session->evlist)) { 49 if (!perf_evlist__valid_read_format(session->evlist)) {
50 pr_err("non matching read_format"); 50 pr_err("non matching read_format\n");
51 return -1; 51 return -1;
52 } 52 }
53 53