During debugging it turned out to be helpful to see the parent pid
and mostly the two tasks interact with each other: the tracer and
tracee.
Add this information it can searched for it.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
There two sleep functions which ensure that the forked function sleeps
and does not spin until everything is setup. There is no need for that,
the scheduler will take care of that anyway. Also that sleep may
complete before or after the testcase starts. If it completes afterwards
then the testcase waits to start so…
Remove the sleep, it does change the outcome of the testcase.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Those functions and variables are not used outside of main so they can
be static.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
The following program might make a good addition to the rt
test suite. It tests the reliability of PTRACE_SINGLESTEP.
It does by default 10,000 ssteps against a simple,
spinner tracee. Also by default, it spins off ten of these
tracer/tracee pairs, all of which are to run concurrently.
Starting with 4.13-rt, this test occasionally encounters a
sstep whose waitpid returns a WIFSIGNALED (signal SIGTRAP)
rather than a WIFSTOPPED. This usually happens after
thousands of ssteps have executed. Having multiple
tracer/tracee pairs running dramatically increases the
chances of failure.
The is what the test output looks like for a good run:
forktest#0/22872: STARTING
forktest#7/22879: STARTING
forktest#8/22880: STARTING
forktest#6/22878: STARTING
forktest#5/22877: STARTING
forktest#3/22875: STARTING
forktest#4/22876: STARTING
forktest#9/22882: STARTING
forktest#2/22874: STARTING
forktest#1/22873: STARTING
forktest#0/22872: EXITING, no error
forktest#8/22880: EXITING, no error
forktest#3/22875: EXITING, no error
forktest#7/22879: EXITING, no error
forktest#6/22878: EXITING, no error
forktest#5/22877: EXITING, no error
forktest#2/22874: EXITING, no error
forktest#4/22876: EXITING, no error
forktest#9/22882: EXITING, no error
forktest#1/22873: EXITING, no error
All tests PASSED.
Signed-off-by: Joe Korty <joe.korty@concurrent-rt.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
An error occurred during the build process:
src/cyclictest/cyclictest.c:1396:2: error: expected identifier or '(' before 'if'
if (option_affinity) {
The expected identifier "}" for "if (option_affinity){" occurs in another place.
Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
Signed-off-by: Zhong Lu <zhongl.fnst@cn.fujitsu.com>
- Fixed the indentation of the bracket
- Fixed the indentation of the block where NUMA is not defined
Signed-off-by: John Kacur <jkacur@redhat.com>
cpuid is causing register corruption: use mfence instead.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
v2: fix signed-off-by line
Signed-off-by: John Kacur <jkacur@redhat.com>
The numa mode is invoked automatically now, and not from the commandline.
Remove it from help and the man page as well.
Clean-up messages to refer to "numa" or "numa" mode instead of "--numa"
Even though --smp can still be invoked, change messages to "smp mode"
for consistency.
Signed-off-by: John Kacur <jkacur@redhat.com>
Leave the source code in place but remove the install and build of
backfire and sendme for now as it is broken
Signed-off-by: John Kacur <jkacur@redhat.com>
-n, resp. --nanosleep was removed in 9d2c9edd86 ("cyclictest: make
clock_nanosleep as default and add option for POSIX timers."). It's now
used by default.
The usage of --smp still refers to -n, remove this reference.
Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Add a man page for queuelat, with a short introduction
and description for each option.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Add -h (help) option to queuelat, which lists all
options.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Command line --report option is not actually implemented (even if
advertised on --help).
Remove it from the help banner.
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Clark Williams <williams@redhat.com>
(cherry picked from commit 59aa86a9af7204f10def6872e1088d83fc7579bc)
Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Clark Williams <williams@redhat.com>
(cherry picked from commit b1b7a3886b3859fef72efe52e6bb418393bcf24d)
Signed-off-by: John Kacur <jkacur@redhat.com>
Remove all the code that manipulates tracing values with the exception
of the breaktrace logic. Cyclictest now presumes that any tracing
will be done by the trace-cmd command and will only *stop* tracing
if the breaktrace value is hit.
Signed-off-by: Clark Williams <williams@redhat.com>
(cherry picked from commit 26838f86d54e3ff74223165cbbcc2d211becdaf2)
Signed-off-by: John Kacur <jkacur@redhat.com>
Cylictest's --smi option allows to continuously display SMIs that occur
during the measurement. However, the SMI count was not yet included in the
summary at the end of the program run. Added this.
While we are at it, update the list of Intel family 6 models that support
retrieving the SMI count by copying newly added items from kernel sources
at tools/power/x86/turbostat.
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
(cherry picked from commit 34caa080e0)
Signed-off-by: John Kacur <jkacur@redhat.com>
Change 9d2c9edd86 introduces
the new option of POSIX timer and makes MODE_CLOCK_NANOSLEEP
the default choice. But there are two places explicitly set
MODE_CLOCK_NANOSLEEP to the variable use_nanosleep in the code,
so the actual value of the variable after parsing depends on
the position of '-x' to '-U' and '-S'.
These command pairs result in different values in the variable:
'cyclictest -S -x' VS 'cyclictest -x -S'
'cyclictest -U -x' VS 'cyclictest -x -U'
This change ensures -x work regardless its position by removing
the two lines in these cases.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Most of time having '-M' option causes cyclictest won't exit after
a duration ('-D') expires, like this quick command on my machines:
sudo cyclictest -S -M -D2 -d0
This is because the main thread is blocked on waiting for the next
update of MAX, but the timer thread doesn't signal the main thread
before it quits.
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
On a numa system we allocate a stack from the closest NUMA node
for each measurement thread. We need to touch those stack pages
to prevent them faulting when first run. Not a big deal on a
system with just a few cores, but overhead adds up with 32+ cores.
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
It is recommended that clock_nanosleep should be used for real-time
wherever available. So, make sure that cyclictest runs clock_nanosleep
by default. Added an option to run POSIX timers. Removing the '-n'
option because it is redundant now.
Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
We haven't tested/supported the old smi_detector module since the 2.6 kernel. Remove support for running it.
Signed-off-by: Clark Williams <williams@redhat.com>
- Fixed minor typo where part of he shebang was removed
Signed-off-by: John Kacur <jkacur@redhat.com>
- modify hwlatdetector.py to detect and use the ftrace hwlatdetector
- rewrite using base class for detector
Big rewrite where we create a base Detector class and use that
as the base class for Tracer and Hwlat classes.
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
We decided it is more interesting, in our automated tests, to have a
higher tolerance to SMI as most of the test boxes are not optimized for
RT. On the other hand, we would like to know how big are the SMI
latencies on these boxes.
This commit adds the --hardlimit parameter, which defines the real
PASS/FAIL latency criteria. Latencies above --threshold will be
annotated, but the test may PASS if the observed latencies are smaller
than --hardlimit.
When --hardlimit is not informed, the value used for --threshold is also
used as the hard limit.
Signed-off-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
The short option 's' was originally intended to be the short form of
--system
Commit b35bc97cfd
which added the new option --secaligned broke this, by accidently
inserting the new option between the short form and long form.
Reported-by: Daniel Seemer <phaiax-cyclictest@invisibletower.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
Fix spelling mistake, "that" should be "than" in the following message
For less that 2ms run times, you need to
have HRTICK enabled in debugfs/sched_features
Signed-off-by: John Kacur <jkacur@redhat.com>
Improve message if max latency is below threshold.
If the maximum latency is below the threshold for reporting, 0us is output.
This is confusing, and not accurate, so print the message "Below threshold"
instead.
Suggested-by: Jiri Kastner <jkastner@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Although the interval code was added the 'i' was missing from the getopt
list, and there was no help text for it either.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: John Kacur <jkacur@redhat.com>