perf data convert: Prefer sampled CPU when exporting JSON
authorShawn M. Chapla <schapla@codeweavers.com>
Thu, 26 May 2022 20:14:47 +0000 (16:14 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 23 Jun 2022 14:54:21 +0000 (11:54 -0300)
commit924a221581db557f6c61b93fe5f25893a74bc3ea
tree70c21c95f624b77f9c86dde951efb58f2125a4b4
parent399bd66e219e331976fe6fa6ab81a023c0c97870
perf data convert: Prefer sampled CPU when exporting JSON

When CPU has been explicitly sampled (via --sample-cpu), prefer this
sampled value over the thread CPU value when exporting to JSON.

Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220526201506.2028281-1-schapla@codeweavers.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/data-convert-json.c