summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-02-23hwlatdetect: convert from optparse to argparse for python3hwlatdetect_py3Clark Williams1-48/+48
Signed-off-by: Clark Williams <williams@redhat.com>
2018-02-23hwlatdetect: fix str/binary mismatchesClark Williams1-2/+2
Signed-off-by: Clark Williams <williams@redhat.com>
2018-02-23hwlatdetect: initial python3 changesClark Williams1-15/+16
Signed-off-by: Clark Williams <williams@redhat.com>
2017-05-15Make -x option position-agnosticJianxun Zhang1-2/+0
Change 9d2c9edd86943dfea399a0176826af8bb92bf97c introduces the new option of POSIX timer and makes MODE_CLOCK_NANOSLEEP the default choice. But there are two places explicitly set MODE_CLOCK_NANOSLEEP to the variable use_nanosleep in the code, so the actual value of the variable after parsing depends on the position of '-x' to '-U' and '-S'. These command pairs result in different values in the variable: 'cyclictest -S -x' VS 'cyclictest -x -S' 'cyclictest -U -x' VS 'cyclictest -x -U' This change ensures -x work regardless its position by removing the two lines in these cases. Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2017-05-04cyclictest: cannot stop running with '-M' optionJianxun Zhang1-2/+17
Most of time having '-M' option causes cyclictest won't exit after a duration ('-D') expires, like this quick command on my machines: sudo cyclictest -S -M -D2 -d0 This is because the main thread is blocked on waiting for the next update of MAX, but the timer thread doesn't signal the main thread before it quits. Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2017-04-24cyclictest: touch threadstacks on numa to pre-fault themClark Williams1-0/+3
On a numa system we allocate a stack from the closest NUMA node for each measurement thread. We need to touch those stack pages to prevent them faulting when first run. Not a big deal on a system with just a few cores, but overhead adds up with 32+ cores. Signed-off-by: Clark Williams <williams@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2017-04-11cyclictest: make clock_nanosleep as default and add option for POSIX timers.Vedang Patel1-8/+9
It is recommended that clock_nanosleep should be used for real-time wherever available. So, make sure that cyclictest runs clock_nanosleep by default. Added an option to run POSIX timers. Removing the '-n' option because it is redundant now. Signed-off-by: Vedang Patel <vedang.patel@intel.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2017-03-22hwlatdetect: removed smi_detector supportClark Williams1-122/+16
We haven't tested/supported the old smi_detector module since the 2.6 kernel. Remove support for running it. Signed-off-by: Clark Williams <williams@redhat.com> - Fixed minor typo where part of he shebang was removed Signed-off-by: John Kacur <jkacur@redhat.com>
2017-03-22hwlatdetect: modify hwlatdetector.py to use the ftrace hwlatdetectorClark Williams1-108/+232
- modify hwlatdetector.py to detect and use the ftrace hwlatdetector - rewrite using base class for detector Big rewrite where we create a base Detector class and use that as the base class for Tracer and Hwlat classes. Signed-off-by: Clark Williams <williams@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2017-03-20hwlatdetect: Add --hardlimit to define the real test failing criteriaClark Williams1-1/+12
We decided it is more interesting, in our automated tests, to have a higher tolerance to SMI as most of the test boxes are not optimized for RT. On the other hand, we would like to know how big are the SMI latencies on these boxes. This commit adds the --hardlimit parameter, which defines the real PASS/FAIL latency criteria. Latencies above --threshold will be annotated, but the test may PASS if the observed latencies are smaller than --hardlimit. When --hardlimit is not informed, the value used for --threshold is also used as the hard limit. Signed-off-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com> Signed-off-by: Clark Williams <williams@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-10-28rt-tests: cyclictest: Correct short option 's'John Kacur1-1/+1
The short option 's' was originally intended to be the short form of --system Commit b35bc97cfd05bd27324b9c373ff8c5e0bcb07f7f which added the new option --secaligned broke this, by accidently inserting the new option between the short form and long form. Reported-by: Daniel Seemer <phaiax-cyclictest@invisibletower.de> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-10-28rt-tests: cyclicdeadline: Fix minor spelling mistakeJohn Kacur1-1/+1
Fix spelling mistake, "that" should be "than" in the following message For less that 2ms run times, you need to have HRTICK enabled in debugfs/sched_features Signed-off-by: John Kacur <jkacur@redhat.com>
2016-08-18rt-tests: hwlatdetect: Improve message if max latency is below thresholdJohn Kacur1-2/+8
Improve message if max latency is below threshold. If the maximum latency is below the threshold for reporting, 0us is output. This is confusing, and not accurate, so print the message "Below threshold" instead. Suggested-by: Jiri Kastner <jkastner@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-06-30rt-tests: deadline_test: Made '-i' work and added help text for itSteven Rostedt (Red Hat)1-1/+2
Although the interval code was added the 'i' was missing from the getopt list, and there was no help text for it either. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-06-24rt-tests-1.1.1: Remove _GNU_SOURCE from source filesJohn Kacur3-9/+0
Remove _GNU_SOURCE from source files since it is defined in the Makefile Signed-off-by: John Kacur <jkacur@redhat.com>
2016-06-23rt-tests: Add cyclicdeadline and deadline_test to the Make systemJohn Kacur4-1/+16
- Add cyclicdeadline and deadline_test to the Makefile - Conditionally define _GNU_SOURCE in the new programs - Add the new programs to the .gitignore file Signed-off-by: John Kacur <jkacur@redhat.com>
2016-06-23rt-tests: Add cyclicdeadline and deadline_testJohn Kacur2-0/+3364
Add cyclicdeadline and deadline_test - these are two programs written by Steven Rostedet to test the functionality and performance of SCHED_DEADLINE Signed-off-by: John Kacur <jkacur@redhat.com>
2016-06-23rt-tests: Makefile, change version to 1.1John Kacur1-1/+1
Rethinking the naming scheme, so changing the development line from 2.0 to 1.1 Signed-off-by: John Kacur <jkacur@redhat.com>
2016-05-31cyclictest: new CPUs with SMI counter supportDaniel Bristot de Oliveira1-0/+4
Cyclictest's SMI counter implementation is based on the turbostat tool in the Linux kernel. This patch syncs cyclictest's has_smi_counter() with turbostat's check. From turbostat's commits: cdc5727 tools/power turbostat: initial KBL support ec53e59 tools/power turbostat: initial SKX support e4085d5 tools/power turbostat: initial BXT support [ John & Clark, I did it in the branch devel/v2.0, but we need ] [ this in the 0.x and 1.x series as well. ] Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-05-14rt-tests: Makefile: Add missing install of rt-migrate-test.8 man pageJohn Kacur1-0/+1
Add missing install of rt-migrate-test.8 man page Signed-off-by: John Kacur <jkacur@redhat.com>
2016-05-13rt-tests: Create a new unstable line called devel/rt-tests-2.0John Kacur1-1/+1
Bump the Version number and create a devel/2.0 branch Signed-off-by: John Kacur <jkacur@redhat.com>
2016-05-13rt-tests: Makefile - bump version to 1.0John Kacur1-1/+1
We've arrived, it's version 1.0! Signed-off-by: John Kacur <jkacur@redhat.com>
2016-05-13rt-tests: Remove doc/release-checklist.txtJohn Kacur1-9/+0
This checklist is no longer relevant. It has a lot of steps that are distro relevant, and I've removed all of the files that are not distro independent Signed-off-by: John Kacur <jkacur@redhat.com>
2016-05-13rt-tests: hwlat.txt: smidetect renamed to hwlatdetectJohn Kacur1-8/+9
- smidetect was long ago renamed to hwlatdetct, reflect this in hwlat.txt - Fix a few spelling mistakes, and add a missing option Signed-off-by: John Kacur <jkacur@redhat.com>
2016-05-13rt-tests: Housekeeping fix some spelling errors.John Kacur7-15/+15
Fix a number of errors like procesor->processor, specifed->specified and cylictest->cyclictest. Note, Uwe Kleine-König <ukleinek@debian.org> pointed out some of these spelling errors previously. Signed-off-by: John Kacur <jkacur@redhat.com>
2016-05-13rt-tests: Add missing option to hwlatdetect man pageJohn Kacur1-4/+8
Add --watch to the man page. Correct a few spelling errors at the same time. Signed-off-by: John Kacur <jkacur@redhat.com>
2016-05-04cyclictest: stop any tracing after hitting a breaktrace thresholdClark Williams1-6/+26
John, This patch is against the devel/v0.98 branch. It turns off tracing in the tracemark() so that we don't lose information about what was going on when we hit the latency: The current logic of using --tracemark and --notrace works for running cyclictest with trace-cmd, but even if we are not doing any trace manipulation in cyclictest, we still need to stop tracing when we hit a breaktrace threshold (i.e. -b <n>). Modify startup logic to hold open file descriptors for the tracemark file *and* the tracing_on file. When we hit a threshold and call the tracemark() function, write the marker to the trace buffers and then write a "0\n" to the tracing_on file to turn off tracing, otherwise we lose the information immediately prior to the point where we hit the latency. Signed-off-by: Clark Williams <williams@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-04-25rt-tests: Update the cyclictest man pageJohn Kacur2-96/+112
We have done a good job keeping cyclictest help up-to-date, but we have not been actively updating the man page. There were many missing options, as well as options that don't exist anymore. To be more precise, some short form options had been removed, but there are still corresponding long-version options. This patch contains a considerable amount of updates to the man-page to keep it in sync, and in some cases it also updates the cyclictest help where needed. For example, the cyclictest help options were not always in the proper order. In some cases I changed the wording to make it more closely correspond to the man page Signed-off-by: John Kacur <jkacur@redhat.com> Signed-off-by: Clark Williams <williams@redhat.com>
2016-04-21rt-tests: Add man page for rt-migrate-testJohn Kacur1-0/+56
Added a man page for rt-migrate-test Fairly minimal, based on the output from the --help option Signed-off-by: John Kacur <jkacur@redhat.com>
2016-04-21rt-tests: Makefile: Assume numa_parse_cpustring_all availableJohn Kacur1-6/+7
NUMA users should have long ago stepped up to libs that have numa_parse_cpustring_all(). Make this the default so that we can include isolated cpus in the affinity string. If there are any NUMA users or distros left that have old libraries that don't have numa_parse_cpu_string_all(), and only numa_parse_cpu_string() they can compile like this make HAVE_PARSE_CPUSTRING_ALL=0 Signed-off-by: John Kacur <jkacur@redhat.com> Reviewed-and-Tested-by: Luiz Capitulino <lcapitulino@redhat.com>
2016-03-31rt-tests: Makefile: Bump version number to 0.97John Kacur1-1/+1
Bump version number to v0.97 for the next release Signed-off-by: John Kacur <jkacur@redhat.com>
2016-03-24cyclictest: Make the tracemark option imply notraceJohn Kacur1-0/+1
The new --tracemark option can be used to run cyclictest under trace-cmd. This means we don't want cyclictest's built-in tracing to be used, so this option is only compatible with --notrace. Therefore turn --notrace on if --tracemark is invoked even if the user doesn't explicitly request this. Signed-off-by: John Kacur <jkacur@redhat.com>
2016-03-24Revert changes to rt-migrate-test for exit(1)John Kacur1-2/+3
Commit 3290f8412a4562adbc05b38d8e5212090e41587e changed exit(-1) to exit(1) for many programs in rt-tests for consistency. rt-migrate-test needs tri-state exit statuses, because of the way some existing bash scripts consume it's results. This could no-doubt be improved in the future, and there are some inconsistencies in the exit statuses in this program alone, but as they are not urgent to fix, and the current fix makes things worse, reverting this for now. Signed-off-by: John Kacur <jkacur@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
2016-03-24cyclictest: add --tracemark optionLuiz Capitulino1-1/+20
cyclictest will only write to /sys/kernel/debug/tracing/trace_maker if it's also setup to do tracing. This conflicts with running cyclictest under trace-cmd. The --tracemark option tells cyclictest to write to the trace_marker file even when it's not doing tracing. It can be used like this: # trace-cmd record [...] cyclictest [...] -bX --tracemark --notrace Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-03-22cyclictest: move debugfs init code to its own functionLuiz Capitulino1-4/+9
A function added by a future commit will want to call this code too. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-03-22cyclictest: tracing(): check for notraceLuiz Capitulino1-2/+5
If you pass -b and --notrace to cyclictest today, it will write to tracing_on when -b latency is reached. Fix this by making tracing() check notrace. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-03-22cyclictest: move tracemark_fd handling to its own functionLuiz Capitulino1-8/+14
A function added by the next commit will want to call this code too. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-03-22don't use exit(-1) for failuresLuiz Capitulino4-8/+7
The kernel uses only 8 bits of the status as a return code, so this actually becomes 255 in the shell. In any case, the most widely convension is exit(1) for failures, so let's be consistent. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-02-09cyclictest: Add --smi description on cyclictest man pageDaniel Bristot de Oliveira1-0/+4
Add the description of the --smi comand line option of cyclictest. "--smi Enable SMI count/detection on processors with SMI count support." Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-02-09cyclictest: SMI count/detection via MSR/SMI counterDaniel Bristot de Oliveira1-10/+219
Use the MSR/SMI counter on Intel's processor to detect/count SMIs. It is based on turbostat's implementation. SMI counting is enabled via --smi argument. When enabled, and additional field is added on both regular and verbose ouput. On the regular output, a SMI column shows how many SMIs occurred on each CPU during cyclictest's execution. For example: policy: fifo: loadavg: 0.09 0.05 0.02 1/194 2288 T: 0 ( 2285) P:80 I:1000 C: 9975 Min: 2 Act: 3 Avg: 4 Max: 20831 SMI: 2 T: 1 ( 2286) P:80 I:1500 C: 6650 Min: 2 Act: 2 Avg: 5 Max: 19910 SMI: 2 T: 2 ( 2287) P:80 I:2000 C: 4987 Min: 2 Act: 2 Avg: 6 Max: 20811 SMI: 2 T: 3 ( 2288) P:80 I:2500 C: 3990 Min: 2 Act: 3 Avg: 7 Max: 20322 SMI: 2 On verbose output, the last column shows how many SMIs occurred on each loop. For example: [ CPU | Loop | Lat | SMIs ] 0: 2156: 2 0 0: 2157: 2 0 0: 2158: 2 0 0: 2159: 20981 2 1: 1433: 2 0 1: 1434: 2 0 1: 1435: 2 0 1: 1436: 3 0 1: 1437: 2 0 1: 1438: 2 0 1: 1439: 20249 2 Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-01-13hwlatdetect: make reading sample date work with python2 and python3Clark Williams1-3/+9
Modify the sample reading code to return correct string data and to catch exceptions in non-blocking mode correctly on python{2,3} Signed-off-by: Clark Williams <williams@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-01-13hwlatdetect: modify to handle python3 printsClark Williams1-3/+5
Use __future__ import of print_function and make sure all instances of print are now functions rather than statements. Signed-off-by: Clark Williams <williams@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-01-13hwlatdetect: handle hwlat_detector being builtin rather than moduleClark Williams1-1/+21
Originally the hwlat_detector was built as only a module and was controlled by module parameters. The latest version uses debugfs control files so there is no real need to force it to be a module. The hwlatdetector script in rt-tests assumes that the hwlat_detector code was built as a module. This patch adds logic to detect and handle if hwlat_detector is a builtin. Signed-off-by: Clark Williams <williams@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2016-01-05Makefile: Set CC/AR variable only if it doesn't have a valueKhem Raj1-2/+2
This helps it compile with clang or any other compilers besides gcc Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-22Makefile: fixed dropped quote in help target textClark Williams1-1/+1
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-22Makefile: Remove anything to do with rpms, specs etcJohn Kacur1-53/+3
Remove anything to do with rpm, spec, release and so on that should be maintained in distribution specific ways. One exception is make tarball, which is useful in a more general way. Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-22gitattributes: add doc, remove rt.spec-inJohn Kacur1-1/+1
The doc dir only contains one file which is a list of things for the maintainers to do at release time, no need to package this in the tarball. Since the file rt.spec-in has now been removed, we no-longer need to mention it in the .gitattributes file Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-22Remove rt-tests.spec-inJohn Kacur1-524/+0
There is no need to maintain this file here, since it's not general enough for general use. Every distribution will have it's own way of doing this. Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-22Makefile: Version bump to v0.96John Kacur2-6/+28
Version bump to v0.96 and changelog additions to rt-tests.spec-in Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-22Merge branch 'devel/v0.96-spikes' into devel/v0.96John Kacur1-5/+116
There was an easily fixed merge conflict in the option_values, using the conflict as an opportunity to clean this up Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-22rt-sched.h: do not unconditionally define syscall-numbersHenrik Austad1-0/+4
These could be defined elsewhere, be careful when defining these Cc: John Kacur <jkacur@redhat.com> Signed-off-by: Henrik Austad <haustad@cisco.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-22Android: Expand match for android in ostypeHenrik Austad1-6/+8
Some buildsystems use androidabe, so an exact match will break in those circumstances. Cc: John Kacur <jkacur@redhat.com> Signed-off-by: Henrik Austad <haustad@cisco.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-22Android: rename arch from bionic to androidHenrik Austad2-2/+1
Bionic is the libc implementation used in Android and should not be confused with the architecture. Cc: John Kacur <jkacur@redhat.com> Signed-off-by: Henrik Austad <haustad@cisco.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-22Android: clean up the bypass ifdefferyHenrik Austad3-36/+48
88af643971b9 (android: adjust target for android) introduced some really ugly ifdefs to avoid calling into pthread_barrier_wait and pthread_barrier_init. This patch attempts to coalesce this into a single place and let the compiler handle the linking so that cyclictest.c is untouched by evil ifdefs. It also combines NO_PTHREAD_BARRIER and NO_PTHREAD_SETAFFINITY into a PTHREAD_BIONIC as it does not make much sense to keep them separated. Compiled and tested on: - x86_64 (v3.13 kernel) - tilegx (v3.10 kernel) - arm64 android (v3.10 kernel) Note: this includes bionic.h unconditionally, so it makes most sense to keep bionic.h in src/include/ (and not in src/arch/bionic/). Cc: John Kacur <jkacur@redhat.com> Signed-off-by: Henrik Austad <haustad@cisco.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-21cyclictest: fix #ifdef broken by NO_PTHREAD_SETAFFINITYJohn Kacur1-5/+4
Unfortunately c869f3cdcd023eec2f767eb4094caa88178717a4 wasn't sufficient to fix #ifdef #else functionality for uclib, broken by the changes for bionic. In practice this probably didn't break anyone though, except possibly for the new bionic code which probaly doesn't have too many adapters (yet). This should also help Henrik move the NO_PTHREAD_SETAFFINITY functionality to the bionic file. Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-21cyclictest: Add a feature to record spikesJohn Kacur1-2/+112
Create a linked-list of data, including a time stamp, that is recorded everytime a latency measurement is above a given number (trigger). This data is printed out at the end of a run. If we have more spikes than we have allocated nodes in our list for, we stop recording the data, but keep counting the number of spikes. This introduces two new long options. --spike=trigger, where the trigger is given in usec. Any time a spike > trigger occurs we record the data. --spike-nodes=num_of_nodes, is the amount of data we can record, the default is 1024 Here is what a sample run looks like. (non-rt kernel) su -c './cyclictest -t4 -p99 --spike=30 --duration=60' Password: policy: fifo: loadavg: 0.69 0.78 0.60 1/641 6420 T: 0 ( 6385) P:99 I:1000 C: 59996 Min: 2 Act: 2 Avg: 2 Max: 1476 T: 1 ( 6386) P:99 I:1500 C: 39999 Min: 1 Act: 2 Avg: 2 Max: 952 T: 2 ( 6387) P:99 I:2000 C: 29999 Min: 2 Act: 2 Avg: 3 Max: 504 T: 3 ( 6388) P:99 I:2500 C: 23999 Min: 1 Act: 2 Avg: 2 Max: 1423 T: 2 Spike: 504: TS: 490531620 T: 2 Spike: 270: TS: 526847386 T: 2 Spike: 51: TS: 527211167 T: 2 Spike: 44: TS: 528261160 T: 1 Spike: 31: TS: 528952631 T: 2 Spike: 32: TS: 529253148 T: 2 Spike: 52: TS: 529317169 T: 0 Spike: 1444: TS: 530049519 T: 1 Spike: 419: TS: 530049520 T: 0 Spike: 1476: TS: 530318551 T: 1 Spike: 952: TS: 530318553 T: 3 Spike: 1423: TS: 530318551 T: 0 Spike: 972: TS: 531532046 T: 0 Spike: 34: TS: 531987109 spikes = 14 Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-14Makefile: Move TARGETS back to a more logical place in the MakefileJohn Kacur1-3/+2
Place TARGETS after sources. The evaluation of it doesn't depend on it's position in the file, so remove the incorrect comment Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-14Makefile: have distclean remove .asc file for tarballClark Williams1-1/+1
Signed-off-by: Clark Williams <williams@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-14specfile: add signaltest manpage to files section and remove trailing ↵Clark Williams1-1/+2
whitespace in changelog Signed-off-by: Clark Williams <williams@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-14Makefile: OBJDIR should be an order-only-prerequisiteJohn Kacur1-3/+3
OBJDIR should be an order only prerequisite. - create the OBJDIR if necessary before .d, .o and before all TARGETS including hwlatdetect - Don't rebuild if the timestamp on the OBJDIR changes Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-09Makefile: add target to create OBJDIR before useClark Williams1-1/+4
Signed-off-by: Clark Williams <williams@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-09Fix some trivial typos found by codespell(1)Uwe Kleine-König4-5/+5
Inheritence ==> Inheritance occured ==> occurred surpress ==> suppress Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-08cyclictest: Clean-ups in timerthread before working on itJohn Kacur1-21/+29
- Clean this function up a bit before modifying it - Don't use assignment in if statements - Put spaces before open braces and parentheses - Break lines up where possible that go over 80 chars Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-07maintainence: VERSION bump and Change-log updateJohn Kacur2-16/+80
- Update the VERSION in the Makefile - Update the Change-log in rt-tests.spec-in Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-07cyclictest: move redefine of CPUSET back to uclibHenrik Austad1-5/+5
This was mistakenly included in the #ifdef in 88af643971b9 (android: adjust target for android). Moved back into the correct #ifdef-entry. Cc: Clark Williams <williams@redhat.com> Cc: John Kacur <jkacur@redhat.com> Signed-off-by: Henrik Austad <haustad@cisco.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-06Bionic: Move android functionality into it's own arch MakefileJohn Kacur2-26/+29
- Make the Makefile more readable by moving android functionality to it's own Makefile. - Don't evaluate TARGETS until after including arch Makefiles Signed-off-by: John Kacur <jkacur@redhat.com> Tested-by: Henrik Austad <haustad@cisco.com>
2015-10-06Makefile: Only call cc -dumpmachine once in the makefileJohn Kacur1-4/+8
- Store the result of cc -dumpmachine in the dumpmachine variable - Use makefile parsing to obtain the ostype - Use shell and sed functions to obtain the machinetype - Turn on the bionic functionality if the ostype=android Signed-off-by: John Kacur <jkacur@redhat.com> Tested-by: Henrik Austad <haustad@cisco.com>
2015-10-06drop compiling without NPTL supportUwe Kleine-König1-8/+11
all programs apart from sendme use pthreads so NPTL=no is hardly useful any more. Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-06rt-migrate-test: remove space before \nUwe Kleine-König1-1/+1
This fixes a checkpatch warning WARNING: unnecessary whitespace before a quoted newline Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-06Makefile: Document certain compiling optionsJohn Kacur1-10/+21
- Document compiling with and without NUMA, explaining the defaults - Document compiling with HAVE_PARSE_CPUSTRING_ALL Reorganize these options a little for readability Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-05remove several unused MakefilesUwe Kleine-König6-141/+0
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-05backfire: remove unused header fileUwe Kleine-König1-1/+0
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-05signaltest: Add a man page to signaltestJohn Kacur3-9/+59
- Add a man page to signaltest - Improve the display_help in signaltest - Add install of new man page to makefile Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-05rt-utils: Fix some checkpatch errors in rt-utils.cJohn Kacur1-13/+15
Although we have less strict rules than the linux kernel some of the checkpatch complaints really do make the files better and easier to read. Fix a few of these. Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-05rt-utils: Add John Kacur to the copyrightJohn Kacur1-0/+1
Not sure why I wasn't added to the copyright of this file the first time around, but add it now Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-05signaltest: Check the status of pthread_createJohn Kacur1-1/+7
Check the status of pthread_create to help debug signaltest Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-05signaltest: call process_options before calling check_privsJohn Kacur1-3/+3
Call process_options beforeing checking priviledges so that process_options can display help for a normal user as designed. This was already fixed in cyclictest. I also tested everywhere else to make sure this is now fixed everywhere. I fixed some small white spaces problems at the same time. Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-05build: Generate .o, .a, and .d files in bld dirJohn Kacur2-18/+21
When building rt-tests, object files, libs and .d (dependencies) were all generated in the base directory. Instead, place all of these build files in a dir called bld. The final programs are still in the basedir Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-05Explicitly separate VPATH paths with a colonJohn Kacur1-2/+2
VPATH paths can be separated by either a space or a colon. Explicitly insert a colon instead of relying on a space being inserted due to the spacing of our Makefile Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-21Version bump to v0.94John Kacur1-1/+1
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-21android: adjust target for androidHenrik Austad2-9/+63
Bionic (Android's libc implementation) lacks support for (amongst other things) pthread_barriers and pthread_setaffinity. The former is removed by ifdeffery, the latter is added as a per-android wrapper to sched_setaffinity. Signed-off-by: Henrik Austad <haustad@cisco.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-21Makefile: add librttest to rt-migrate-testHenrik Austad1-2/+2
linker must be able to resolve reference to err_msg_n properly rt-migrate-test.c:(.text+0x1ff): undefined reference to `err_msg_n' Signed-off-by: Henrik Austad <haustad@cisco.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-21Add a rebuild-switch to MakefileHenrik Austad1-0/+5
Update from joshc for job-level safety Co-authored.by: Josh Cartwright <joshc@ni.com> Signed-off-by: Henrik Austad <haustad@cisco.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-21Add syscall-number for sched_(gs)etattr() for tileHenrik Austad1-0/+5
Signed-off-by: Henrik Austad <haustad@cisco.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-21Add CROSS_COMPILE-switch to CC and ARHenrik Austad1-0/+2
Signed-off-by: Henrik Austad <haustad@cisco.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-17cyclictest: add option for dumping the histogram in a fileJosh Cartwright1-37/+59
On Wed, Sep 16, 2015 at 01:05:51AM +0200, John Kacur wrote: > On Mon, 31 Aug 2015, Josh Cartwright wrote: > > From: Gratian Crisan <gratian.crisan@ni.com> > > > > Add an option '-J' or '--histfile' to dump the latency histogram to <path> > > instead of stdout. This allows for live update of the current min, avg, and max > > numbers while retaining the option to save histogram data for later analysis. > > > > Signed-off-by: Gratian Crisan <gratian.crisan@ni.com> > > Signed-off-by: Josh Cartwright <joshc@ni.com> [..] > > We worked really hard to remove the large amount of options, and we may > have been over zealous in some cases (Carsten?). Fair enough, cyclictest has way too many knobs. Regardless, we've at least found this particular option useful. > If I were to accept this patch, I would at least like you to remove > the short form option, and just have it in the long form. Here is a v2 with the short form -J dropped. Thanks, Josh -- 8< -- From: Gratian Crisan <gratian.crisan@ni.com> Subject: [PATCH v2] cyclictest: add option for dumping the histogram in a file Add an option '--histfile' to dump the latency histogram to <path> instead of stdout. This allows for live update of the current min, avg, and max numbers while retaining the option to save histogram data for later analysis. Signed-off-by: Gratian Crisan <gratian.crisan@ni.com> Signed-off-by: Josh Cartwright <joshc@ni.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-17error: mark fatal, err_exit, err_quit as being noreturnJosh Cartwright1-3/+3
These functions never return to their caller. Mark them as such to aide in code generation and help out static analysis. Signed-off-by: Josh Cartwright <joshc@ni.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-17cyclictest: fail if use_fifo && thread creation failedJosh Cartwright1-1/+4
Signed-off-by: Josh Cartwright <joshc@ni.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-17cyclictest: drop impossible use_fifo conditionalJosh Cartwright1-3/+0
The fifothread is only created when use_fifo is set; having the thread itself perform a check is redundant and unnecessary. Drop it. Signed-off-by: Josh Cartwright <joshc@ni.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-17cyclictest: use correct type when allocating cpu bitmask sizeJosh Cartwright1-1/+1
On any sane platform sizeof(long) == sizeof(unsigned long), so this does not actually fix a real bug, but the code should at least be consistent. Signed-off-by: Josh Cartwright <joshc@ni.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-17numa_on_and_available: Remove from main in cyclictestJohn Kacur2-10/+15
We don't support building without numa libs anymore, although we of course support running on machines without numa. Never-the-less I created two versions of numa_on_and_available, one for if you build with the unsupported NUMA=0 and one for if you build with NUMA=1, which is the default. I would prefer not to drop this function, since I think it cleanly documents the fact that numa_available must be called before any other numa library functions are defined. As Josh Cartwright reported though, there was no need to call it from main() since it was already tested in process_options(), so I tested it there. Tested by building with NUMA=0, NUMA=1 and with the non-standard -Wimplicit-function-declaration Reported-by: Josh Cartwright <joshc@ni.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-02cyclictest: consistently make all functions 'static'Josh Cartwright1-5/+5
Most functions in cyclictest were already 'static', with a few exceptions. Fixup those exceptions, in the interest of consistency, optimization, etc. Signed-off-by: Josh Cartwright <joshc@ni.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-02hackbench: cleanup error handling in create_workerJosh Cartwright1-21/+15
The childinfo_t union shares the 'long long error' member with a 'pthread_t threadid'. For a "sufficiently large" threadid, it's possible that the error condition is incorrectly hit even though a valid thread was created. Stop conflating the error condition with legitimate thread/process identifiers by modifying create_worker to explicitly return an error code. Inspired by a patch in OpenEmbedded authored by Song Li and Jesse Zhang. Cc: Song.Li <Song.Li@windriver.com> Cc: Jesse Zhang <sen.zhang@windriver.com> Signed-off-by: Josh Cartwright <joshc@ni.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-02rt-tests: workaround poor gzip implementationsJosh Cartwright1-10/+10
Some 'gzip' implementations, in particular 'pigz' don't properly handle the '-c' argument if it's passed after the name of the input files. Work around this by putting the '-c' option before the file names. Inspired by patches in OpenEmbedded by Robert Yang and Kai Kang. Cc: Robert Yang <liezhi.yang@windriver.com> Cc: Kai Kang <kai.kang@windriver.com> Signed-off-by: Josh Cartwright <joshc@ni.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-02rt-tests: Break out install_hwlatdetectDarren Hart1-7/+11
Allow hwlatdetect to be installed independently of the rest of the tests. This is convenient for build systems that package it separately due to the python dependency. Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Clark Williams <williams@redhat.com> CC: John Kacur <jkacur@redhat.com> Signed-off-by: Josh Cartwright <joshc@ni.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-02rt-tests: Allow for user-specified PYLIBDarren Hart1-1/+1
Allow users (build systems) to specify PYLIB. This allows for a cross-build-system to specify the target PYLIB rather than the host PYLIB. Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Clark Williams <williams@redhat.com> CC: John Kacur <jkacur@redhat.com> Signed-off-by: Josh Cartwright <joshc@ni.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-02rt-migrate-test: updated to latest code from rostedtClark Williams1-16/+24
Signed-off-by: Clark Williams <williams@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com> Put Back #ifndef _GNU_SOURCE We define _GNU_SOURCE in our Makefile. I don't mind having it a second time as documentation in the files, but we need to have the #ifdef to prevent the compiler warning about it being redfined Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-02hwlatdetect: initial cut at tracking the amount of SMIs that occurred during ↵Clark Williams1-0/+25
a run Signed-off-by: Clark Williams <williams@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-08-17Fix VERSION in rt-migrate-testJohn Kacur1-5/+2
- Change VERSION_STRING to VERSION to get the same version number as the the rest of the suite - Assume that VERSION is defined, instead of replacing it with a nonsensical number - Print the help option in the usage() function Reported-by: DIXLOR <dixlor@gmail.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-08-12Version bump to v0.93Clark Williams1-1/+1
Signed-off-by: Clark Williams <williams@redhat.com>
2015-08-12doc: fix VERSION in release-checklist.txtClark Williams1-1/+1
Signed-off-by: Clark Williams <williams@redhat.com>
2015-08-12hwlatdetect: added --watch option to watch output in realtimeClark Williams1-13/+25
Signed-off-by: Clark Williams <williams@redhat.com>
2015-08-06Merge remote-tracking branch 'kernel.org/v0.93-devel' into workClark Williams0-0/+0
2015-07-24cyclictest: Fix long priority help text optionAlexander Stein1-1/+1
The help text shows prio as the long option name for the process priority. But it is actually priority. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Clark Williams <williams@redhat.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-07-22cyclictest: Fix long priority help text optionAlexander Stein1-1/+1
The help text shows prio as the long option name for the process priority. But it is actually priority. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
2015-07-09Create an rt-tests.tar file using git-archiveJohn Kacur1-0/+5
Create an rt-tests.tar file using git-archive so we don't mistakenly pull in uncommitted files Signed-off-by: John Kacur <jkacur@redhat.com>
2015-07-09Change VERSION_STRING to VERSIONJohn Kacur9-18/+18
Adding _STRING doesn't add any extra meaning, but the extra length makes the Makefile more unreadable than is necessary, so shorten this up Signed-off-by: John Kacur <jkacur@redhat.com>
2015-07-09Add .tar files to .gitignoreJohn Kacur1-0/+1
Ignore .tar files too Signed-off-by: John Kacur <jkacur@redhat.com>
2015-07-09Create a .gitattribute file to specify what files git-archive should ignoreJohn Kacur1-0/+4
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-30Fix possible exit on error without releasing mutexJohn Kacur1-4/+11
Coverage tools indicate that there are two spots where the function low_priority() could exit without releasing the mutex. Since the only error that pthread_barrier_wait is supposed to give is EINVAL when the barrier is not an initialized barrier object, the chances of this happinning seem remote. However, if we are going to test for the error and potentially exit, then we should release the mutex too. Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-30Fix warning: unused variable ‘c’John Kacur1-1/+0
This is a legitimate compiler warning, so remove the unused variable. Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-09makefile: fixed release targetHEADv0.92masterClark Williams1-1/+1
Added MAINTAINERS, doc and README.markdown to the tar archive generation logic. Signed-off-by: Clark Williams <williams@redhat.com>
2015-06-09Version bump to v0.92John Kacur2-1/+18
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-09Add a MAINTAINERS fileJohn Kacur1-0/+9
Adding a MAINTAINERS file to let people know where to send their patches. Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-09cyclictest: Align measurement threads to the next full secondAnna-Maria Gleixner1-5/+34
cyclictest: Align measurement threads to the next full second cyclictest starts the test threads at a random point in time. For fully reproducible tests it is required to schedule the threads with a specified offset from the timer tick. The influence of the tick can be measured by running the test with offset = 0 and offset = tickinterval/2. To achieve this we rely on the fact, that the kernel starts the tick at CLOCK_MONOTONIC time 0. So it's guaranteed that the tick timer expires always every second (if the interval between the ticks defined by CONFIG_HZ is a whole-number divider of a second). Setting the global start time of the test threads to a full second (plus offset) and the interval to the interval between the ticks, the threads are scheduled with the specified offset to the tick. Add a new option --secaligned which select this mode and modify the --aligned option code to support this. The --secaligned and --aligned options are mutually exclusive. Signed-off-by Anna-Maria Gleixner <anna-maria@glx-um.de> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-08cyclictest: Convert the offset of the alignment option to microsecondsAnna-Maria Gleixner1-2/+2
The offset is specified in microseconds according to the documentation, but, the microseconds to nanoseconds conversion is missing so the effective offset has the unit of nanoseconds. Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-02cyclictest: Ensure that next wakeup time is never in the pastanna-maria@glx-um.de1-0/+12
The calculated next wakeup time is already in the past, if the latency is longer than the interval. Thereby latency is detected that does not correspond to latency caused by the system but by cyclictest itself. Force forward the next wakeup time past now. Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-05-27Allow building with -DHAVE_PARSE_CPUSTRING_ALLJohn Kacur1-3/+7
This is a temporary solution until we have time to look into autotools If you know that you are building on a system that has numa_parse_cpustring_all() Then you can type make HAVE_PARSE_CPUSTRING_ALL=1 to define it. If you omit that, then the default is the old behaviour that uses numa_parse_cpustring((char *)s) Signed-off-by: John Kacur <jkacur@redhat.com>
2015-05-20cyclictest: consider the 4 as the major versionSebastian Andrzej Siewior1-1/+1
Teach cyclictest to recognize the major version 4 which we do have now. Featurewise it should behave like the 3.0 series Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-03-03Makefile: cleanup linking to librttest.aMichael Olbrich1-12/+13
Only add '-lrttest -L.' where it's actually needed. Use '$<' instead of '$^'. Otherwise librttest is added twice: As 'librttest.a' and as '-lrttest'. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-03-03Fix minor grammar mistake in the help outputJohn Kacur1-1/+1
Change "quick" to quicker, so the help message reads -c --check Stop if lower prio task is quicker than higher (off) Signed-off-by: John Kacur <jkacur@redhat.com>
2015-03-03pi_stress: Clear affinity for DEADLINE tasksDaniel Wagner1-0/+13
Deadline tasks are not allowed to set smp affinity. Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-02-24Makefile: pi_stress need librttest.a so it should depend on itMichael Olbrich1-1/+1
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-02-17version bump to 0.91v0.91Clark Williams2-1/+10
Signed-off-by: Clark Williams <williams@redhat.com>
2015-02-17pi_stress: remove timestamp of compilation from version outputUwe Kleine-König1-1/+0
Having the date and time of compilation is hardly useful and is in the way for reproducible building binaries. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Clark Williams <williams@redhat.com>
2015-02-17rt-migrate-test: sanity check --prio valueClark Williams1-1/+5
Make sure we get a value between 1 and 99 for --prio. Also change print for invalid --loops from Warning to Error (if we call exit then it's an error). Signed-off-by: Clark Williams <williams@redhat.com>
2015-02-17rt-migrate-test: make sure input parameters are converted to correct unitsClark Williams1-3/+3
The input parameters for run_interval and interval are specified on the command line as millisecond values. Convert these to nanosecond values before we use them. Signed-off-by: Clark Williams <williams@redhat.com>
2015-02-17rt-migrate-test: use variables instead of macrosBoris Egorov1-3/+3
By default, static variables run_interval and interval assigned to macros with corresponding uppercase name, RUN_INTERVAL and INTERVAL. Later in code we should only use these variables to properly handle options passed by user. Signed-off-by: Boris Egorov <egorov@linux.com> Signed-off-by: Clark Williams <williams@redhat.com>
2015-02-17rt-migrate-test: exit early if nr_runs is non-positiveBoris Egorov1-1/+4
Program will crash if nr_runs is 0 due to dividing by it in print_results(). Let's exit early instead. Fixes: http://bugs.debian.org/716237 Signed-off-by: Boris Egorov <egorov@linux.com> Signed-off-by: Clark Williams <williams@redhat.com>
2015-01-27version bump to 0.90v0.90Clark Williams2-1/+25
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2015-01-15Makefile: allow building selected tests with non-NPTL toolchainAlexey Brodkin1-3/+8
Some architectures are still stuck with non-NPTL toolchains. These are for example ARC, Blackfin, Xtensa etc. Still rt-tests are very good benchmarks and it would be good to enable use of at least selected (those that will be built) tests on those architectures. This change makes it possible to only build subset of tests that don't require NPTL calls. By default behavior is not modified - all tests are built, but if one wants to build with non-NPTL toolchain just add "HAVE_NPTL=no" in command line or modify "HAVE_NPTL" variable right in Makefile and execute "make". Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Clark Williams <clark.williams@gmail.com>
2015-01-15specfile: update template and make build exclusive to x86_64Clark Williams1-3/+6
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2015-01-15pip_stress: parameterize usleep value to work-around platform issuesClark Williams1-1/+13
ARM platforms have timing issues with pip_stress: Hello, pip_stress works out of the box on my x86 based laptop, but doesn't work on ARM devices, returned 'no inversion incurred'. Follow the comment to increase usleep value, 2500 worked for pandaboard and 3000 worked for Beaglebone Black board. I propose that increase the usleep value to 3500 from upstream, so that we can use pip_stress right out of the box. Rather than hardcode the usleep value used by pip_stress, I made the command line option --usleep which takes a microsecond value that defaults to 500us. Reported-by: Chase Qi <chase.qi@linaro.org> Signed-off-by: Clark Williams <clark.williams@gmail.com>
2014-11-06pi_stress: Store schedule attributes per threadDaniel Wagner1-34/+211
Currently, the scheduling class is configured on a global level. It is possible to run the test either with SCHED_FIFO or SCHED_RR. All threads run then with the same configuration except sched_priority is different. By storing the scheduling attributes per thread we will be able to use different scheduler classes at the same time. The aim is to use SCHED_DEADLINE for the high priority thread. First thing to get there is to introduce low_sa, med_sa, high_sa and admin_sa. They are configured using the global policy variable on default. Either using SCHED_FIFO or SCHED_RR. The user can though use --sched command line options to configure each thread seperately. E.g. Starting PI Stress Test Number of thread groups: 1 Duration of test run: infinite Number of inversions per group: unlimited Admin thread SCHED_FIFO priority 4 1 groups of 3 threads will be created High thread SCHED_DEADLINE runtime 100000 deadline 200000 period 200000 Med thread SCHED_FIFO priority 2 Low thread SCHED_FIFO priority 1 Current Inversions: 2446249 Stopping test Terminated Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06rt-utils: Add gettid()Daniel Wagner2-0/+8
We still lack a gettid implemenation from libc. Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06rt-utils: Add helper to parse/print scheduling policiesDaniel Wagner2-0/+43
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06rt-sched: Add sched_setattr/sched_getattr APIDaniel Wagner3-2/+121
Until we have a proper libc implementation we maintain a simple version of it. We this new API we are able to use SCHED_DEADLINE. This is shamelessly stolen from Dario Faggioli's libdl. Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de> Cc: Dario Faggioli <raistlin@linux.it>
2014-11-06pi_stress: Use error.h for logging and debuggingDaniel Wagner1-140/+115
In order to be able to use some of the rt-utils.h function we need to get rid of our own info() & friends implementation. Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06error: Add debug() functionDaniel Wagner2-0/+11
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06pi_stress: Remove unused TIMER_SIGNAL definitionDaniel Wagner1-2/+0
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06rt-tests.h: Remove unused header fileDaniel Wagner1-124/+0
There is no user of this header file. Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06hackbench: Don't re-assign context for each fdDaniel Wagner1-4/+4
A small optimization. Setting it once is enough. Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06Merge remote-tracking branch 'jkacur/v0.89-devel' into workClark Williams0-0/+0
2014-08-18cyclictest: make affinity option only use number of online cpusJoakim Hernberg2-2/+2
When I boot my 8 core i7 laptop with the maxcpus=4 kernel boot flag, cyclictest -S runs 8 threads. This patch makes it only use the number of online cpus instead. Signed-off-by: Joakim Hernberg <jhernberg@alchemy.lu> Signed-off-by: John Kacur <jkacur@redhat.com>
2014-08-18cyclictest: Add long option --laptop to preserve battery powerJohn Kacur1-1/+13
Some people running cyclictest on laptops don't want to automatically take advantage of the trick that prevents the power management to transition to high cstates, since it eats up their battery power. Allow them to suppress this feature with --laptop This will result in power latency results of course. Feature-requested-by: Joakim Hernberg <jhernberg@alchemy.lu> Signed-off-by: John Kacur <jkacur@redhat.com>
2014-08-15Merge remote-tracking branch 'jkacur/v0.89-devel' into workClark Williams3-26/+49
2014-08-15cyclictest: make affinity option only use number of online cpusJoakim Hernberg2-2/+2
When I boot my 8 core i7 laptop with the maxcpus=4 kernel boot flag, cyclictest -S runs 8 threads. This patch makes it only use the number of online cpus instead. Signed-off-by: Joakim Hernberg <jhernberg@alchemy.lu> Signed-off-by: John Kacur <jkacur@redhat.com>
2014-08-14cyclictest: Add long option --laptop to preserve battery powerJohn Kacur1-1/+13
Some people running cyclictest on laptops don't want to automatically take advantage of the trick that prevents the power management to transistion to high cstates, since it eats up their battery power. Allow them to suppress this feature with --laptop This will result in power latency results of course. Feature-requested-by: Joakim Hernberg <jhernberg@alchemy.lu> Signed-off-by: John Kacur <jkacur@redhat.com>
2014-08-14cyclictest: Fix help for long options onlyJohn Kacur1-4/+5
At some point in the history of cyclictest, a number of short options were removed and changed to long only options. However the display_help was not updated to reflect this and indicates short options that no longer exist. Fix this. I also found a long option that wasn't listed at all and added that. Signed-off-by: John Kacur <jkacur@redhat.com>
2014-08-14cyclictest: Change the output from function sighand() to stderrJohn Kacur1-4/+4
cyclictest can be run from other tools such as rteval in order to get current status on long runs, SIGUSR1 is sent to cyclictest and caught by function sighand() This creates difficulties for rteval when parsing cyclictest output, so change the output to stderr. Note, a RFC was sent out on Apr.15 2014 entitled "RFC: SIGUSR1 to stderr" to: RT <linux-rt-users@vger.kernel.org> cc: Carsten Emde <C.Emde@osadl.org>, Thomas Gleixner <tglx@linutronix.de>, Clark Williams <williams@redhat.com> Since I didn't receive any replies, I'm assumin there are no objections Signed-off-by: John Kacur <jkacur@redhat.com>
2014-08-14cyclictest: Always print an err message if write of 0 to cpu-dma_latency failsJohn Kacur1-12/+22
In set_latency_target() there are some paths that don't print an error message even when a write of 0 to /dev/cpu_dma_latency fails. This patch does the following - always print an error message if the write to /dev/cpu_dma_latency fails - Fix the error check with the write call. (a return of 0 or -1 indicate problems - rename ret to err since this function is void and returns no value - use err_msg_n instead of printf (which also prints to stderr) Signed-off-by: John Kacur <jkacur@redhat.com>
2014-07-23make SMP option only use online cpus.Joakim Hernberg2-2/+2
2014-05-09rt_numa.h: Suppress discards 'const' qualifier warningJohn Kacur1-1/+1
In rt-tests we try to use const where appropriate for read-only, but we need to tell the compiler we are intentionally discarding const when calling library functions that expect char * Signed-off-by: John Kacur <jkacur@redhat.com>
2014-05-09lib: Rework err_msg_n to output strerror after messageJohn Kacur2-4/+4
Outputting the message first followed by the strerror makes the error messages more readable. Signed-off-by: John Kacur <jkacur@redhat.com>
2014-03-30Merge branch 'work'Clark Williams4-22/+26
2014-03-30version bump to 0.89v0.89Clark Williams2-1/+5
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2014-03-30cyclictest: fix leftover debbuging comment in argument processingClark Williams1-1/+1
Left a single line comment in the switch statement for handling affinity options. Removed it. Signed-off-by: Clark Williams <clark.williams@gmail.com>
2014-03-29hwlatdetect: convert to run with both python2 and python3Clark Williams1-20/+20
Ran 2to3 on hwlatdetect.py and checked in the result. Tested on F20 system running 3.12.14-rt23 with both python2 and python3. Signed-off-by: Clark Williams <clark.williams@gmail.com>
2014-03-28removed debugging comments and printfsClark Williams1-4/+2
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2014-03-28Merge branch 'work'Clark Williams2-1/+8
2014-03-28version bump to 0.88v0.88Clark Williams2-1/+8
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2014-03-28cyclictest: Don't offer --numa option when unavailableGary S. Robertson1-1/+3
Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> Signed-off-by: Clark Williams <williams@redhat.com>
2014-03-28cyclictest: Restore CPU affinity function for non-NUMA buildsGary S. Robertson1-70/+127
Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> Signed-off-by: Clark Williams <williams@redhat.com>
2014-03-26Don't offer --numa option when unavailableworkGary S. Robertson1-3/+7
Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> Signed-off-by: Clark Williams <williams@redhat.com>
2014-03-26Restore CPU affinity function for non-NUMA buildsGary S. Robertson1-70/+127
Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> Signed-off-by: Clark Williams <williams@redhat.com>
2014-01-31cyclictest: Fix tracemark output when the latency threshold is hit on ARMUwe Kleine-König1-1/+3
on ARM I'm seeing output like: cyclicte-623 0....... 19619418us+: tracing_mark_write: hit latency threshold (2000 > 2097) That's because of a format mismatch in tracemark("hit latency threshold (%d > %d)", diff, tracelimit); diff is a u64 and tracelimit an int. So on ARM the string is passed in r0, tracelimit in r1 and diff in r2+r3. vsnprintf used in tracemark only expects two ints passed and so only uses r1 and r2 yielding the permutation in the output. This patch also adds a gcc attribute to tracemark that helps catching similar bugs. In this case just adding the attribute but not touching the call site, would result in: src/cyclictest/cyclictest.c: In function ‘timerthread’: src/cyclictest/cyclictest.c:899:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘uint64_t’ [-Wformat] --- Hello after some chatting with Clark and John I dropped the c99 stuff and added the attribute annotation. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-12-12rt-tests: hackbench: fix for uninitialized start timeCiprian Barbu1-4/+10
Hello, While playing around with hackbench I discovered that I would sometimes get an enormous time reported, even if the run time would be less than a second or so. The problem was that the struct timeval start was not initialized until after all children have been created. But if the program receives a signal before this is done, the start time is left uninitialized. I propose that in such situations an error message be displayed, like the following patch does. Please let me know if this is acceptable. Regards, /Ciprian Signed-off-by: Clark Williams <williams@redhat.com>
2013-12-11version bump to 0.87v0.87Clark Williams2-1/+5
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-12-11fixed #ifdef that cuts -A option in display_help()Clark Williams1-6/+6
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-12-11CPU affinity now takes arbitrary set of cpus.Aaron Fabbri3-22/+181
e.g. cyclictest -a4,6-8 -t5 will use 5 threads, assigned round-robin to the set of CPUs {4,6,7,8}. CPU 4 will get threads 1 and 5, CPU 6 gets thread 2, CPU 7 gets thread 3, and CPU 8 gets thread 4. As explained in the updated manpage, libnuma >= v2 is required for these arbitrary CPU sets. With libnuma v1, the -a option behaves as before. As before, compiling without libnuma is supported. The command usage help is fixed up at compile time to always show the correct usage of the -a option. Also note that, since numa_parse_cpustring_all() wasn't available in early libnuma v2 versions, we use numa_parse_cpustring(). This means you'll have to use taskset in some cases (isolcpus kernel parameter) to add the desired CPUs to the set of allowed cores, e.g.: taskset -c4-6 cyclictest -a4-6 Tested with out libnuma (numactl), and with versions 1.0.2 and 2.0.9-rc3. Signed-off-by: Aaron Fabbri <ajfabbri@gmail.com> (cherry picked from commit 5375ab86e77881d8043e5e309bb8daf5a84cc05f) Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-11-15updated Makefile and do-git-push script to use kupClark Williams2-11/+14
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-11-15version bump to 0.86v0.86Clark Williams2-10/+29
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-11-14cyclictest: Align option fixesJohn Kacur1-9/+12
These changes make the align option truly optional as claimed. 1. Rename disaligned to offset for readability. 2. Fix the aligned option so that if no optional argument is given, the offset defaults to 0 3. Fix some white space problems as reported by checkpatch.pl in the kernel Signed-off-by: John Kacur <jkacur@redhat.com>
2013-11-14cyclictest: add align thread wakeup times optionNicholas Mc Guire2-6/+44
This patch provides and additional -A/--align flag to cyclictest to align thread wakeup times of all threads as closly defined as possible. When running multiple threads in cyclictest (-S or -t # option) the threads are launched in an unsynchronized manner. Basically the creation order and time for thread creation determines the start time. For provoking a maximum congestion situation (e.g. cache evictions) and to improve reproducibility or run conditions the start time should be defined distances appart. The well defined distance is implemented as a offset parameter to -A/--align and will offset each threads start time by the parameter * the sequentially assigned thread number (par->tnum), together with the -d0 (distance in the intervals of the individual threads) this alignment option allows to get the thread wakeup times as closely synchronized as possible. The method to sync is simply that the thread with par->tnum == 0 is chosen to set a globally shared timestamp, and all other threads use this timestamp as their starting time rather than each calling clock_gettime() at startup. To ensure synchronization of the thread startup the setting of the global time is guarded by pthread_barriers. Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Reviewed-by: Andreas Platschek <andreas.platschek@opentech.at> Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-11-14minor cleanup in cyclictestNicholas Mc Guire1-1/+0
HI ! just noticed a, presumably, unnecessary tsnorm in cyclictest Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-11-14cyclictest: modify option handling to use enumerated typesClark Williams1-82/+162
Change return value from option parsing to be enumerated type rather than a character. Hopefully this will clean up the option handling a bit and not confuse me when I come back to add yet another option to cyclictest. Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-04-11hackbench: init child's struct before using itSebastian Andrzej Siewior1-1/+2
Commit ad27df7 ("Reimplement better child tracking and improve error handling") changed the way of reporting pid/error after creating a child. It will return an union which is a mix pid_t, pthread_t and a signed long long for errors. Now on 32bit x86 both pid_t and pthread_t are four byte in size and are stored in the first 4 bytes. Now if the most significant bit of the long long variable happens to be set by chance (because nobody really initializes the variable here) then error variable will be negative. On little endian machines the assignment of pid or threadid won't reset the sign bit and you see this: | Running in process mode with 10 groups using 40 file descriptors each (== 400 tasks) | Each sender will pass 100 messages of 100 bytes | 0 children started. Expected 40 | sending SIGTERM to all child processes | signaling 0 worker threads to terminate | Creating workers (error: Success) A machine with proper endian handlig (that is big endian) would reset the sign bit during the assignment of pid and I would not have to make this patch :) While here, I make create_worker() since it is not used outside of this file. Cc: David Sommerseth <davids@redhat.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-03-13cyclictest: allow break threshold without doing any tracingClark Williams1-4/+7
Add the --notrace/-A option, intended to be used in conjunction with the -b option. This will cause cyclictest to exit when a threshold is hit, but will not perform any tracing operations, allowing more sophisticated tracing to be done externally. Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-03-13cyclictest: add named fifo for statisticsClark Williams1-11/+79
This code adds the -F/--fifo option to cyclictest. Using the --fifo <path> option will cause cyclictest to create a named fifo at <path> and will dump the current run statistics to that fifo when it is opened an read. Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-02-15cyclictest: finish removal of 1 second first loopsJim Somerville1-4/+2
Huge latencies are observed (close to 1 second) when certain options are used in cyclictest. The problem was 1st introduced at commit da4956cbcaf7945554f ("use interval on first loop instead of 1 second"). It removed the 1 second first timing loop out of the main path in cyclictest but left it in two other paths, namely the ones triggered by these two options: -r --relative use relative timer instead of absolute -s --system use sys_nanosleep and sys_setitimer which in turn causes the huge latencies of close to 1 second to be reported by cyclictest with certain uses of those two options. Here we extend the original commit to remove the 1 second hardcoded timer values from the RELTIME and ITIMER options, by simply using the actual interval provided instead. Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com> Cc: Clark Williams <williams@redhat.com> Cc: John Kacur <jkacur@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2013-02-15Makefile: Don't tag files in dir BUILD from rpm buildsJohn Kacur1-1/+1
Don't tag copies of files in BUILD created when building an rpm Without this change tags finds both copies, eg: for tag cyclictest.c # pri kind tag file 1 F F cyclictest.c BUILD/rt-tests/src/cyclictest/cyclictest.c 1 2 F F cyclictest.c src/cyclictest/cyclictest.c With this change, only the later one is found Signed-off-by: John Kacur <jkacur@redhat.com>
2013-02-15rt-tests: NUMA optional for make rpmFrank Rowand2-3/+14
version 2: - Add new placeholders in rt-tests.spec-in to make the replacements by "make rpm" more visible to future maintainers of rt-tests.spec-in - fix typo of my name in rt-tests.spec-in rt-tests can be built without NUMA: make NUMA=0 But "make rpm" does not have a way to be successful without NUMA: build_rt-tests_0.85> make rpm for F in cyclictest signaltest pi_stress rt-migrate-test ptsematest sigwaittest svsematest pmqtest sendme pip_stress hackbench *.o .depend *.*~ *.orig *.rej rt-tests.spec *.d *.a ChangeLog; do find -type f -name $F | xargs rm -f; done rm -f hwlatdetect rm -f tags rm -rf BUILD BUILDROOT RPMS SRPMS SPECS releases *.tar.gz rt-tests.spec tmp git log >ChangeLog mkdir -p releases mkdir -p tmp/rt-tests cp -r Makefile COPYING ChangeLog src tmp/rt-tests tar -C tmp -czf rt-tests-0.85.tar.gz rt-tests rm -f ChangeLog cp rt-tests-0.85.tar.gz releases sed s/__VERSION__/0.85/ <rt-tests.spec-in >rt-tests.spec rpmbuild -ba --define "_topdir /a/home/frowand/me/src/rt-tests/build_rt-tests_0.85" --define "_sourcedir /a/home/frowand/me/src/rt-tests/build_rt-tests_0.85/releases" --define "_builddir /a/home/frowand/me/src/rt-tests/build_rt-tests_0.85/BUILD" rt-tests.spec error: Failed build dependencies: numactl-devel is needed by rt-tests-0.85-1.fc12.src make: *** [rpm] Error 1 The following patch allows the rpm to be built without NUMA, with the command: make NUMA=0 rpm Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2013-02-15Makefile: Add BUILDROOT and SPECS to the dirs to remove for distcleanJohn Kacur1-1/+2
make rpm creates the dirs BUILDROOT and SPECS that are missed by distclean. Gather all rpm related DIRS to the RPMDIRS and add that to distclean. Signed-off-by: John Kacur <jkacur@redhat.com> Reviewed-by: Frank Rowand <frank.rowand@am.sony.com> Tested-by: Frank Rowand <frank.rowand@am.sony.com>
2013-02-15Makefile: Add tmp dir to distclean and "make release" call distcleanJohn Kacur1-3/+3
The files in the tmp dir are generated during make release. These are the kind of generated files that should be removed for distclean, So add tmp. make release can be slightly simplified by then depending on distclean instead of clean. Signed-off-by: John Kacur <jkacur@redhat.com> Reviewed-by: Frank Rowand <frank.rowand@am.sony.com> Tested-by: Frank Rowand <frank.rowand@am.sony.com>
2013-02-15Makefile: Don't tag tmp files created when making a releaseJohn Kacur1-1/+1
Don't tag the copies of the source files placed in the tmp directory during the creation of a release. Without this change tags finds both copies, eg: for tag cyclictest.c # pri kind tag file 1 F C F cyclictest.c src/cyclictest/cyclictest.c 1 2 F F cyclictest.c tmp/rt-tests/src/cyclictest/cyclictest.c 1 With this change only the first one is found. Signed-off-by: John Kacur <jkacur@redhat.com> Reviewed-by: Frank Rowand <frank.rowand@am.sony.com> Tested-by: Frank Rowand <frank.rowand@am.sony.com>
2013-01-30cyclictest: white space cleanupFrank Rowand1-22/+21
Clean up cyclictest formatting: Change leading spaces to tabs. Align function parameters. Place type of function on same line as function name. Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2012-11-13version bump to 0.85v0.85Clark Williams2-1/+16
Signed-off-by: Clark Williams <williams@redhat.com>
2012-11-09Merge branch 'clrkwllms/work' into rt-tests-0.84-develJohn Kacur1-0/+33
Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17V3: cyclictest: report large measured clock latencyFrank Rowand1-1/+108
V3: Use src/lib/error.c functions instead of fprintf. Fix printf format warnings for 32 bit vs 64 bit systems with cast. One issue with using warn() and info() instead of fprintf is that the compiler no longer warns about format mismatches. Fix bad continuation line white space prefix. Remove unused variable zero_diff. cyclictest: ARM panda clock resolution will be ~30 usec unless CONFIG_OMAP_32K_TIMER=n, resulting in a poor latency report. This patch does _not_ fix the problem, it merely provides the instrumentation to make it visible. The value of measured resolution is useful information for any system. Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> - Fixed up minor white space problem. Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17V3: cyclictest: clean up getopt_long() parametersFrank Rowand1-71/+74
V3: unchanged from V2 cyclictest getopt_long() parameter clean up. Clean up before following patch which will add a new option. Some elements of long_options were not in alphabetical order. Some elements of optstring were not in alphabetical order. '-e', '--latency' was missing help text short form of --duration ('D') was missing from optstring Change a few instances of leading spaces to tabs. Add white space to long_options to improve readability. Some cases of the switch processing the result of getopt_long() were not in alphabetical order. Did _not_ clean up option value parsing and processing. Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Signed-off-by: John Kacur <jkacur@redhat.com> Conflicts: src/cyclictest/cyclictest.c
2012-10-17rt-tests Makefile: Add CPPFLAGS to the pattern rule to generate dependenciesJohn Kacur1-1/+1
Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17rt-tests Makefile: separate CFLAGS and CPPFLAGSUwe Kleine-König1-2/+3
For compilation to work -D_GNU_SOURCE -Isrc/include is needed to be passed to the compiler. For Debian packaging several things are added but not these two from above. So be a bit more friendly and add them unconditionally. There is no harm if they are included in the user supplied CFLAGS and so passed twice. Moreover be a bit more correct about CFLAGS/CPPFLAGS. Both should be passed to the compiler with CFLAGS taking options for the compiler and CPPFLAGS taking options for the preprocessor. This is also needed for Debian packaging where the helper scripts set CPPFLAGS. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17rt-tests: have printf use %s format for stringsUwe Kleine-König4-8/+8
Discovered while compiling with "hardening flags" For Debian 7.0 (aka wheezy) packages it's recommended to use several hardening flags, the default on amd64 being: CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-z,relro This patch doesn't fix all warnings but at least makes all programs compile again by not using char *variables as printf format strings. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17rt-tests / gitignore: Exclude patches and .a libs too.John Kacur1-0/+2
Minor fix to make working with git nicer. Now that we're building a lib, we need to exclude it from git status output. Do the same for patches we generate or apply. Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17cyclictest: histogram overflow instance trackingBhavesh Davda1-3/+23
Add feature to cyclictest histogram mode to track cycle counts every time a sample overflows the histogram limit. This should help identify if there is a timing pattern to jitters in cyclictest runs. Example output (with -h 10): ... Histogram Overflows: 00001 00007 00000 00009 00004 00007 00000 00001 Histogram Overflow at cycle number: Thread 0: 09964 Thread 1: 00000 00004 00006 00008 00010 09962 11594 Thread 2: Thread 3: 01169 04698 06782 09033 10299 11561 21517 28734 29532 Thread 4: 11574 11580 11583 11586 Thread 5: 00020 09448 13954 14954 18954 20587 24973 Thread 6: Thread 7: 18950 ... Signed-off-by: Bhavesh Davda <bhavesh@vmware.com> Reviewed-by: Frank Rowand <frank.rowand@am.sony.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17cyclictest: whitespace cleanupBhavesh Davda1-20/+20
Cosmetic whitespace cleanup Signed-off-by: Bhavesh Davda <bhavesh@vmware.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2012-08-30add setup and call of tracemark function for breaktraceClark Williams1-0/+33
Add back call to the tracemark function but only if we're using the breaktrace option and only when we actually hit the breaktrace threshold. Signed-off-by: Clark Williams <williams@redhat.com>
2012-05-09version bump to 0.84v0.84Clark Williams2-1/+24
Signed-off-by: Clark Williams <williams@redhat.com>
2012-05-09rt-tests / cyclictest: Make cyclictest fail if it cannot run with requested ↵John Kacur1-1/+75
priority. Currently if a non-root user requests a priority higher than the soft limit in /etc/security/limits.conf the call to sched_setscheduler will silently fail and the user will be running with priority of 0. Cyclictest will not complain, and display the requested priority resulting in seemingly poor results. The following patch fixes this by doing two things. 1. If the requested priority is higher than the soft limit but lower than the hard limit, it will raise the soft limit to the requested priority. 2. If the requested priority is higher than the hard limit, it will fail with a warning. The patch should not affect privileged users. Reported-by: Nicholas Mc Guire <der.herr@hofr.at> Signed-off-by: John Kacur <jkacur@redhat.com> Signed-off-by: Clark Williams <williams@redhat.com>
2012-05-03rt-tests: printf format compile warningFrank Rowand1-1/+1
V2: use type casting instead of ugly constant in format string Fix printf format string to fix compile warning for ARM 32 bit target. Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Signed-off-by: Clark Williams <williams@redhat.com>