aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/pmu (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-03-19selftests: Add install support for the powerpc testsMichael Ellerman2-30/+31
The bulk of the selftests are actually below the powerpc sub directory. This adds support for installing them, when on a powerpc machine, or if ARCH and CROSS_COMPILE are set appropriately. This is a little more complicated because of the sub directory structure under powerpc, but much of the common logic in lib.mk is still used. The net effect of the patch is still a reduction in code. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-01-23selftests/powerpc: Make git ignore all binaries in powerpc test suiteAnshuman Khandual2-0/+25
This patch includes all of the powerpc test binaries into the .gitignore file listing in their respective directories. This will make sure that git ignores all of these test binaries when displaying status. Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2014-07-28selftests/powerpc: Add test of per-event excludesMichael Ellerman2-1/+115
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-28selftests/powerpc: Add a routine for retrieving an AUXV entryMichael Ellerman2-0/+49
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-28selftests/powerpc: Add cycles test with MMCR2 handlingMichael Ellerman2-1/+93
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-28selftests/powerpc: Dump MMCR2 as part of the EBB HW stateMichael Ellerman1-4/+6
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-28selftests/powerpc: Count more instructions & use decimalMichael Ellerman1-8/+14
Although we expect some small discrepancies for very large counts, we seem to be able to count up to 64 billion instructions without too much skew, so do so. Also switch to using decimals for the instruction counts. This just makes it easier to visually compare the expected vs actual values, as well as the raw result from instructions. Before: instructions: result 68719476753 running/enabled 13101961654 cycles: result 38077343785 running/enabled 13101725752 Looped for 68719476736 instructions, overhead 17 Expected 68719476753 Actual 68719476753 Delta 0, 0.000000% success: count_instructions After: instructions: result 64000000016 running/enabled 12197599964 cycles: result 35412471674 running/enabled 12197534110 Looped for 64000000000 instructions, overhead 16 Expected 64000000016 Actual 64000000016 Delta 0, 0.000000% success: count_instructions Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-28selftests/powerpc: Count instructions under scheduler pressureMichael Ellerman2-2/+8
Have a task eat some cpu while we are counting instructions to create some scheduler pressure. The idea being to try and unearth any bugs we have in counting that only appear when context switching is happening. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-28selftests/powerpc: Add test of L3 bank handlingMichael Ellerman2-1/+49
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-28selftests/powerpc: Move core_busy_loop() into asmMichael Ellerman4-253/+272
There is at least one bug in core_busy_loop(), we use r0, but it's not in the clobber list. We were getting away with this it seems but that was luck. It's also fishy to be touching the stack, even if we do it below the stack pointer. It seems we get away with it, but looking at the generated code that may just be luck. So move it into assembler, do all the stack handling by hand. We create a stack frame to save the non-volatiles in, so we can muck around with them. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-28selftests/powerpc: Fix parse_proc_maps()Michael Ellerman1-1/+1
start and end should be unsigned long. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-28selftests/powerpc: Don't ignore errors from sub MakefilesMichael Ellerman1-9/+6
Currently we ignore errors from our sub Makefiles. We inherited that from the top-level selftests Makefile which aims to build and run as many tests as possible and damn the torpedoes. For the powerpc tests we'd instead like any errors to fail the build, so we can automatically catch build failures. We can achieve the best of both worlds by using -k, which tells make to keep building when it hits an error, but still reports the error. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11selftests/powerpc: Add tests of PMU EBBsMichael Ellerman34-4/+3913
The Power8 Performance Monitor Unit (PMU) has a new feature called Event Based Branches (EBB). This commit adds tests of the kernel API for using EBBs. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11selftests/powerpc: Fix instruction loop for ABIv2 (LE)Michael Ellerman1-38/+35
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-08-14selftests: Add test of PMU instruction counting on powerpcMichael Ellerman5-0/+348
This commit adds a test of instruction counting using the PMU on powerpc. Although the bulk of the code is architecture agnostic, the code needs to run a precisely sized loop which is implemented in assembler. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>