perf test sample-parsing: Add endian test for struct branch_flags
authorMadhavan Srinivasan <maddy@linux.ibm.com>
Thu, 28 Oct 2021 11:37:14 +0000 (17:07 +0530)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 28 Oct 2021 12:34:01 +0000 (09:34 -0300)
commit10269a2ca2b08cbdda9232771e59ba901b87a074
tree948f5da724119ed4037d3b8802d94dfea653780c
parent63c12ae2f246dcdc30895ec7c980365a5133433d
perf test sample-parsing: Add endian test for struct branch_flags

Extend the sample-parsing test to include a branch_flag bitfield-endian
swap test.

This patch adds a include for "util/trace-event.h" in the sample-parsing
test for importing tep_is_bigendian() and extends samples_same() to
include "needs_swap" to detect/enable check for bitfield-endian swap.

Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Michael Ellerman <michael@ellerman.id.au>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20211028113714.600549-2-maddy@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/sample-parsing.c