Skip to content

Commit

Permalink
Merge pull request #1882 from YanhuiMa/tsc
Browse files Browse the repository at this point in the history
tsc: add tsc test script for rhel8
  • Loading branch information
vivianQizhu committed Aug 23, 2019
2 parents 92a317c + 1523210 commit 686c8a7
Show file tree
Hide file tree
Showing 10 changed files with 494 additions and 1 deletion.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions generic/deps/tsc_rhel8/Makefile
@@ -0,0 +1,20 @@
CC= cc
CFLAGS= -O
LIBS= -lpthread

PROGS= checktsc

SRCS= checktsc.c
OBJS= ${SRCS:.c=.o}


all: $(PROGS)

checktsc: $(OBJS)
$(CC) $(LDFLAGS) -o checktsc $(OBJS) $(LIBS)

clean:
-rm -f $(OBJS)

clobber: clean
-rm -f $(PROGS)
18 changes: 18 additions & 0 deletions generic/deps/tsc_rhel8/README
@@ -0,0 +1,18 @@
checktsc is a user space program that checks TSC synchronization
between pairs of CPUs on an SMP system using a technique borrowed
from the Linux 2.6.18 kernel.

The test passes if all TSCs are within +/- "threshold" clock cycles
of each other. The default value of "threshold" is 500 clock cycles
and can be changed using the --threshold option.

Default behaviour is to check all of the CPUs on a system and to
report the observed difference in TSC values between each pair of CPUs.
The --cpus option can be used to specify a subset of the CPUs to test.

When run with the --silent option the test produces no output (other
than for catastrophic errors) and success or failure is indicated by
a 0 or 1 exit status from the program.

Author: md@google.com
License: GPL

0 comments on commit 686c8a7

Please sign in to comment.