Commit Graph

487 Commits

Author SHA1 Message Date
Sebastian Andrzej Siewior e5d7ca1ac5 cyclictest: process option before checking for permissions
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>
2009-07-13 09:41:23 -05:00
Sebastian Andrzej Siewior 47e87a456c cyclictest: exit with an error code in error case
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>
2009-07-13 09:40:46 -05:00
Clark Williams 1b7ecf004b change options for --policy to be string names rather than integers
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>
2009-07-05 13:33:52 -05:00
Clark Williams de70815ad0 Subject: [PATCH]cyclictest: Arrange alphabetically for readability of
"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>
2009-07-05 12:58:51 -05:00
Clark Williams 1926b98439 Subject: [PATCH] cyclictest: Add policy option to support FIFO or RR by
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>
2009-07-05 12:58:27 -05:00
Clark Williams 78ae63b635 Subject: [PATCH] cyclictest : Appended man & usage about the same priority
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>
2009-07-05 12:58:01 -05:00
Daniel Gollub 4b1bc6a9bb Subject: Handle doomsday latency for cyclictest in histogram mode
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>
--
2009-07-02 17:10:44 -05:00
Sven-Thorsten Dietrich 63cf2a4809 Change output format to allow 6 digits.
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>
2009-07-02 09:29:36 -05:00
Clark Williams 66fb1db24e added debug prints and retry logic to hwlatdetect enable/disable code and detection code 2009-07-02 09:29:11 -05:00
Daniel Gollub 6092f3b705 Avoid segfault of cyclictest if it gets immediately interrupted.
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>
2009-07-02 09:28:04 -05:00
Clark Williams f247fd753a added code to resize window/width when setting the other to a smaller value 2009-06-30 13:36:06 -05:00
Uwe Kleine-König 2a1cf80ccc hwlatdetect.8: There is no macro .R
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>
2009-06-24 00:21:08 +02:00
Clark Williams eb0c42a27c added copyright header to hwlatdetect.py 2009-06-12 15:47:59 -05:00
Clark Williams 652127181c updated hwlatdetect.8 to reflect new options/behavior 2009-06-12 15:47:35 -05:00
Clark Williams 3e04327f7f merge resolution 2009-06-12 13:20:17 -05:00
Clark Williams ad5a12cb08 removed internal defaults (went with module defaults); added debugging code; make sure window set before width 2009-06-12 13:06:12 -05:00
Uwe Kleine-König c7deee8c38 Make comment describing set_debugfileprefix a bit clearer
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>
2009-06-12 15:38:06 +02:00
Clark Williams 556a10971c handled module changes 2009-06-10 23:32:41 -05:00
Clark Williams 446ff91990 the great renaming: smidetect -> hwlat 2009-06-10 13:50:02 -05:00
Clark Williams 758df97308 added non-blocking open+polling read to handle new module logic; added debug statements 2009-06-09 12:45:58 -05:00
Clark Williams 30edd0b4ab rewrite to match updated smi_detector module 2009-05-30 10:30:49 -05:00
Stefan Agner 0884033338 cyclictest: calcdiff calculated wrong seconds if the difference was bigger than 2147s
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>
2009-05-28 14:56:27 -05:00
Uwe Kleine-König f16ec27fb3 smidetect.8: There is no macro .R
For a normal font just use nothing.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2009-05-14 01:06:38 +02:00
Clark Williams 5aac188d85 added smidetect 2009-05-13 13:57:11 -05:00
Clark Williams e8711b5cb9 initial checkin 2009-05-12 16:54:06 -05:00
Clark Williams 45d0c73f33 initial checkin 2009-05-12 16:54:03 -05:00
Clark Williams 337bf38f80 initial checkin 2009-05-12 16:53:59 -05:00
Uwe Kleine-König c289046965 signaltest: fix typo in copyright header
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
2009-05-02 20:02:37 +02:00
Uwe Kleine-König 8565bd61b4 escape minus signs in manpages
'-' 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>
2009-05-02 18:01:34 +02:00
Clark Williams 95bd88ca5a added code to usage message to show configured tracers if debugfs mounted
Signed-off-by: Clark Williams <williams@redhat.com>
2009-04-30 15:27:15 -05:00
Tobias Klauser 3fc59347e8 cyclictest: Remove duplicate entry for -m from manpage
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>
2009-04-30 14:46:28 -05:00
Clark Williams 9187c3944b added --tracer and --traceopt options 2009-04-29 15:30:44 -05:00
Clark Williams 552bd1a203 added --tracer and --traceopt options 2009-04-29 15:23:22 -05:00
Clark Williams 9abe9601f7 correct usage message for -w and -W 2009-04-24 15:35:27 -05:00
Clark Williams 54623d8d7e add -w and -W 2009-04-24 15:35:04 -05:00
GeunSik Lim 870347de96 [PATCH] cyclictest: Add tracing function about wakeup and wakeup_rt of ftrace.
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>
2009-04-24 15:20:50 -05:00
GeunSik Lim 6d4136e501 cyclictest: Remove duplicated description of cyclictest usage like -h.
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>
2009-04-24 15:05:53 -05:00
Clark Williams 5dce871f96 updated cyclictest man page with -C/--context and -E/--event options 2009-04-20 14:07:05 -05:00
GeunSik Lim 7272c4d320 cyclictest: bugfix getopt_long() for -C and -F.
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>
2009-04-20 14:01:21 -05:00
Uwe Kleine-König 7453d772a0 Signed-off-by: Clark Williams <williams@redhat.com> 2009-04-07 15:08:17 -05:00
Clark Williams 1b3ee55106 reworked settracer()
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>
2009-04-05 09:31:24 -05:00
Clark Williams d2532aed60 fix formatting damage from nanosecond patch 2009-03-30 09:21:07 -05:00
Luis Henriques 58f08ef334 cyclictest: Added option for results in nanoseconds
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>
2009-03-28 09:35:11 -05:00
Thomas Gleixner a7bd17e188 cyclictest: init tracer only once
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>
2009-03-28 09:30:49 -05:00
Thomas Gleixner d4a986cb07 cyclictest: fix priviledge test
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>
2009-03-28 09:30:38 -05:00
Clark Williams 9ffdc557b3 added license header to sigtest.c 2009-03-21 09:58:57 -05:00
Thomas Gleixner 7aecff931f To: rt-users <linux-rt-users@vger.kernel.org>
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>
2009-02-13 15:36:14 -06:00
Thomas Gleixner 2c8f2d774e To: rt-users <linux-rt-users@vger.kernel.org>
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>
2009-02-13 15:36:13 -06:00
Luis Henriques 0a378282d4 he help for the -C option was being printed out inside the help of the -c
option.

Signed-off-by: Luis Henriques <henrix@sapo.pt>
Signed-off-by: Clark Williams <williams@redhat.c m>
2009-02-09 13:18:35 -06:00
Clark Williams 724dfb4690 changed deadlock detection to be a little more flexible 2008-12-18 16:46:58 -06:00
Clark Williams d3ae4c81ea updated pi_stress option processing 2008-12-18 15:55:10 -06:00
Luis Claudio R. Goncalves 9505ea6a6a Patch to fix tracer selection in cyclictest when using -b 2008-12-11 10:43:22 -06:00
Clark Williams 679b34e74b cyclictest fixup for tracing 2008-12-11 10:38:46 -06:00
Clark Williams 5d8328bb03 changed test to not require root 2008-12-02 12:22:25 -06:00
Clark Williams 3ece612bd1 add option to run for specified duration
Add an option (--duration or -D) to specify how long the test should run

Signed-off-by: Clark Williams <williams@redhat.com>
2008-10-22 14:33:51 -05:00
Sven-Thorsten Dietrich cb548199a6 Subject: Add histogram support to cyclictest
Add -h <size> parameter and functionality to log histograms of latencies
in cyclictest.

Signed-off-by: Sven-Thorsten Dietrich <sdietrich@suse.de>
2008-10-22 13:23:02 -05:00
Clark Williams 2e058f7f98 fixed merge breakage 2008-09-25 15:13:51 -05:00
Clark Williams 2d45d878ba Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tglx/rt-tests
Conflicts:
	src/cyclictest/cyclictest.c
	src/pi_tests/pi_stress.8
2008-09-25 15:11:56 -05:00
Thomas Gleixner 5d3ac6cb76 cyclictest: remove duplicate option in help text
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-07-27 22:49:02 +02:00
Alessio Igor Bogani 69d53796da Fix typo in pi_stress manpage
Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-07-24 18:27:07 +02:00
Alessio Igor Bogani 5cd772b14a Differentiate hyphen and minus in manpages
Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-07-24 18:27:07 +02:00
Clark Williams d60e13722d fixed formating damage
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>
2008-07-12 04:21:23 +02:00
Clark Williams 198975b2e4 updated man pages for --mlockall option
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>
2008-07-12 04:18:39 +02:00
Clark Williams 1e00c7a587 added mlockall option
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>
2008-07-12 04:18:39 +02:00
Clark Williams 1c3872ef1d Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tglx/rt-tests
Conflicts:

	src/cyclictest/cyclictest.c
2008-07-08 08:45:51 -05:00
John Kacur 3ad6648f2c Fix the processing of optional options for cyclictest
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>
2008-07-06 19:20:35 +02:00
Clark Williams 699c38bb8d Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tglx/rt-tests
Conflicts:

	.gitignore
	src/cyclictest/cyclictest.8
	src/cyclictest/cyclictest.c
2008-06-12 19:43:21 -05:00
Carsten Emde 6963a41f68 rt-tests/cyclictest.c: oscilloscope mode did not work correctly with >1 threads
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>
2008-06-05 08:41:15 +02:00
Alessio Igor Bogani 434091fc65 Fix some typo in the cyclictest's man page 2008-06-04 17:30:07 +02:00
Steven Rostedt 65d1cb7079 cyclictest: sched_switch not sched-switch
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>
2008-06-04 17:17:26 +02:00
Steven Rostedt 9ba30e6ef2 cyclictest: handle latest ftrace
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>
2008-06-04 17:17:26 +02:00
Steven Rostedt fcee9fe2e0 cyclictest: search for debugfs
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>
2008-06-04 17:17:26 +02:00
Clark Williams 5587d442ee fixed formating damage 2008-05-09 13:43:55 -05:00
Clark Williams f6db792ba4 updated man pages for --mlockall option 2008-05-09 13:40:08 -05:00
Clark Williams c4a44c163d added mlockall option 2008-05-09 13:28:50 -05:00
Carsten Emde 2df51a799f cyclictest: send correct cycle number in -o mode
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>
2008-04-18 14:22:17 +02:00
Sebastian Siewior 6a0f073aa4 cyclictest: fix "get kernel version"
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>
2008-04-18 14:22:17 +02:00
Sebastian Siewior 342e3b83ee cyclictest: fix build on uClibc due to missing cpu affinity
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>
2008-04-18 14:22:17 +02:00
Sebastian Siewior 7f4ac71644 cyclictest: fix for uClibc builds
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>
2008-04-16 11:12:04 +02:00
Carsten Emde 4cb277ee27 cyclictest: add -o option to reduce -v option's output speed
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>
2008-04-16 11:12:04 +02:00
Carsten Emde 82155e3d9e cyclictest & kernel>=2.6.24
- 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>
2008-04-16 11:12:04 +02:00
Carsten Emde f055732c16 cyclictest: add CPU affinity
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>
2008-04-06 17:25:05 +02:00
Clark Williams fea12d35c3 added pi_tests; added specfile for rpm generation 2008-01-03 13:26:22 -06:00
Alessio Igor Bogani 899ebf7302 Fix kernel parameters in cyclictest's manpage
Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-12-21 10:24:48 +01:00
Alessio Igor Bogani be4a5a9807 Unified versions into Makefile
Packaging version control

Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-12-14 15:25:29 +01:00
Alessio Igor Bogani 79ad2eca9a COPYING file and cyclictest's man page added
Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-12-14 15:25:29 +01:00
Alessio Igor Bogani e6b7207115 Re-organized sources
Move code around to make packaging easier.

Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-12-14 15:25:29 +01:00