Linux Perf
perf-time-to-tsc.c File Reference
#include <errno.h>
#include <inttypes.h>
#include <stdio.h>
#include <unistd.h>
#include <linux/types.h>
#include <sys/prctl.h>
#include "parse-events.h"
#include "evlist.h"
#include "evsel.h"
#include "thread_map.h"
#include "cpumap.h"
#include "tsc.h"
#include "tests/tests.h"
#include "arch-tests.h"
Include dependency graph for perf-time-to-tsc.c:

Go to the source code of this file.

Macros

#define CHECK__(x)
 
#define CHECK_NOT_NULL__(x)
 

Functions

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

Macro Definition Documentation

◆ CHECK__

#define CHECK__ (   x)
Value:
{ \
while ((x) < 0) { \
pr_debug(#x " failed!\n"); \
goto out_err; \
} \
}

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

◆ CHECK_NOT_NULL__

#define CHECK_NOT_NULL__ (   x)
Value:
{ \
while ((x) == NULL) { \
pr_debug(#x " failed!\n"); \
goto out_err; \
} \
}

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

Function Documentation

◆ 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: