The following build error can occur if you have done a previous make install
if test -n "/usr/lib/python2.7/site-packages" ; then \
install -D -m 755 src/hwlatdetect/hwlatdetect.py /usr/lib/python2.7/site-packages/hwlatdetect.py ; \
ln -s /usr/lib/python2.7/site-packages/hwlatdetect.py "/usr/local/bin/hwlatdetect" ; \
fi
ln: failed to create symbolic link `/usr/local/bin/hwlatdetect': File exists
make: *** [install] Error 1
I initially wanted to fix the error by removing the symbolic link, with rm -rf
but Andrew Burgess pointed out that you can just use the
ln's -f (force) flag. I like that solution better.
Suggested-by: Andrew Burgess <aab@cichlid.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
The following build error can occur if you have done a previous make install
if test -n "/usr/lib/python2.7/site-packages" ; then \
install -D -m 755 src/hwlatdetect/hwlatdetect.py /usr/lib/python2.7/site-packages/hwlatdetect.py ; \
ln -s /usr/lib/python2.7/site-packages/hwlatdetect.py "/usr/local/bin/hwlatdetect" ; \
fi
ln: failed to create symbolic link `/usr/local/bin/hwlatdetect': File exists
make: *** [install] Error 1
Fix the error by removing the symbolic link.
Signed-off-by: John Kacur <jkacur@redhat.com>
Accept user supplied CFLAGS and LDFLAGS, overwriting the
Makefile supplied versions. This can cause the build to
fail if the user does not provide at least what the Makefile
defines, but so be it.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Clark Williams <williams@redhat.com>
CC: John Kacur <jkacur@redhat.com>
CC: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
Check the status of sched_getaffinity and exit upon error.
CPU_ISSET only checks whether a cpu is in a mask, and not whether the
mask is valid. Checking the status ensures we aren't working with garbage
values.
This also removes the warning from gcc about the status variable being unused
as reported by Darren Hart.
Reported-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
The rt-migrate-test in the rt-tests is still using the old logdev
interface that requires the logdev patch. Ftrace has been introduced
into mainline Linux since 2.6.27 and has many more features than logdev.
The rt-migrate-test should interact with ftrace instead of logdev.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
Many rt-test programs including cyclictest have directories with the
same name as the generated binaries. Tell .gitignore to only ignore
the program names and not the directories by using a slash prefix.
Signed-off-by: John Kacur <jkacur@redhat.com>
HI !
minor bug in cyclictest but potential causing confusion on cyclictest
resuults when running as non-root user.
Setup:
if one sets the rtprio in /etc/security/limits.conf to something below
prio max - like:
@hofrat hard rtprio 10
@hofrat soft rtprio 10
but then starts cylictest with -p 80 cyclictest will not fuss and also
display priority 80 (as it uses par->prio in print_stat) but effectively
runs with prio 0 as the return value of sched_setscheduler is not being
checked in timerthread), resulting in semingly bad scheduling jitter values.
So maybe cyclictest should take the effective maximum schduling priority
of the user and not the scheduling policy maximum. Not sur if the check
in timerthread is actually really needed - but it should not hurt ither.
patch below (against current git) at "works for me" quality.
thx!
hofrat
Combined Uwe Kleine-König and Frank Rowand's suggestions into a
Makefile modification that tries to be smart about turning on
NUMA, while allowing it to be explicitly enabled/disabled via
command line options
Signed-off-by: Clark Williams <williams@redhat.com>
Changed function name to set_latency_target() and added a
command line argument to allow passing in values other than
the default of zero microseconds.
Signed-off-by: Clark Williams <williams@redhat.com>
Use the /dev/cpu_dma_latency power management interface to hold the
system in idle=poll state while cyclictest is running. Look in the
kernel documenation: Documentation/power/pm_qos_interface.txt for
more information.
Signed-off-by: Clark Williams <williams@redhat.com>
added a signal_worker routine to send individual SIGTERM's to
worker threads (since sending via pid=0 seems to have issues).
Also added the -F/--fifo option to change the main thread to a
SCHED_FIFO realtime thread after creating the workers. This will
allow the mangagement thread to run when there are tons of workers.
Signed-off-by: Clark Williams <williams@redhat.com>
Modify signal handling logic so main can't receive sigterm when
reaping children
Also added THREAD_MODE and PROCESS_MODE defines to use rather than
bare constants 0 and 1.
Signed-off-by: Clark Williams <williams@redhat.com>
Before trying to parse /proc/mount, check for existance of directories
/sys/kernel/debug/tracing and /debug/tracing using stat(2).
Signed-off-by: Clark Williams <williams@redhat.com>
Only turn on ftrace_enabled if we're doing tracing that requires
the function tracer. Don't turn it on for event-based tracing. Also,
turn it off a the end of a run.
Signed-off-by: Clark Williams <williams@redhat.com>
If the tracemark_fd is >= 0, then we know we can write to the
trace_marker file. We only need to check that and not version of
the kernel or anything else at every instance of calling tracemark().
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
The -b argument is for stopping the cyclictest when it misses a wakup
by that # microseconds. Setting the tracing_thresh causes the latency tracer
to ignore any latency under tracing_thresh. These two meanings are completely
agnostic to each other, and should not be the same. We want the max latency,
that should be good enough. Not only those that are bigger than our missed
deadline. That misses most of our traces that we want.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-B is used to enable preemptirqsoff, but it also makes sense that one
could use both -I and -P together for the same thing.
Also rename the enum IRQPREEMPTOFF TO PREEMPTIRQSOFF to match the
tracer it represents and avoid confusion.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Events are available for all tracers, including function and latency
tracers. Do not treat them as a tracer. The -E option is agnostic to
the tracer options, and if it is set, then events will be enabled for
any tracer that is also set. If it is set by itself, then events will
be enabled with the nop tracer.
Also, the nop tracer is set before setting any of the tracers. This
makes the nop tracer the default as well as clears out the trace before
running the test.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
strncat writes up to n+1 chars when n is passed as 3rd argument. So when
doing
strncpy(filename, fileprefix, sizeof(filename));
strncat(filename, name, sizeof(filename) - strlen(fileprefix));
with strlen(fileprefix) + strlen(name) >= sizeof(filename) a buffer
overflow occurs. Addionally there is no check if filename is big enough.
So convert to memcpy and handle filename not being big enough.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Clark Williams <williams@redhat.com>
reworked the kernel versioning logic to handle the 3.0 kernel
and update the ftrace logic to deal with changes to the
debugfs tracing directory.
Signed-off-by: Clark Williams <williams@redhat.com>