perf thread_map: Add thread_map__remove function
authorJiri Olsa <jolsa@kernel.org>
Mon, 12 Dec 2016 10:35:41 +0000 (11:35 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 15 Dec 2016 19:25:45 +0000 (16:25 -0300)
commit38af91f01de0e160c17ae380acb5bab5d51066f4
tree3225cf99867dccf856ca842da5a029d182c2dd6b
parent83c2e4f3968d6871eed295f2f5675d3d70b01afa
perf thread_map: Add thread_map__remove function

Add thread_map__remove function to remove thread from thread map.

Add automated test also.

Committer notes:

Testing it:

  # perf test "Remove thread map"
  39: Remove thread map                          : Ok
  # perf test -v "Remove thread map"
  39: Remove thread map                          :
  --- start ---
  test child forked, pid 4483
  2 threads: 4482, 4483
  1 thread: 4483
  0 thread:
  test child finished with 0
  ---- end ----
  Remove thread map: Ok
  #

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1481538943-21874-4-git-send-email-jolsa@kernel.org
[ Added stdlib.h, to get the free() declaration ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/builtin-test.c
tools/perf/tests/tests.h
tools/perf/tests/thread-map.c
tools/perf/util/thread_map.c
tools/perf/util/thread_map.h