Linux Perf
arch-tests.h File Reference
#include <linux/compiler.h>
Include dependency graph for arch-tests.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int test__rdpmc (struct test *test __maybe_unused, int subtest)
 
int test__perf_time_to_tsc (struct test *test __maybe_unused, int subtest)
 
int test__insn_x86 (struct test *test __maybe_unused, int subtest)
 

Variables

struct test arch_tests []
 

Function Documentation

◆ test__insn_x86()

int test__insn_x86 ( struct test *test  __maybe_unused,
int subtest  __maybe_unused 
)

test__insn_x86 - test x86 instruction decoder - new instructions.

This function implements a test that decodes a selection of instructions and checks the results. The Intel PT function that further categorizes instructions (i.e. intel_pt_get_insn()) is also checked.

The instructions are originally in insn-x86-dat-src.c which has been processed by scripts gen-insn-x86-dat.sh and gen-insn-x86-dat.awk to produce insn-x86-dat-32.c and insn-x86-dat-64.c which are included into this program. i.e. to add new instructions to the test, edit insn-x86-dat-src.c, run the gen-insn-x86-dat.sh script, make perf, and then run the test.

If the test passes %0 is returned, otherwise %-1 is returned. Use the verbose (-v) option to see all the instructions and whether or not they decoded successfuly.

Definition at line 175 of file insn-x86.c.

Here is the call graph for this function:

◆ test__perf_time_to_tsc()

int test__perf_time_to_tsc ( struct test *test  __maybe_unused,
int subtest  __maybe_unused 
)

test__perf_time_to_tsc - test converting perf time to TSC.

This function implements a test that checks that the conversion of perf time to and from TSC is consistent with the order of events. If the test passes %0 is returned, otherwise %-1 is returned. If TSC conversion is not supported then then the test passes but " (not supported)" is printed.

Definition at line 41 of file perf-time-to-tsc.c.

Here is the call graph for this function:

◆ test__rdpmc()

int test__rdpmc ( struct test *test  __maybe_unused,
int  subtest 
)

Definition at line 158 of file rdpmc.c.

Here is the call graph for this function:

Variable Documentation

◆ arch_tests

struct test arch_tests[]

Definition at line 6 of file arch-tests.c.