This does much what earlier commits did before hackbench got updated
to the latest version in the previous commit.
Consider the following commits being "forward ported", feature wise:
4c39eff2130a72fcaadefbd80c495bbd588c92b8
Signed-off-by: David Sommerseth <davids@redhat.com>
Improved argument/option handling by using getopt_long(). Made more of the
parameters tunable as well. Hackbench now accepts the following arguments:
-P | --pipe Use pipe
-s | --datasize Number of bytes to pass from sender to receiver
(default 100 bytes)
-l | --loops Number of messages each sender will send
(default 100 rounds)
-g | --groups Number of groups with sender/receivers
(default 10 groups)
-f | --fds Number of file descriptors each group will use
(default 20*2)
-T | --threads Run using pthreads
-P | --process Run using fork()
Signed-off-by: David Sommerseth <davids@redhat.com>
This does much what earlier commits did before hackbench got updated
to the latest version in the previous commit.
Consider the following commits being "forward ported", feature wise:
4c39eff2130a72fcaadefbd80c495bbd588c92b8
Signed-off-by: David Sommerseth <davids@redhat.com>
Valgrind complained about usage of non-initialised data. The compiler
complained about the out_fds argument being unsigned int when calling
sender().
Signed-off-by: David Sommerseth <davids@redhat.com>
Instead of just exiting immediately the original version did, we now
count how many children who failed to exit properly and report it.
Signed-off-by: David Sommerseth <davids@redhat.com>
In commit 4c39eff213 a new approach for tracking
each child was implemented. But this implementation ignored the fact that each
group() call creates 2*num_fds children.
This patch refactors the previous attempt and will now track absolutely all
children. If fork() fails when called in group(), all spawned children will
now also be killed explicitly.
Signed-off-by: David Sommerseth <davids@redhat.com>
Quite often it's experienced in rteval that hackbench leaves some children
as zombies during closure. This is an attempt to keep an overview of the
status of each child separately. It's solved by having an array with all
sender and reciever children's pids and calling waitpid() on each of these
children pairs.
Signed-off-by: David Sommerseth <davids@redhat.com>
Fix code in check_privs() that passes NULL as parameter
to sched_setscheduler().
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Clark Williams <williams@redhat.com>
Add a workaround to hwlatdetect to deal with a broken block of
code in drivers/misc/smi_detector.ko, where whenever you enable
the module (write a 1 to debugfs/smi_detector/enable) the stats
initialization routine resets the threshold from whatever it was
set to to 1us. This workaround checks the threshold after enabling
the module and resets it to what we want.
Signed-off-by: Clark Williams <williams@redhat.com>
Remove the ret variable, the end lable and the goto. We already have
inconsistent exit points for the function, and the end lable wasn't strictly
for errors. Directly returning simplifies and shortens the code.
Signed-off-by: John Kacur <jkacur@redhat.com>
Separate the #ifdef LIBNUMA_API_VERSION of function rt_numa_numa_node_of_cpu,
it is slightly cleaner this way.
Signed-off-by: John Kacur <jkacur@redhat.com>
Added NUMA=1 to specfile build command line to enable NUMA
options. Added description of --numa option to usage output.
Signed-off-by: Clark Williams <williams@redhat.com>
use a variable to indicate that priorities should be equal
on all cpus when smp, numa or histogram options are specified.
Signed-off-by: Clark Williams <williams@redhat.com>
Runtime tests are not sufficient, cyclic tests needs to be compilable
on non-numa systems.
This separates numa functionality into rt_numa.h
Signed-off-by: John Kacur <jkacur@redhat.com>
added back reference to outpar label in allocation failure for
statistics array (got dropped in previous two commits).
Signed-off-by: Clark Williams <williams@redhat.com>
Modify cyclictest to have a --numa option which enables calls into
libnuma functions for binding threads to memory nodes.
Signed-off-by: Clark Williams <williams@redhat.com>
Added the --smp (-S) option which is short hand for setting
the options -t, -a, and -n and for not changing any specified
priority across processors.
Also changed many printfs to use either warn() or fatal()
Signed-off-by: Clark Williams <williams@redhat.com>
Added routines to print warning and fatal messages with appropriate
text prefixes (e.g. WARNING: and FATAL: )
Signed-off-by: Clark Williams <williams@redhat.com>
When reading the output from cyclictest with another program, the data is
buffered by default. This prevents nice 'live' display.
This patch adds an command line option to force the output to always be
unbuffered.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Clark Williams <williams@redhat.com>
Use check_privs() from the rt-utils library to make sure that the user is
running with real-time privileges for the pip test program.
Signed-off-by: John Kacur <jkacur@redhat.com>
This test is similar to pi_stress in that it purpursely triggers a priority-
inversion. However, instead of using pthreads it uses processes.
Since pthread_mutex_t are the only objects backed by priority inheritance
this is accomplished by having the processes use a pthread_mutex_t in
shared memory. See the header of pip.c for more information as well as the
code of course.
In addition this patch starts a src/include directory as a common place
to put header files.
Signed-off-by: John Kacur <jkacur@redhat.com>
Add error routines, similar to those found in Advanced Programming in the
UNIX Environment 2nd ed. for use by all rt test programs
Signed-off-by: John Kacur <jkacur@redhat.com>
classic_pi was the original proof of concept for a Priority
Inheritance mutex demonstration, but pi_stress does that much
better now.
Signed-off-by: Clark Williams <williams@redhat.com>
renamed the guard macros in rt-get_cpu.h and rt-utils.h to
have leading double underscores which takes them out of the
application namespace. Also changed a '.' in the rt-get_cpu.h
guard macro to an underscore.
Signed-off-by: Clark Williams <williams@redhat.com>
Add a get_cpu() function to the library.
Most platforms will simply use sched_getcpu()
However, if you have a glibc < 2.6 then
64-bits will use vsyscall for getcpu (if available).
32-bits will use getcpu() (if available)
Signed-off-by: John Kacur <jkacur@redhat.com>
- These changes simplify the Makefile. For example, notice that we no
longer need to specify the full path to the source file
- These changes also unify the Makefile, for example, every program
gets VERSION_STRING as an floating point number.
- Due to the above change I had to make a number of changes in the programs
that expected VERSION_STRING as a string.
- By unifying what we CFLAGS, to include -D_GNU_SOURCE, I had to remove
__USE_GNU which is reduncant in a number of files.
Signed-off-by: John Kacur <jkacur@redhat.com>
Somehow the last set of tests added got converted to DOS text
(CRLF line terminators). Change them back
Signed-off-by: Clark Williams <williams@redhat.com>
Add a .gitignore file in the backfire directory for generated files
that are created when making the kernel module.
Signed-off-by: John Kacur <jkacur@redhat.com>
from signaltest - because it doesn't have the fix that check_privs in
cyclictest has - to return the sched_priority to 0
This is a good example of why common functions should be put into libraries -
so all programs benefit from fixes.
Signed-off-by: John Kacur <jkacur@redhat.com>
This commit adds some output then the -b option is used to break on
exceeding a threshold. the thread id of the thread that exceeded the
threshold is printed for use when looking at the trace log.
Signed-off-by: Clark Williams <williams@redhat.com>
Add a second newline to the "Low thread priority" display line
so that updating number of inversions doesn't overwrite it.
Signed-off-by: Clark Williams <williams@redhat.com>
When using pthread_barrier_wait, it is important that barriers are called
the correct number of times. That is - the same number given as the count
when initializing the barrier.
There was a do-while loop around elevate_barrier in the med priority thread.
On most machines, it actually never looped.
On threads with enough processors (nehelam for example), there was a racy
situation in which the high priority thread could come out of the finish
barrier, and before it could set high_has_run = 0, the medium priority
thread would test the value and call the elevate barrier an extra time.
This patch removes the bogus loop and related state variables and fixes
the hang.
Signed-off-by: John Kacur <jkacur@redhat.com>
- Check whether quiet is set, before taking shutdown_mtx
- Add quiet to the help menu.
- Remove unused "signal" from struct options
Signed-off-by: John Kacur <jkacur@redhat.com>
- Use a pthread_mutex_t for the global variable shutdown.
- Remove the volatile qualifier from shutdown. (Since the original author
probably simply meant the variable should be atomic which we effectively
get through the mutex.
Signed-off-by: John Kacur <jkacur@redhat.com>
From f17765e52e248b3a738f5206cb4b97bdcc1a0204 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Tue, 1 Sep 2009 15:24:23 +0200
Subject: [PATCH] Add tags and TAGS to .gitignore
Add tags and TAGS to .gitignore, to prepare for a make tags option
"-" must be escaped ("\-") to be interpreted as minus, otherwise they
might be rendered as hyphen which makes it impossible to search for or
to cut'n'paste.
See http://lintian.debian.org/tags/hyphen-used-as-minus-sign.html for a
detailed explanation.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Note: the previous one sucked rockz, please try this one instead.
When running on a machine with not enough bandwidth it can be helpful to
only update the status when a new max is hit.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
so a normal user is able to take a look on the available options
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Clark Williams <williams@redhat.com>
if cyclictest is started with invalid arguments or $SOMETHING, then it
prints the help screen and the exit code is 0 which is wrong.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Clark Williams <williams@redhat.com>
moved policy display from individual threads to header with load average
did some sanity checking so that policy and priority match
Signed-off-by: Clark Williams <williams@redhat.com>
"cyclictest --help".
From: GeunSik Lim <leemgs1@gmail.com>
Reply-To: leemgs1@gmail.com
To: williams <williams@redhat.com>
Cc: linux-rt-users <linux-rt-users@vger.kernel.org>, tglx <tglx@linutronix.de>
When we use "#> cyclictest --help" command, we are confusing because of
random order of many options. Arrange alphabetically.
After Patch)
[root@fedora11 rt-tests]# ./cyclictest --help
cyclictest V 0.46
Usage:
cyclictest <options>
-a [NUM] --affinity run thread #N on processor #N, if possible
with NUM pin all threads to the processor NUM
-b USEC --breaktrace=USEC send break trace command when latency > USEC
-B --preemptirqs both preempt and irqsoff tracing (used with -b)
-c CLOCK --clock=CLOCK select clock
0 = CLOCK_MONOTONIC (default)
1 = CLOCK_REALTIME
-C --context context switch tracing (used with -b)
-d DIST --distance=DIST distance of thread intervals in us default=500
-D --duration=t specify a length for the test run
default is in seconds, but 'm', 'h', or 'd' maybe added
to modify value to minutes, hours or days
-E --event event tracing (used with -b)
-f --ftrace function trace (when -b is active)
-h --histogram=US dump a latency histogram to stdout after the run
(with same priority about many threads)
US is the max time to be be tracked in microseconds
-i INTV --interval=INTV base interval of thread in us default=1000
-I --irqsoff Irqsoff tracing (used with -b)
-l LOOPS --loops=LOOPS number of loops: default=0(endless)
-m --mlockall lock current and future memory allocations
-n --nanosleep use clock_nanosleep
-N --nsecs print results in ns instead of ms (default ms)
-o RED --oscope=RED oscilloscope mode, reduce verbose output by RED
-O TOPT --traceopt=TOPT trace option
-p PRIO --prio=PRIO priority of highest prio thread
-P --preemptoff Preempt off tracing (used with -b)
-q --quiet print only a summary on exit
-r --relative use relative timer instead of absolute
-s --system use sys_nanosleep and sys_setitimer
-t --threads one thread per available processor
-t [NUM] --threads=NUM number of threads:
without NUM, threads = max_cpus
without -t default = 1
-T TRACE --tracer=TRACER set tracing function
configured tracers: unavailable (debugfs not mounted)
-v --verbose output values on stdout for statistics
format: n:c:v n=tasknum c=count v=value in us
-w --wakeup task wakeup tracing (used with -b)
-W --wakeuprt rt task wakeup tracing (used with -b)
-y POLI --policy=POLI policy of realtime thread (1:FIFO, 2:RR)
format: --policy=1(default) or --policy=2
Signed-by-off: GeunSik Lim <geunsik.lim@samsung.com>
Signed-off-by: Clark Williams <williams@redhat.com>
users
From: GeunSik Lim <leemgs1@gmail.com>
To: williams <williams@redhat.com>
Cc: linux-rt-users <linux-rt-users@vger.kernel.org>, tglx <tglx@linutronix.de>
Current cyclictest support FIFO policy for static priority of
RT threads only. Append policy option to support FIFO or RR by user.
After this patch.
1) with FIFO about RT threads(default)
./cyclictest -t 5 -p 50
or ./cyclictest -t 5 -p 50 -y 1
or ./cyclictest -t 5 -p 50 --policy 1
2) with RR about RT threads(default)
./cyclictest -t 5 -p 50 -y 2
or ./cyclictest -t 5 -p 50 --policy 2
This is screenshot of threads using cyclictest & tuna utility after patch.
http://blogfiles6.naver.net/20090703_5/invain_1246588185266_sc7zEq_PNG/cyclictest-tuna-policy.PNG
Signed-off-by: GeunSik Lim <geunsik.lim@samsung.com>
Signed-off-by: Clark Williams <williams@redhat.com>
of many threads with -h
From: GeunSik Lim <leemgs1@gmail.com>
Reply-To: leemgs1@gmail.com
To: williams <williams@redhat.com>
Cc: linux-rt-users <linux-rt-users@vger.kernel.org>, tglx <tglx@linutronix.de>,
sdietrich@suse.de
If we run a many threads with -t option, "priority--" rt priority will assign
per thread in sequence. But, If we use -h option, all threads is same priority.
Append man page and cyclictest usage about the same priority of many threads
with -h option.
ex) cyclictest -t 5 -p 50 [enter] <-- without -h
ex) cyclictest -t 5 -p 50 -h 100 [enter] <-- with -h
Signed-off-by: GeunSik Lim <geunsik.lim@samsung.com>
Acked-by : Sven-Thorsten Dietrich <sdietrich@suse.de>
Signed-off-by: Clark Williams <williams@redhat.com>
Don't miss latency which exceed the histogram limit -
instead sample limit exceeding latency in the last bucket.
This is a leftover from cyclictest_histogram.patch:
-> Todo: Currently cyclictest does not report the number of samples
-> that exceeded the histogram max latency.
Handle OOM.
Signed-off-by: Daniel Gollub <dgollub@suse.de>
Reviewed-by: Sven-Thorsten Dietrich <sdietrich@suse.de>
--
This is useful when testing PREEMPT_NONE Kernels with cyclictest,
where latencies approaching 1 second can be observed.
Signed-off-by: Sven-Thorsten Dietrich <sdietrich@suse.de>
If clock_nanosleep() gets interrupted this could result in a negative
time diff from calcdiff().
With the histogram patch this leads to a segfault, since the time diff
is used as index for the histogram array:
Core was generated by `/usr/bin/cyclictest -n -q -p 99 -t 2 -i 500 -l
1000000 -h
20000'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000402324 in timerthread (param=<value optimized out>)
at src/cyclictest/cyclictest.c:339
339 stat->hist_array[diff] += 1;
(gdb) p diff
$1 = -751974
Signed-off-by: Daniel Gollub <dgollub@suse.de>
Acked-by: Sven-Thorsten Dietrich <sdietrich@suse.de>
You might wonder if this wasn't already fixed. Yes it was (in
f16ec27fb3), but the change was undone by 3e04327f7f.
While at it add an .br which makes the paragraph look a bit nicer.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This was noticed by GeunSik Lim.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: GeunSik Lim <leemgs1@gmail.com>
Cc: Luis Claudio R. Goncalves <lclaudio@uudg.org>
Cc: Clark Williams <williams@redhat.com>
Hello,
My first fix didn't took into account that long is 4 byte long on ARM. Therefor
I changed it to long long now, which works on my ARM board...
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Clark Williams <williams@redhat.com>
'-' chars are interpreted as hyphens by groff, not as minus signs. This
means that if you're using an UTF-8 locale searching for '-' to find
options doesn't work.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Hi Thomas,
The patch below removes the duplicate entry for the -m/--mlockall option from
the cyclictest manpage. Patch is againnst current HEAD of rt-tests.git
Cheers, Tobias
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
This is patch to support wakeup & wakeup_rt tracing at the argument of
cyclictest additionally. Current cyclictest support three tracing
like PREEMPTOFF, IRQSOFF, PREEMPTIRQSOFF just.
This additional function will help wakeup related tracing
about sleep api [ex: nanosleep() , usleep] of cyclictest.
Practically speaking, wakeup(+wakeup-rt) tracing by steven rostedt is useful
in the linux based embedded product development.
After patching,
Fedora9#> cat /debug/tracing/available_tracers
syscall blk kmemtrace power branch function_graph mmiotrace wakeup_rt wakeup \
preemptirqsoff preemptoff irqsoff function sched_switch initcall nop
Fedora9#> cyclictest -t 5 -p 80 -b 1000 -w -D 10 [enter] <--- tracing wakeup
Fedora9#> cat /debug/tracing/trace
Fedora9#> cyclictest -t 5 -p 80 -b 1000 -W -D 10 [enter] <--- tracing wakeup-rt
Fedora9#> cat /debug/tracing/trace
Signed-off-by: GeunSik Lim <geunsik.lim@samsung.com>
Signed-off-by: Clark Williams <williams@redhat.com>
Author: Lim,GeunSik <leemgs1@gmail.com>
Date: Tue Apr 21 16:03:56 2009 +0900
[PATCH] cyclictest: Remove duplicated description of cyclictest usage like -h.
We often utilize a various options with "#>cyclictest --help" command in the terminal environment.
When We run "#> cyclictest --help" command, We can show duplicated description about "-h" option
for latency histogram.
Unfortunatley, Some of the users is confusing because of two options about latency histogram.
[root@fedora9 invain]# ./cyclictest --help
cyclictest V 0.36
Usage:
cyclictest <options>
-a [NUM] --affinity run thread #N on processor #N, if possible
with NUM pin all threads to the processor NUM
-b USEC --breaktrace=USEC send break trace command when latency > USEC
-B --preemptirqs both preempt and irqsoff tracing (used with -b)
-c CLOCK --clock=CLOCK select clock
0 = CLOCK_MONOTONIC (default)
1 = CLOCK_REALTIME
-C --context context switch tracing (used with -b)
-d DIST --distance=DIST distance of thread intervals in us default=500
-E --event event tracing (used with -b)
-f --ftrace function trace (when -b is active)
-h H_MAX latency histogram size in us default 0 (off)
-i INTV --interval=INTV base interval of thread in us default=1000
................. [Middle Omission] ...................
-v --verbose output values on stdout for statistics
format: n:c:v n=tasknum c=count v=value in us
-D --duration=t specify a length for the test run
default is in seconds, but 'm', 'h', or 'd' maybe added
to modify value to minutes, hours or days
-h --histogram=US dump a latency histogram to stdout after the run
US is the max time to be be tracked in microseconds
For example,
-h H_MAX latency histogram size in us default 0 (off)
-h --histogram=US dump a latency histogram to stdout after the run
US is the max time to be be tracked in microseconds
As you see, We don't need "-h H_MAX . . . . . ." description.
So, I think that We have to remove old option about description of histogram function.
Signed-off-by: GeunSik Lim <leemgs1@gmail.com>
Author: Lim,GeunSik <leemgs1@gmail.com>
Date: Wed Apr 8 22:21:59 2009 +0900
[patch] cyclictest: bugfix getopt_long() for -C and -F.
We can not use -C option without --context option for tracing context switching.
ex) ./cyclictest -t 10 -m -b 100 -C
We can not use -E option without --event option for tracing events.
ex) ./cyclictest -t 10 -m -b 100 -E
Append -C and -E option on getopt_long() function to solve this problems.
Signed-off-by: GeunSik Lim <leemgs1@gmail.com>
Signed-off-by: Clark Williams <williams@redhat.com>
GeunSik Lim <leemgs1@gmail.com> found a problem with settracer()
in that it had a hardcoded limit to the number of tracers searched.
Unfortunately his patch found a bug in either fscanf or debugfs,
since it doesn't seem to return EOF at the end of input, so I reworked
the patch to read all the input and parse it using strtok.
Signed-off-by: Clark Williams <williams@redhat.com>
cyclictest results are presented in microseconds, although internal precision
uses nanosecond unit. This patch adds a command-line option for keeping the
nanoseconds precision. man page has also been update.
Signed-off-by: Luis Henriques <henrix@sapo.pt>
Signed-off-by: Clark Williams <williams@redhat.com>
The tracer setup happens in every thread, which is nonsense. First of
all it leads to a lot of irritating warnings because the things are
setup multiple times. The worst effect is that one tasks runs already
into the tracer stop condition and the next one reenables the tracer.
Move the tracer setup into the main thread and do it only once.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Clark Williams <williams@redhat.com>
Switching back to SCHED_OTHER in check_priv() fails due to the param
argument of sched_setscheduler() set to NULL.
Set the priority to 0 and hand in params.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Clark Williams <williams@redhat.com>
Cc: Clark Williams <williams@redhat.com>
Subject: [patch 2/2] cyclictest: support for latest mainline tracer
The tracer in mainline changed the interface another time. Make it
work again.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Clark Williams <williams@redhat.com>
Cc: Clark Williams <williams@redhat.com>
Subject: [patch 1/2] cyclictest: code cleanup
Started to grow whitespace and formatting sloppiness.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: Clark Williams <williams@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Luis Claudio Goncalves <lclaudio@uudg.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Clark Williams <williams@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Luis Claudio Goncalves <lclaudio@uudg.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Clark Williams <williams@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Luis Claudio Goncalves <lclaudio@uudg.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Problem: when running cyclic test, short options are not parsing
optional arguments correctly when followed by a space.
"-t3" works, but "-t 3" does not.
- Fix the processing of options with optional parameters, so that the user
can write -tNUM or -t NUM and it will work as expected. This was done
for the -t and -a options
- Modify the usage messages to correspond with the way the program makes use
of the options.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Data reduction (-o mode) did not work correctly with >1 threads.
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
I noticed I had a typo on sched_switch. I tested this on linux-tip tree
and it works there.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Cc: Darren Hart <dvhltc@us.ibm.com>
Cc: Subrata Modak <subrata@linux.vnet.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This patch has cyclictest work a bit better with ftrace. Some new options
have been added.
When -b is used:
-P : use the preemptoff tracer
-I : use the irqsoff tracer
-B : use preemptirqsoff tracer
If the above are not set, then it tries to use "events" tracer if it is
available (currently only available in the -rt kernel) and if that is not
set, it defaults to the sched-switch tracer.
-f will enabled the function tracer.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Cc: Darren Hart <dvhltc@us.ibm.com>
Cc: Subrata Modak <subrata@linux.vnet.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Not everyone mounts debugfs at /debug. This patch makes cyclictest search
for debugfs in the /proc/mounts directory.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Cc: Darren Hart <dvhltc@us.ibm.com>
Cc: Subrata Modak <subrata@linux.vnet.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
The appropriate cycle number of the maximum is now sent when in -o
mode. This is needed to more accurately determine the trace line that
is related to a particular latency.
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
The version check in cyclic test fails if proc isn't mounted or if OS
name isn't Linux (uClinux isn't uncommon). This patch fixes both
issues.
Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
CPU affinity isn't supported by all uClibc ports right now.
Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
as of uClibc-20080416 clock_nanosleep is still not implemented.
Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
When the output of the -v option is piped into another program and if
more data are sent than the other program can eat, data points get
lost. Since high latency values normally occur much less frequently
than average latency values, the connected program will miss many of
the high latency values, and the realtime capability of a given system
may appear much better than it is.
Therefore, the new option -o RED was introduced. This option causes
cyclictest to suppress every subsequent RED number of samples and
replace them with the maximum of the values encountered during that
sampling interval.
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
- Added support for the kernel tracer as of kernel 2.6.24
- Options mostly identical, irrespective of the kernel version
- Added check whether debug fs is mounted and tracing configured
- -v (verbose) option additionally makes tracing more verbose
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Add CPU affinitt option to cyclictest.
1. New option -a:
without argument to a cyclictest spreads the threads consecutive on
the available CPUs. On a quad core machine we get:
-a -t4 Thread #0 -> CPU #0
Thread #1 -> CPU #1
Thread #2 -> CPU #2
Thread #3 -> CPU #3
-a -t5 Thread #0 -> CPU #0
Thread #1 -> CPU #1
Thread #2 -> CPU #2
Thread #3 -> CPU #3
Thread #4 -> CPU #0
Adding a CPU number to the -a option all threads are pinned to
the given CPU:
-a3 -t4 Thread #0 -> CPU #3
Thread #1 -> CPU #3
Thread #2 -> CPU #3
Thread #3 -> CPU #3
2. extension of the -t option:
Without argument to -t cyclictest starts as many threads as CPUs are
available.
Signed-off-by: Carsten Emde <c.emde@osadl.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>