diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-10-20 08:27:52 -0400 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-10-22 11:37:52 -0400 |
| commit | a937c6658b8e77e1f65cde2be9970811752121bb (patch) | |
| tree | 9cc7a92239283dc883c9c1c0d6f320ba1925203a | |
| parent | 4291bf5cb93918232f88a3a70d8f70a72fbb6ab0 (diff) | |
perf trace: Drop thread refcount in trace__event_handler()
We must pair:
thread = machine__findnew_thread();
with thread__put(thread). Fix it.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: c4191e55b874 ("perf trace: Show comm and tid for tracepoint events")
Link: https://lkml.kernel.org/n/tip-dkxsb8cwg87rmkrzrbns1o4z@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
| -rw-r--r-- | tools/perf/builtin-trace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 77b8748ad5ed..589e0412652a 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
| @@ -2152,8 +2152,8 @@ newline: | |||
| 2152 | trace__fprintf_callchain(trace, sample); | 2152 | trace__fprintf_callchain(trace, sample); |
| 2153 | else if (callchain_ret < 0) | 2153 | else if (callchain_ret < 0) |
| 2154 | pr_err("Problem processing %s callchain, skipping...\n", perf_evsel__name(evsel)); | 2154 | pr_err("Problem processing %s callchain, skipping...\n", perf_evsel__name(evsel)); |
| 2155 | thread__put(thread); | ||
| 2156 | out: | 2155 | out: |
| 2156 | thread__put(thread); | ||
| 2157 | return 0; | 2157 | return 0; |
| 2158 | } | 2158 | } |
| 2159 | 2159 | ||
