Commit Graph

420 Commits

Author SHA1 Message Date
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
Clark Williams 809f870eb8 hackbench: add setjmp/longjmp and rework signal handling logic
Use setjmp/longjump to get the parent process back out of processing
loop and into forced kill mode for the child processes/threads.
Added function reset_worker_signals() so that workers (sender and
receiver) don't try to reap as well.

Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-05 13:44:09 -05:00
Geunsik Lim 02da29f450 cyclictest: Fixed incorrect wakeup reset interface
When we try to run ftrace with cyclictest command of rt-test,
We view the error according to different kernel version.
We need to modify this hard coded interface.

* Directory name of each kernel version
2.6.24.7-rt23     /sys/kernel/debug/tracing/latency_hist/wakeup_latency/reset
2.6.31-rc9-rt9.1  /sys/kernel/debug/tracing/latency_hist/wakeup/reset
2.6.33.7.2-rt30   /sys/kernel/debug/tracing/latency_hist/wakeup/reset

* parsing verification: ./linux-2.6/scripts/checkpatch.pl  --> OK

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Reviewed-by: John Kacur <jkacur@redhat.com>
Reviewed-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-04 15:42:00 -05:00
Wolfram Sang 895dd83946 Simplify Makefile using -D option to install
install can also create directories with -D

Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-04 15:39:16 -05:00
Carsten Emde f833b0949f add histogram summary column option (-H) to cyclictest
To compare histograms of several SMP machines or to gain an
overview when cyclictest is running more than a single thread,
an overall histogram is required that contains a summary of
the individual thread latencies.

This patch adds this functionality and introduces the new
option -H/--histofall for this purpose.

Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-04 15:33:16 -05:00
Daniel Sangorrin 4681c81deb fix sched_setaffinity type error when building with UCLIBC
Change type of faux sched_setaffinity to match headers.
Also add additional report info when dumping histogram.

Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-04 15:04:41 -05:00
Uwe Kleine-König a5693cc785 install backfire's Makefile
Only installing backfire.c hardly makes sense.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-07-01 06:56:01 +02:00
Uwe Kleine-König 94f60c4138 modernize backfire's Makefile
- don't rely on non-standard envvar PWD, use make's CURDIR instead
- allow overwriting KERNELDIR
- less repetition by conflating targets
- explicitly differentiate between kbuild and ordinary make part

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-07-01 06:34:05 +02:00
Clark Williams 886d26833d version bump to 0.72
Signed-off-by: Clark Williams <williams@redhat.com>
2010-06-25 16:16:46 -05:00
Clark Williams e4c7a0753c convert convert 'unsigned long long' and 'long long' to uint64_t and int64_t
Cleanup spurred by need to make the 'diff' variable in timerthread() to
be unsigned and 64-bits (rather than a signed 32-bit).

Signed-off-by: Clark Williams <williams@redhat.com>
2010-06-25 16:10:40 -05:00
Clark Williams a3194e71ef added --numa option to cyclictest man page
Documented the --numa mode option to cyclictest in the man page.
Also updated the command summary to include the short options for
the --smp and --numa modes (-S and -U).

Signed-off-by: Clark Williams <williams@redhat.com>
2010-06-14 14:50:02 -05:00
Clark Williams 9a0525c5b1 version bump to 0.71
Signed-off-by: Clark Williams <williams@redhat.com>
2010-05-18 12:37:56 -05:00
Michal Schmidt 1b3f408a33 cyclictest: fix accumulating overruns in periodic timer mode
When using a POSIX interval timer and an overrun occurs, a signal is always
lost. From then on cyclictest would report all measurements as increased by
N*period (where N is the number of overruns).

cyclictest can detect the overruns and adjust the expected time of the next
tick accordingly.

Reported-by: Marti Raudsepp <marti@juffo.org>
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: Clark Williams <williams@redhat.com>
2010-05-18 12:28:39 -05:00
Clark Williams 9d503b107d version bump to 0.70 2010-04-09 13:56:15 -05:00
Olaf Hering 691f7a82fb skip python dependency in rt-tests make install
If python is not available on the target, skip the
hwlatdetect.py installation with:
	make PYLIB= DESTDIR=/some/dir install
Create PYLIB during make install with DESTDIR set
Also, the second bindir should probably be srcdir.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Clark Williams <williams@redhat.com>
2010-04-09 13:52:13 -05:00
Clark Williams 7142b67d8f version bump to 0.69 2010-04-09 13:30:29 -05:00
Clark Williams d6c4ab8698 default cyclictest to SCHED_OTHER; clean up help message
After much thought, I decided to keep cyclictest's default scheduling
policy as SCHED_OTHER. My rationale is that if you don't specify a
priority on the command line you get the priorityless policy. If you
do specify a priority but no specific RT policy, we'll default to
SCHED_FIFO. So to get SCHED_RR you have to specify priorty and policy
name, for example:

	# cyclictest --priority=90 --policy=rr

Yes, I realize that the vast majority of users will run it with a
realtime priority, but I just don't like picking a priority if it
wasn't specified. If you want a realtime policy, specify a priority.

Signed-off-by: Clark Williams <williams@redhat.com>
2010-04-09 13:06:33 -05:00
Clark Williams ba12344ecb added pmqtest to .gitignore 2010-04-09 13:05:37 -05:00
Clark Williams 663bd628f5 fix bus error when in numa mode with more than 16 cores
The call numa_node_to_cpus() in rt_numa_numa_node_of_cpu()
was failing because the cpumask buffer size was only 16 bytes
and it seems to require 32.  Change the declaration to be 256
just for paranoia's sake.

Signed-off-by: Clark Williams <williams@redhat.com>
2010-04-01 15:48:34 -05:00
Clark Williams f37d47179d replace nanosleep with clock_nanosleep in pmqtest
Since it's doing relative time sleeps probably not an issue, but
move to clock_nanosleep(CLOCK_MONOTONIC, 0,...) to be clear.

Signed-off-by: Clark Williams <williams@redhat.com>
2010-04-01 14:11:33 -05:00
Carsten Emde 5b346bd9e8 Add pmqtest program
This patch adds the program pmqtest to the rt-tests suite.
The test mechanism is the same as in ptsematest, svsematest
and friends, but it uses message queues to synchronize the
test threads. To test the - now hopefully fixed - kernel
problem that occurred when a timeout was specified, the
-T option is available.

On an 8-way machine, the test result may look like:

Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: Clark Williams <williams@redhat.com>
2010-04-01 13:39:43 -05:00
Clark Williams c9c0e4e3ad fixed typo in cyclictest.8 man page
Signed-off-by: Clark Williams <williams@redhat.com>
2010-04-01 13:35:42 -05:00
Clark Williams 92f3c57a50 version bump to 0.68
Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-19 14:44:33 -05:00
Clark Williams ffebccf9f9 handle ftrace difference between 2.6.24 and 2.6.33
Somewhere between 2.6.24 and 2.6.33, the tracing_on field was
added to the debugfs tracing dir. If it exists use it to turn
tracing on and off; if not use tracing_enabled.

Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-19 14:39:44 -05:00
Clark Williams 2ef575b81b version bump to 0.67
Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-16 16:14:11 -05:00
Clark Williams 95c65d4c00 Merge branch 'work' into temp
Conflicts:
	.gitignore
	Makefile
2010-03-16 15:54:01 -05:00
Clark Williams 7f19bd8a31 added hackbench executable to ignore targets in .gitignore
Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-16 15:41:01 -05:00
Clark Williams ba15a4ab82 reword rpm %description field for clarity (BZ# 572323)
Changed description field to be more descriptive

Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-16 15:38:53 -05:00