Commit Graph

997 Commits

Author SHA1 Message Date
John Kacur e6bca755b8 install: Fix failed to create symbolic link hwlatdetect file exists
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>
2012-03-26 15:05:14 +02:00
Clark Williams 95f2842745 Revert "cyclictest problem/bug as non-root"
This reverts commit 64e635bc51.
moving to the check-return-and-exit strategy

Signed-off-by: Clark Williams <williams@redhat.com>
2012-03-23 09:34:30 -05:00
Clark Williams 192a3adcd4 Merge remote-tracking branch 'jkacur/rt-tests-0.83-devel' into work 2012-03-23 09:18:47 -05:00
John Kacur 3ff3300ba0 install: Fix failed to create symbolic link hwlatdetect file exists
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>
2012-03-23 02:15:31 +01:00
John Kacur 6f2665250e Move info, warn, and fatal functions to error.[ch]
Move warning, error and fatal function to the error files.
This is a first step in cleaning up rt-tests.

Signed-off-by: John Kacur <jkacur@redhat.com>
2012-03-23 02:15:19 +01:00
John Kacur fb7ef61416 Makefile: Introduce a static library
Introduce a static libray.
Currently it contains the functions in rt-utils.c error.c and rt-get_cpu.c

Signed-off-by: John Kacur <jkacur@redhat.com>
2012-03-23 02:15:19 +01:00
Darren Hart d276bb4b2d Makefile: Support user supplied CFLAGS and LDFLAGS
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>
2012-03-23 02:15:19 +01:00
John Kacur 9eef81de2f pi_stress: Check the status of sched_getaffinity
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>
2012-03-23 02:15:19 +01:00
Steven Rostedt b52b383192 rt-tests: Update rt-migrate-test to use ftrace infrastructure
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>
2012-03-23 02:15:19 +01:00
John Kacur d7cd65d54c gitignore: differentiate between program names and directories
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>
2012-03-23 02:15:19 +01:00
Clark Williams 2819d683a3 Merge branch 'master' into work 2012-02-13 12:37:49 -06:00
Nicholas Mc Guire 64e635bc51 cyclictest problem/bug as non-root
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
2012-02-13 09:57:14 -06:00
Clark Williams 1d632c3bf9 Merge https://github.com/flosse/rt-tests into work 2011-11-10 22:53:02 -06:00
Clark Williams 15c6d81986 [cyclictest] added priority spreading option --priospread
Add option to spread priorities across measurement threads in
decending order.

Signed-off-by: Clark Williams <williams@redhat.com>
2011-11-10 22:50:37 -06:00
Markus Kohlhase 4803d56d39 added description from osadl.org 2011-10-24 04:05:26 +02:00
Clark Williams 5f1e84f8b0 version bump to 0.83
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-26 14:53:10 -05:00
Clark Williams cb15404503 Modified Makefile to be smarter about turning on/off NUMA compile
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>
2011-09-26 14:49:36 -05:00
Clark Williams e1fab5b280 version bump to 0.82
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-21 09:37:38 -05:00
Clark Williams 6ea14c157e fix print that causes histogram processing error in cyclictest
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-21 09:37:15 -05:00
Clark Williams 188f30ab40 version bump to 0.81
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-20 15:37:05 -05:00
Clark Williams 9f7bdd9961 cleaned up previous hack for using /dev/cpu_dma_latency
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>
2011-09-20 15:34:20 -05:00
Clark Williams 474528f69e version bump to 0.80
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-20 13:44:01 -05:00
Clark Williams 1310f57cfe use latency trick to hold system in idle=poll for duration of cyclictest run
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>
2011-09-20 13:41:02 -05:00
Clark Williams 3edea442f6 version bump to 0.79
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-15 09:41:16 -05:00
Clark Williams 6c0c79b515 hackbench mods to work better under stress
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>
2011-09-15 09:35:41 -05:00
Clark Williams 69293365eb version bump to 0.78
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-14 15:52:03 -05:00
Clark Williams 7595c237b4 modify signal handling logic and clarify mode
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>
2011-09-14 15:49:39 -05:00
Clark Williams c25e679b69 version bump to 0.77
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-09 16:54:01 -05:00
Clark Williams f82a965a62 remove tracemark functions from cyclictest
removed trace marking functions because they cause too much
contention on multiprocessor systems.

Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-09 16:51:29 -05:00
Clark Williams fda485332d version bump to 0.76
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-07 16:26:37 -05:00
Clark Williams 3209d3c634 add stat(2) shortcuts to mount_debugfs()
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>
2011-09-07 16:25:02 -05:00
Clark Williams aca74c66e5 modify /proc/sys/kernel/ftrace_enabled handling
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>
2011-09-07 16:23:31 -05:00
Clark Williams ff044e7142 handle stupid systemd automount of debugfs
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-07 15:32:54 -05:00
Clark Williams 7c59bf385d version bump to 0.75
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-02 11:10:06 -05:00
Steven Rostedt e19cbadffc allow tracemark() to take variable args
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-09-01 22:44:38 -04:00
Steven Rostedt da4956cbca use interval on first loop instead of 1 second
Use the interval given for the first loop instead of
one second wait.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-09-01 21:29:31 -04:00
Steven Rostedt ae357be2e8 only check file descriptor in tracemark() function
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>
2011-09-01 21:26:59 -04:00
Steven Rostedt 8c1e851bfe do not touch tracing_thresh
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>
2011-09-01 21:21:47 -04:00
Steven Rostedt 1f4e25c037 Have -I and -P together also be -B
-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>
2011-09-01 18:35:42 -04:00
Steven Rostedt bd2a8da00b allow events for all tracers
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>
2011-09-01 18:08:15 -04:00
Clark Williams ee95ac2687 commit WIP for rostedt
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-01 09:41:37 -05:00
Clark Williams 3e55619c86 version bump to 0.74
Signed-off-by: Clark Williams <williams@redhat.com>
2011-08-18 09:15:57 -05:00
Uwe Kleine-König 39451cc083 fix possible buffer overflow in string handling
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>
2011-08-18 09:05:25 -05:00
Clark Williams 21a11149ac added files to git repo
Signed-off-by: Clark Williams <williams@redhat.com>
2011-08-18 09:02:24 -05:00
Clark Williams 10f6a855f1 update cyclictest to handle 3.0-rt as well is update ftrace
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>
2011-08-12 13:44:18 -05:00
Clark Williams 8824256e36 Merge remote-tracking branch 'jkacur/rt-tests-dev-new' into work 2011-08-09 11:27:12 -05:00
John Kacur f26dbd8adc Minor Fix-ups
1. Make the function header style consistent with the rest of cyclictest.
2. Spelling clean-ups.

Signed-off-by: John Kacur <jkacur@redhat.com>
2011-05-13 12:52:48 +02:00
Clark Williams cea67f47fa fixed spelling error in printf
Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-12 10:16:06 -05:00
Clark Williams 591bd2b407 fixed BuildRequires in specfile for Python
Need python to be able to correctly install hwlatdetect.

Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-09 12:21:33 -05:00
Clark Williams 81da016fb0 version bump to 0.73
Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-09 10:52:56 -05:00