Adrian Hunter
eeb399b531
perf record: Put a copy of kcore into the perf.data directory
Add a new 'perf record' option '--kcore' which will put a copy of
/proc/kcore, kallsyms and modules into a perf.data directory. Note, that
without the --kcore option, output goes to a file as previously. The
tools' -o and -i options work with either a file name or directory name.
Example:
$ sudo perf record --kcore uname
$ sudo tree perf.data
perf.data
├── kcore_dir
│ ├── kallsyms
│ ├── kcore
│ └── modules
└── data
$ sudo perf script -v
build id event received for vmlinux: 1eaa285996affce2d74d8e66dcea09a80c9941de
build id event received for [vdso]: 8bbaf5dc62a9b644b4d4e4539737e104e4a84541
Samples for 'cycles' event do not have CPU attribute set. Skipping 'cpu' field.
Using CPUID GenuineIntel-6-8E-A
Using perf.data/kcore_dir/kcore for kernel data
Using perf.data/kcore_dir/kallsyms for symbols
perf 19058 506778.423729: 1 cycles: ffffffffa2caa548 native_write_msr+0x8 (vmlinux)
perf 19058 506778.423733: 1 cycles: ffffffffa2caa548 native_write_msr+0x8 (vmlinux)
perf 19058 506778.423734: 7 cycles: ffffffffa2caa548 native_write_msr+0x8 (vmlinux)
perf 19058 506778.423736: 117 cycles: ffffffffa2caa54a native_write_msr+0xa (vmlinux)
perf 19058 506778.423738: 2092 cycles: ffffffffa2c9b7b0 native_apic_msr_write+0x0 (vmlinux)
perf 19058 506778.423740: 37380 cycles: ffffffffa2f121d0 perf_event_addr_filters_exec+0x0 (vmlinux)
uname 19058 506778.423751: 582673 cycles: ffffffffa303a407 propagate_protected_usage+0x147 (vmlinux)
uname 19058 506778.423892: 2241841 cycles: ffffffffa2cae0c9 unwind_next_frame.part.5+0x79 (vmlinux)
uname 19058 506778.424430: 2457397 cycles: ffffffffa3019232 check_memory_region+0x52 (vmlinux)
Committer testing:
# rm -rf perf.data*
# perf record sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.024 MB perf.data (7 samples) ]
# ls -l perf.data
-rw-------. 1 root root 34772 Oct 21 11:08 perf.data
# perf record --kcore uname
Linux
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.024 MB perf.data (7 samples) ]
ls[root@quaco ~]# ls -lad perf.data*
drwx------. 3 root root 4096 Oct 21 11:08 perf.data
-rw-------. 1 root root 34772 Oct 21 11:08 perf.data.old
# perf evlist -v
cycles: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|PERIOD, read_format: ID, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1
# perf evlist -v -i perf.data/data
cycles: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|PERIOD, read_format: ID, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1
#
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: http://lore.kernel.org/lkml/20191004083121.12182-6-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-11-06 15:43:05 -03:00
..
2019-08-28 18:14:57 -03:00
2019-09-20 09:19:20 -03:00
2019-06-25 18:31:12 -03:00
2019-08-31 22:27:52 -03:00
2019-09-20 09:19:20 -03:00
2019-10-18 12:07:46 -03:00
2019-10-22 01:15:45 +02:00
2019-10-11 10:57:00 -03:00
2019-03-11 11:56:02 -03:00
2019-09-20 09:19:21 -03:00
2019-09-25 09:51:48 -03:00
2019-09-25 09:51:44 -03:00
2019-01-25 15:12:09 +01:00
2019-01-25 15:12:09 +01:00
2019-02-19 16:11:56 -03:00
2019-02-19 16:11:56 -03:00
2019-09-20 09:19:22 -03:00
2019-09-20 09:19:22 -03:00
2019-09-25 09:51:48 -03:00
2019-07-29 18:34:42 -03:00
2019-08-31 19:10:19 -03:00
2019-09-20 09:19:20 -03:00
2019-09-20 09:19:20 -03:00
2019-10-11 10:57:00 -03:00
2019-09-25 09:51:49 -03:00
2019-07-29 18:34:42 -03:00
2019-08-29 17:38:32 -03:00
2019-08-26 11:58:29 -03:00
2019-07-09 10:13:27 -03:00
2019-06-05 17:36:37 +02:00
2019-09-20 09:19:22 -03:00
2019-09-20 09:19:21 -03:00
2019-08-14 10:48:39 -03:00
2019-08-14 10:59:59 -03:00
2019-08-31 22:24:10 -03:00
2019-07-29 18:34:42 -03:00
2019-09-20 09:19:20 -03:00
2019-08-31 22:24:10 -03:00
2019-08-31 22:24:10 -03:00
2019-01-25 15:12:08 +01:00
2019-07-09 10:13:26 -03:00
2019-01-25 15:12:09 +01:00
2019-05-15 16:36:49 -03:00
2019-08-31 22:24:10 -03:00
2019-10-15 12:05:18 -03:00
2019-09-25 09:51:49 -03:00
2019-07-29 18:34:42 -03:00
2019-08-22 17:16:56 -03:00
2019-02-06 10:00:39 -03:00
2019-08-29 17:38:32 -03:00
2019-08-29 08:36:12 -03:00
2019-08-22 17:16:57 -03:00
2019-08-31 19:10:40 -03:00
2019-09-25 09:51:47 -03:00
2019-08-31 22:24:10 -03:00
2019-09-20 15:58:11 -03:00
2019-11-06 15:43:05 -03:00
2019-11-06 15:43:05 -03:00
2019-08-31 22:24:10 -03:00
2019-07-29 18:34:42 -03:00
2019-09-20 09:19:20 -03:00
2019-09-20 09:19:20 -03:00
2019-09-20 09:19:20 -03:00
2019-09-20 09:19:20 -03:00
2019-08-31 22:24:10 -03:00
2019-08-31 22:24:10 -03:00
2019-08-31 22:24:10 -03:00
2019-08-31 22:24:10 -03:00
2018-12-28 16:33:02 -03:00
2018-12-28 16:33:02 -03:00
2019-08-31 19:10:19 -03:00
2019-08-31 19:10:19 -03:00
2019-09-20 09:19:20 -03:00
2019-10-07 12:22:17 -03:00
2019-10-07 12:22:17 -03:00
2019-09-20 10:28:21 -03:00
2019-09-20 09:19:22 -03:00
2019-08-31 22:24:10 -03:00
2019-10-22 01:15:32 +02:00
2019-10-09 11:23:52 -03:00
2019-09-25 16:26:40 -03:00
2019-09-25 16:26:34 -03:00
2019-09-25 16:26:34 -03:00
2019-09-30 17:29:57 -03:00
2019-09-25 16:26:40 -03:00
2019-08-15 12:26:13 -03:00
2019-08-15 12:25:55 -03:00
2019-08-31 19:10:19 -03:00
2019-01-08 13:28:13 -03:00
2019-08-29 17:38:32 -03:00
2019-08-29 17:38:32 -03:00
2019-09-25 16:26:41 -03:00
2019-08-26 11:58:29 -03:00
2019-07-09 10:13:26 -03:00
2019-10-15 11:54:11 -03:00
2019-11-06 15:43:05 -03:00
2019-07-09 10:13:26 -03:00
2019-08-31 22:27:48 -03:00
2019-09-20 09:19:22 -03:00
2019-09-25 09:51:47 -03:00
2019-06-05 17:36:37 +02:00
2019-09-25 09:51:47 -03:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:37:04 +02:00
2019-01-25 15:12:10 +01:00
2019-09-30 17:29:49 -03:00
2019-06-19 17:09:51 +02:00
2019-09-20 10:28:26 -03:00
2019-09-30 17:29:35 -03:00
2019-08-29 17:38:32 -03:00
2019-09-20 09:19:20 -03:00
2019-09-25 09:51:48 -03:00
2019-09-20 09:19:22 -03:00
2019-08-16 12:25:57 -03:00
2019-02-06 10:00:38 -03:00
2019-09-30 17:29:46 -03:00
2019-07-29 18:34:42 -03:00
2019-08-31 19:10:40 -03:00
2019-08-31 19:10:40 -03:00
2019-08-31 22:27:48 -03:00
2019-08-31 22:27:48 -03:00
2019-09-20 09:19:22 -03:00
2019-08-31 22:27:52 -03:00
2019-08-31 22:27:52 -03:00
2019-10-10 12:52:41 -03:00
2019-10-10 11:49:46 -03:00
2019-09-20 10:28:21 -03:00
2019-09-20 10:28:21 -03:00
2019-08-31 19:10:19 -03:00
2018-12-17 15:02:17 -03:00
2019-08-31 19:10:19 -03:00
2019-10-19 15:35:01 -03:00
2019-10-19 15:35:01 -03:00
2019-08-14 10:59:59 -03:00
2019-09-25 16:26:41 -03:00
2019-10-10 09:29:33 -03:00
2019-05-15 16:36:49 -03:00
2019-08-31 22:24:10 -03:00
2019-08-31 22:24:10 -03:00
2019-09-25 16:26:34 -03:00
2019-10-10 09:29:33 -03:00
2019-10-10 09:29:33 -03:00
2019-09-20 09:19:20 -03:00
2019-05-28 18:37:44 -03:00
2019-10-19 15:35:01 -03:00
2019-10-19 15:35:01 -03:00
2019-06-25 21:02:47 -03:00
2019-09-20 15:30:09 -03:00
2019-05-25 23:04:42 -04:00
2019-09-20 09:19:20 -03:00
2019-05-25 23:04:42 -04:00
2019-09-20 15:22:00 -03:00
2019-06-25 21:02:47 -03:00
2019-08-31 19:10:19 -03:00
2019-09-25 16:26:34 -03:00
2019-10-10 11:49:46 -03:00
2019-01-25 15:12:10 +01:00
2019-06-05 17:37:04 +02:00
2019-01-25 15:12:10 +01:00
2019-09-25 09:51:48 -03:00
2019-11-06 15:43:05 -03:00
2019-07-09 14:59:11 -03:00
2019-07-09 14:59:11 -03:00
2019-09-20 09:19:20 -03:00
2019-01-21 17:00:48 -03:00
2019-09-20 09:19:21 -03:00
2019-09-20 09:19:20 -03:00
2019-07-29 18:34:42 -03:00
2019-07-29 18:34:42 -03:00
2019-11-06 15:43:05 -03:00
2019-10-07 12:22:17 -03:00
2019-07-09 10:13:26 -03:00
2019-08-14 10:48:39 -03:00
2019-06-10 16:20:11 -03:00
2019-09-25 09:51:48 -03:00
2019-10-11 10:57:00 -03:00
2019-10-11 10:57:00 -03:00
2019-10-11 10:57:00 -03:00
2019-09-25 09:51:48 -03:00
2019-02-06 10:00:38 -03:00
2019-07-09 10:13:26 -03:00
2019-01-25 15:12:09 +01:00
2019-08-31 22:24:10 -03:00
2019-09-25 16:26:40 -03:00
2019-10-15 08:39:42 -03:00
2019-10-15 08:39:42 -03:00
2019-08-31 19:10:19 -03:00
2019-07-09 10:13:26 -03:00
2019-10-15 13:03:57 -03:00
2019-07-01 22:50:40 -03:00
2019-07-09 10:13:26 -03:00
2019-01-25 15:12:10 +01:00
2019-09-20 09:19:21 -03:00
2019-08-29 17:38:31 -03:00
2019-07-02 13:20:51 -03:00
2019-08-31 22:24:05 -03:00
2019-09-25 09:51:49 -03:00
2019-09-20 09:19:20 -03:00
2019-09-20 09:19:20 -03:00
2019-10-11 10:57:00 -03:00
2019-08-31 22:24:05 -03:00
2019-09-25 09:51:48 -03:00
2019-09-20 09:19:22 -03:00
2019-07-29 18:34:42 -03:00
2019-07-29 18:34:42 -03:00
2019-09-20 09:19:20 -03:00
2019-08-29 08:36:12 -03:00
2019-08-29 08:36:12 -03:00
2019-08-31 19:10:19 -03:00
2019-06-17 20:48:14 +02:00
2019-08-31 22:24:10 -03:00
2019-08-26 19:39:11 -03:00
2019-10-15 08:36:22 -03:00
2019-10-15 08:36:22 -03:00
2019-08-26 19:39:11 -03:00
2019-09-25 09:51:48 -03:00
2019-08-31 22:24:10 -03:00
2019-09-25 09:51:48 -03:00
2019-10-18 12:07:46 -03:00
2019-09-20 09:19:20 -03:00
2019-08-29 17:38:32 -03:00
2019-09-20 09:19:20 -03:00
2019-10-18 12:07:46 -03:00
2019-08-29 17:38:32 -03:00
2019-09-20 09:19:22 -03:00
2019-09-20 09:19:20 -03:00
2019-09-20 09:19:20 -03:00
2019-08-31 22:24:10 -03:00
2019-08-16 12:25:57 -03:00
2019-09-20 09:19:20 -03:00
2019-11-06 15:43:05 -03:00
2019-09-25 09:51:49 -03:00
2019-08-31 19:10:19 -03:00
2019-09-20 09:19:20 -03:00
2019-07-09 10:13:26 -03:00
2019-09-20 09:19:20 -03:00
2019-07-23 09:04:03 -03:00