diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-08-09 10:53:39 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-08-09 10:53:39 -0400 |
commit | 0e1c438c44dd9cde56effb44c5f1cfeda72e108d (patch) | |
tree | fa3492d4d7d8b7444e5d8ebe6c78210826333e4b /tools/perf/builtin-trace.c | |
parent | c096397c78f766db972f923433031f2dec01cae0 (diff) | |
parent | cdb2d3ee0436d74fa9092f2df46aaa6f9e03c969 (diff) |
Merge tag 'kvmarm-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/arm fixes for 5.3
- A bunch of switch/case fall-through annotation, fixing one actual bug
- Fix PMU reset bug
- Add missing exception class debug strings
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r-- | tools/perf/builtin-trace.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index d0eb7224dd36..4f0bbffee05f 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <api/fs/tracing_path.h> | 19 | #include <api/fs/tracing_path.h> |
20 | #include <bpf/bpf.h> | 20 | #include <bpf/bpf.h> |
21 | #include "util/bpf_map.h" | 21 | #include "util/bpf_map.h" |
22 | #include "util/rlimit.h" | ||
22 | #include "builtin.h" | 23 | #include "builtin.h" |
23 | #include "util/cgroup.h" | 24 | #include "util/cgroup.h" |
24 | #include "util/color.h" | 25 | #include "util/color.h" |
@@ -61,6 +62,7 @@ | |||
61 | #include <linux/random.h> | 62 | #include <linux/random.h> |
62 | #include <linux/stringify.h> | 63 | #include <linux/stringify.h> |
63 | #include <linux/time64.h> | 64 | #include <linux/time64.h> |
65 | #include <linux/zalloc.h> | ||
64 | #include <fcntl.h> | 66 | #include <fcntl.h> |
65 | #include <sys/sysmacros.h> | 67 | #include <sys/sysmacros.h> |
66 | 68 | ||
@@ -1038,10 +1040,10 @@ static struct thread_trace *thread_trace__new(void) | |||
1038 | { | 1040 | { |
1039 | struct thread_trace *ttrace = zalloc(sizeof(struct thread_trace)); | 1041 | struct thread_trace *ttrace = zalloc(sizeof(struct thread_trace)); |
1040 | 1042 | ||
1041 | if (ttrace) | 1043 | if (ttrace) { |
1042 | ttrace->files.max = -1; | 1044 | ttrace->files.max = -1; |
1043 | 1045 | ttrace->syscall_stats = intlist__new(NULL); | |
1044 | ttrace->syscall_stats = intlist__new(NULL); | 1046 | } |
1045 | 1047 | ||
1046 | return ttrace; | 1048 | return ttrace; |
1047 | } | 1049 | } |
@@ -3863,6 +3865,15 @@ int cmd_trace(int argc, const char **argv) | |||
3863 | goto out; | 3865 | goto out; |
3864 | } | 3866 | } |
3865 | 3867 | ||
3868 | /* | ||
3869 | * Parsing .perfconfig may entail creating a BPF event, that may need | ||
3870 | * to create BPF maps, so bump RLIM_MEMLOCK as the default 64K setting | ||
3871 | * is too small. This affects just this process, not touching the | ||
3872 | * global setting. If it fails we'll get something in 'perf trace -v' | ||
3873 | * to help diagnose the problem. | ||
3874 | */ | ||
3875 | rlimit__bump_memlock(); | ||
3876 | |||
3866 | err = perf_config(trace__config, &trace); | 3877 | err = perf_config(trace__config, &trace); |
3867 | if (err) | 3878 | if (err) |
3868 | goto out; | 3879 | goto out; |