1
0
Fork 0
remarkable-linux/tools/perf
Janne Huttunen 953c9cddc9 perf script python: Fix dict reference counting
[ Upstream commit db0ba84c04 ]

The dictionaries are attached to the parameter tuple that steals the
references and takes care of releasing them when appropriate.  The code
should not decrement the reference counts explicitly.  E.g. if libpython
has been built with reference debugging enabled, the superfluous DECREFs
will trigger this error when running perf script:

  Fatal Python error: Objects/tupleobject.c:238 object at
  0x7f10f2041b40 has negative ref count -1
  Aborted (core dumped)

If the reference debugging is not enabled, the superfluous DECREFs might
cause the dict objects to be silently released while they are still in
use. This may trigger various other assertions or just cause perf
crashes and/or weird and unexpected data changes in the stored Python
objects.

Signed-off-by: Janne Huttunen <janne.huttunen@nokia.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jaroslav Skarvada <jskarvad@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1531133990-17485-1-git-send-email-janne.huttunen@nokia.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-24 13:09:16 +02:00
..
Documentation perf record: Fix documentation for a inexistent option '-l' 2017-10-17 09:05:36 -03:00
arch perf tools: Fix compilation errors on gcc8 2018-08-24 13:09:16 +02:00
bench perf bench: Fix numa report output code 2018-08-24 13:09:07 +02:00
jvmti perf tools: Fix compilation errors on gcc8 2018-08-24 13:09:16 +02:00
pmu-events perf vendor events: Add Goldmont Plus V1 event file 2018-07-03 11:25:01 +02:00
python License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scripts License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tests perf test session topology: Fix test on s390 2018-08-24 13:09:06 +02:00
trace License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ui perf report: Fix wrong jump arrow 2018-05-30 07:52:40 +02:00
util perf script python: Fix dict reference counting 2018-08-24 13:09:16 +02:00
.gitignore perf tools: Add trace/beauty/generated/ into .gitignore 2018-05-30 12:19:59 +02:00
Build perf trace: Only build tools/perf/trace/beauty/ when building 'perf trace' 2017-07-18 23:13:52 -03:00
CREDITS
MANIFEST perf tools: Get all of tools/{arch,include}/ in the MANIFEST 2017-09-25 10:39:43 -03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile.config perf tools: Robustify detection of clang binary 2017-08-28 16:44:46 -03:00
Makefile.perf perf tools: Fix perf builds with clang support 2018-05-30 07:52:23 +02:00
builtin-annotate.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin-bench.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin-buildid-cache.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin-buildid-list.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin-c2c.c perf unwind: Do not look just at the global callchain_param.record_mode 2018-04-26 11:02:06 +02:00
builtin-config.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin-data.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin-diff.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin-evlist.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin-ftrace.c tools include: Adopt strstarts() from the kernel 2017-07-20 15:46:10 -03:00
builtin-help.c perf help: Fix a bug during strstart() conversion 2018-02-25 11:07:54 +01:00
builtin-inject.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin-kallsyms.c perf tools: Including missing inttypes.h header 2017-04-19 13:01:46 -03:00
builtin-kmem.c kmemcheck: remove whats left of NOTRACK flags 2018-02-22 15:42:23 +01:00
builtin-kvm.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin-list.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin-lock.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin-mem.c perf tools: Fix leaking rec_argv in error cases 2017-12-10 13:40:43 +01:00
builtin-probe.c perf buildid-cache: Support binary objects from other namespaces 2017-07-18 23:14:11 -03:00
builtin-record.c Revert "perf record: Fix crash in pipe mode" 2018-05-30 12:19:59 +02:00
builtin-report.c perf unwind: Do not look just at the global callchain_param.record_mode 2018-04-26 11:02:06 +02:00
builtin-sched.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin-script.c perf unwind: Do not look just at the global callchain_param.record_mode 2018-04-26 11:02:06 +02:00
builtin-stat.c perf stat: Fix core dump when flag T is used 2018-05-30 07:52:31 +02:00
builtin-timechart.c perf tools: Fix leaking rec_argv in error cases 2017-12-10 13:40:43 +01:00
builtin-top.c perf top: Fix top.call-graph config option reading 2018-05-30 07:52:31 +02:00
builtin-trace.c perf tools: Fix leaking rec_argv in error cases 2017-12-10 13:40:43 +01:00
builtin-version.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
check-headers.sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
command-list.txt perf tools: Missing c2c command in command-list 2017-03-13 10:59:31 -03:00
design.txt perf tools: Update some code references in design.txt 2014-03-18 18:17:06 -03:00
perf-archive.sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf-completion.sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf-read-vdso.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf-sys.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf-with-kcore.sh perf tools: Fix perf-with-kcore handling of arguments containing spaces 2015-08-06 16:48:27 -03:00
perf.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf.h Revert "perf record: Fix crash in pipe mode" 2018-05-30 12:19:59 +02:00