Skip to content

Commit 492cf7a

Browse files
author
Ingo Molnar
committed
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>
2 parents b71b437 + 5602ea0 commit 492cf7a

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

tools/include/linux/list.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <linux/compiler.h>
12
#include <linux/kernel.h>
23
#include <linux/types.h>
34

tools/perf/tests/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
llvm-src-base.c
2+
llvm-src-kbuild.c

tools/perf/util/annotate.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,6 +1620,7 @@ int symbol__tty_annotate(struct symbol *sym, struct map *map,
16201620
len = symbol__size(sym);
16211621

16221622
if (print_lines) {
1623+
srcline_full_filename = full_paths;
16231624
symbol__get_source_line(sym, map, evsel, &source_line, len);
16241625
print_summary(&source_line, dso->long_name);
16251626
}

tools/perf/util/probe-file.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ struct strlist *probe_file__get_rawlist(int fd)
138138
char *p;
139139
struct strlist *sl;
140140

141+
if (fd < 0)
142+
return NULL;
143+
141144
sl = strlist__new(NULL, NULL);
142145

143146
fp = fdopen(dup(fd), "r");
@@ -271,6 +274,9 @@ int probe_file__get_events(int fd, struct strfilter *filter,
271274
const char *p;
272275
int ret = -ENOENT;
273276

277+
if (!plist)
278+
return -EINVAL;
279+
274280
namelist = __probe_file__get_namelist(fd, true);
275281
if (!namelist)
276282
return -ENOENT;

tools/perf/util/session.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,25 @@ static int perf_session__open(struct perf_session *session)
2929
struct perf_data_file *file = session->file;
3030

3131
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");
3333
return -1;
3434
}
3535

3636
if (perf_data_file__is_pipe(file))
3737
return 0;
3838

3939
if (!perf_evlist__valid_sample_type(session->evlist)) {
40-
pr_err("non matching sample_type");
40+
pr_err("non matching sample_type\n");
4141
return -1;
4242
}
4343

4444
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");
4646
return -1;
4747
}
4848

4949
if (!perf_evlist__valid_read_format(session->evlist)) {
50-
pr_err("non matching read_format");
50+
pr_err("non matching read_format\n");
5151
return -1;
5252
}
5353

0 commit comments

Comments
 (0)