Stanislav Ivanichkin
a6293f36ac
perf trace: Fix segfault when trying to trace events by cgroup
...
# ./perf trace -e sched:sched_switch -G test -a sleep 1
perf: Segmentation fault
Obtained 11 stack frames.
./perf(sighandler_dump_stack+0x43) [0x55cfdc636db3]
/lib/x86_64-linux-gnu/libc.so.6(+0x3efcf) [0x7fd23eecafcf]
./perf(parse_cgroups+0x36) [0x55cfdc673f36]
./perf(+0x3186ed) [0x55cfdc70d6ed]
./perf(parse_options_subcommand+0x629) [0x55cfdc70e999]
./perf(cmd_trace+0x9c2) [0x55cfdc5ad6d2]
./perf(+0x1e8ae0) [0x55cfdc5ddae0]
./perf(+0x1e8ded) [0x55cfdc5ddded]
./perf(main+0x370) [0x55cfdc556f00]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe6) [0x7fd23eeadb96]
./perf(_start+0x29) [0x55cfdc557389]
Segmentation fault
#
It happens because "struct trace" in option->value is passed to the
parse_cgroups function instead of "struct evlist".
Fixes: 9ea42ba4411ac ("perf trace: Support setting cgroups as targets")
Signed-off-by: Stanislav Ivanichkin <sivanichkin@yandex-team.ru>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Dmitry Monakhov <dmtrmonakhov@yandex-team.ru>
Link: http://lore.kernel.org/lkml/20201027094357.94881-1-sivanichkin@yandex-team.ru
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2020-11-03 08:31:03 -03:00
..
2020-10-15 08:10:39 +02:00
2020-10-15 15:51:28 -07:00
2020-10-05 18:40:01 -07:00
2020-10-17 11:47:46 -07:00
2020-09-01 19:38:33 -06:00
2020-09-30 10:57:30 +02:00
2020-07-06 10:46:23 +00:00
2020-08-22 10:53:12 +01:00
2020-11-03 08:29:30 -03:00
2020-09-21 07:50:58 -06:00
2020-10-23 12:05:49 -07:00
2020-09-04 11:58:15 -07:00
2020-10-14 10:13:37 -07:00
2020-11-03 08:31:03 -03:00
2020-10-23 16:27:03 -07:00
2020-06-11 16:27:24 +01:00
2020-11-02 12:14:19 -08:00
2020-08-19 14:11:44 +02:00
2020-08-11 14:34:17 -07:00
2020-09-04 12:46:06 +01:00
2020-07-13 10:42:02 -07:00