perf record: Robustify perf_event__synth_time_conv()
authorWang Nan <wangnan0@huawei.com>
Tue, 24 May 2016 02:28:59 +0000 (02:28 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 30 May 2016 15:41:44 +0000 (12:41 -0300)
commitc45628b0a3f90c4ffeca5f72f227008ceedc21c5
treeda39888cd2388ca752f09e48909520d0bc9e524a
parent792d48b4cf9c248ab2bf66c140a27c48e116bed7
perf record: Robustify perf_event__synth_time_conv()

It is possible that all events in an evlist are overwritable.
perf_event__synth_time_conv() should not crash in this case.
record__pick_pc() is used to check avaliability.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1464056944-166978-3-git-send-email-wangnan0@huawei.com
Signed-off-by: He Kuang <hekuang@huawei.com>
[ Split from a larger patch ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/x86/util/tsc.c
tools/perf/builtin-record.c