tools: Fix incorrect calculation of object size by sizeof
authorLi Dong <lidong@vivo.com>
Mon, 19 Jun 2023 08:20:10 +0000 (16:20 +0800)
committerNamhyung Kim <namhyung@kernel.org>
Tue, 20 Jun 2023 23:58:05 +0000 (16:58 -0700)
commit5e37ef5c2a5303d41842b8277770064632533318
treeea992a47863dcb44835c87c4a79bfc5a99960a68
parent53fc25b7f557089aff101235152ae4bff15c428a
tools: Fix incorrect calculation of object size by sizeof

What we need to calculate is the size of the object, not the size of the
pointer.

Fixed: 51cfe7a3e87e ("perf python: Avoid 2 leak sanitizer issues")
Signed-off-by: Li Dong <lidong@vivo.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: opensource.kernel@vivo.com
Link: https://lore.kernel.org/r/20230619082036.410-1-lidong@vivo.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/scripting-engines/trace-event-python.c