]> git.baikalelectronics.ru Git - kernel.git/commit
perf sched latency: Fix thread pid reuse issue
authorJiri Olsa <jolsa@kernel.org>
Mon, 2 Nov 2015 11:10:25 +0000 (12:10 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 5 Nov 2015 15:51:00 +0000 (12:51 -0300)
commit8180e38b9f489e985de2250d7cc5a6b7347ae96f
tree0a39934f9f5d9c383f7debd020e89c1efe6cb2b4
parentb981ffb3b77d835fdeb8d0c26ed6fb76b8d00492
perf sched latency: Fix thread pid reuse issue

The latency subcommand holds a tree of working atoms sorted by thread's
pid/tid. If there's new thread with same pid and tid, the old working atom is
found and assert bug condition is hit in search function:

  thread_atoms_search: Assertion `!(thread != atoms->thread)' failed

Changing the sort function to use thread object pointers together with pid and
tid check. This way new thread will never find old one with same pid/tid.

Link: http://lkml.kernel.org/n/tip-o4doazhhv0zax5zshkg8hnys@git.kernel.org
Reported-by: Mohit Agrawal <moagrawa@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1446462625-15807-1-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-sched.c