aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2017-04-25selftests: add gpio generated files to .gitignoreShuah Khan1-0/+4
gpio test generates files in selftests directory. Add them to .gitignore. Signed-off-by: Shuah Khan <[email protected]>
2017-04-25selftests: powerpc: override clean in lib.mk to fix warningsShuah Khan1-1/+2
Add override for lib.mk clean to fix the following warnings from clean target run. Makefile:63: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean' Signed-off-by: Shuah Khan <[email protected]>
2017-04-25selftests: gpio: override clean in lib.mk to fix warningsShuah Khan1-1/+2
Add override for lib.mk clean to fix the following warnings from clean target run. Makefile:11: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean' Signed-off-by: Shuah Khan <[email protected]>
2017-04-25selftests: futex: override clean in lib.mk to fix warningsShuah Khan1-1/+2
Add override for lib.mk clean to fix the following warnings from clean target run. Makefile:36: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean' Signed-off-by: Shuah Khan <[email protected]>
2017-04-25selftests: lib.mk: define CLEAN macro to allow Makefiles to override cleanShuah Khan1-1/+5
Define CLEAN macro to allow Makefiles to override common clean target in lib.mk. This will help fix the following failures: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean' Fixes: 88baa78d1f31 ("selftests: remove duplicated all and clean target") Signed-off-by: Shuah Khan <[email protected]> Acked-by: Michael Ellerman <[email protected]>
2017-04-25selftests: splice: fix clean target to not remove default_file_splice_read.shShuah Khan1-1/+1
splice clean target removes the shell script default_file_splice_read.sh that runs the splice test. Fix it to not remove this file. Signed-off-by: Shuah Khan <[email protected]>
2017-04-25perf buildid: Move prototypes from util.h to build-id.hArnaldo Carvalho de Melo3-4/+4
Where they belong. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24selftests/net: add tests for PACKET_FANOUT_FLAG_UNIQUEIDMike Maloney1-11/+84
Create two groups with PACKET_FANOUT_FLAG_UNIQUEID, add a socket to one. Ensure that the groups can only be joined if all options are consistent with the original except for this flag. Signed-off-by: Mike Maloney <[email protected]> Acked-by: Willem de Bruijn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2017-04-24selftests/net: cleanup unused parameter in psock_fanoutMike Maloney1-9/+9
sock_fanout_open no longer sets the size of packet_socket ring, so stop passing the parameter. Signed-off-by: Mike Maloney <[email protected]> Acked-by: Willem de Bruijn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2017-04-24perf tools: Fix the code to strip command nameJiri Olsa1-1/+8
Recent commit broke command name strip in perf_event__get_comm_ids function. It replaced left to right search for '\n' with rtrim, which actually does right to left search. It occasionally caught earlier '\n' and kept trash in the command name. Keeping the ltrim, but moving back the left to right '\n' search instead of the rtrim. Signed-off-by: Jiri Olsa <[email protected]> Acked-by: Taeung Song <[email protected]> Cc: David Ahern <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Yao Jin <[email protected]> Fixes: bdd97ca63faa ("perf tools: Refactor the code to strip command name with {l,r}trim()") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24tools arch x86: Sync cpufeatures.hArnaldo Carvalho de Melo1-0/+1
To catch changes made in: 90218ac77d05 ("x86/cpufeature: Detect CPUID faulting support") No changes needed in the tools using this file at this time. Cc: Kyle Huey <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24tools arch: Sync arch/x86/lib/memcpy_64.S with the kernelArnaldo Carvalho de Melo1-1/+1
Just a minor fix done in: Fixes: 26a37ab319a2 ("x86/mce: Fix copy/paste error in exception table entries") Cc: Tony Luck <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24tools: Update asm-generic/mman-common.h copy from the kernelArnaldo Carvalho de Melo1-2/+3
To get the changes in the commit Fixes: 3209f68b3ca4 ("statx: Include a mask for stx_attributes in struct statx") Silencing this perf build warning: Warning: tools/include/uapi/linux/stat.h differs from kernel No need to change the statx syscall beautifiers in 'perf trace' at this time. Cc: Adrian Hunter <[email protected]> Cc: Al Viro <[email protected]> Cc: David Ahern <[email protected]> Cc: David Howells <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24perf tools: Use just forward declarations for struct thread where possibleArnaldo Carvalho de Melo15-5/+19
Removing various instances of unnecessary includes, reducing the maze of header dependencies. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24perf tools: Add the right header to obtain PERF_ALIGN()Arnaldo Carvalho de Melo1-1/+1
The util/event.h header needs PERF_ALIGN(), but wasn't including linux/kernel.h, where it is defined, instead it was getting it by luck by including map.h, which it doesn't need at all. Fix it by including the right header. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24perf tools: Remove poll.h and wait.h from util.hArnaldo Carvalho de Melo12-2/+12
Not needed in this header, added to the places that need poll(), wait() and a few other prototypes. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24perf tools: Remove string.h, unistd.h and sys/stat.h from util.hArnaldo Carvalho de Melo25-4/+57
Not needed in this header, added to the places that need FILE, putchar(), access() and a few other prototypes. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24perf tools: Remove stale prototypes from builtin.hArnaldo Carvalho de Melo2-5/+1
Some, like prune_packed_objects() are clearly git specific, others don't have implementations and some are used in just one place, make them static. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24perf tools: Remove string.h from util.hArnaldo Carvalho de Melo4-1/+4
Not needed in this header, added to the places that need strdup, strcmp and a few other prototypes. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24perf tools: Remove sys/ioctl.h from util.hArnaldo Carvalho de Melo5-2/+4
Not needed in this header, added to the places that need 'struct winsize' and the ioctl defines. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24perf tools: Remove a few more needless includes from util.hArnaldo Carvalho de Melo1-4/+0
Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24perf tools: Include sys/param.h where neededArnaldo Carvalho de Melo9-1/+8
As it is going away from util.h, where it is not needed. This is mostly for things like MAXPATHLEN, MAX() and MIN(), these later two probably should go away in favor of its kernel sources replacements. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24perf callchain: Move callchain specific routines from util.[ch]Arnaldo Carvalho de Melo4-108/+116
Where they belong, no point in leaving those in the generic "util" files. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24perf tools: Add compress.h for the *_decompress_to_file() headersArnaldo Carvalho de Melo5-8/+15
Out of util.h, the implementations were already in separate files, that are built conditionally. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24perf mem: Fix display of data source snoop indicationAndi Kleen1-1/+1
'perf mem report' doesn't display the data source snoop indication correctly. In the kernel API the definition is: #define PERF_MEM_SNOOP_NONE 0x02 /* no snoop */ #define PERF_MEM_SNOOP_HIT 0x04 /* snoop hit */ #define PERF_MEM_SNOOP_MISS 0x08 /* snoop miss */ but the table used by the perf tools exchanged "Hit" and "Miss": "None", "Miss", "Hit", Fix the table in perf. Signed-off-by: Andi Kleen <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24perf debug: Move dump_stack() and sighandler_dump_stack() to debug.hArnaldo Carvalho de Melo4-35/+34
Two more out of util.h. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-24perf kvm: Make function only used by 'perf kvm' staticArnaldo Carvalho de Melo3-15/+14
No need to have this polluting util.h, it was polluted enough already. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-23Merge branch 'for-mingo' of ↵Ingo Molnar1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull RCU updates from Paul E. McKenney: - Documentation updates. - Miscellaneous fixes. - Parallelize SRCU callback handling (plus overlapping patches). Signed-off-by: Ingo Molnar <[email protected]>
2017-04-22bpf: Add sparc support to tools and samples.David S. Miller2-0/+5
Signed-off-by: David S. Miller <[email protected]> Acked-by: Daniel Borkmann <[email protected]>
2017-04-21Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller3-14/+25
Both conflict were simple overlapping changes. In the kaweth case, Eric Dumazet's skb_cow() bug fix overlapped the conversion of the driver in net-next to use in-netdev stats. Signed-off-by: David S. Miller <[email protected]>
2017-04-21bpf: Fix values type used in test_mapsDavid Miller1-2/+2
Maps of per-cpu type have their value element size adjusted to 8 if it is specified smaller during various map operations. This makes test_maps as a 32-bit binary fail, in fact the kernel writes past the end of the value's array on the user's stack. To be quite honest, I think the kernel should reject creation of a per-cpu map that doesn't have a value size of at least 8 if that's what the kernel is going to silently adjust to later. If the user passed something smaller, it is a sizeof() calcualtion based upon the type they will actually use (just like in this testcase code) in later calls to the map operations. Fixes: df570f577231 ("samples/bpf: unit test for BPF_MAP_TYPE_PERCPU_ARRAY") Signed-off-by: David S. Miller <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Acked-by: Alexei Starovoitov <[email protected]>
2017-04-21bpf: add napi_id read access to __sk_buffDaniel Borkmann2-0/+4
Add napi_id access to __sk_buff for socket filter program types, tc program types and other bpf_convert_ctx_access() users. Having access to skb->napi_id is useful for per RX queue listener siloing, f.e. in combination with SO_ATTACH_REUSEPORT_EBPF and when busy polling is used, meaning SO_REUSEPORT enabled listeners can then select the corresponding socket at SYN time already [1]. The skb is marked via skb_mark_napi_id() early in the receive path (e.g., napi_gro_receive()). Currently, sockets can only use SO_INCOMING_NAPI_ID from 6d4339028b35 ("net: Introduce SO_INCOMING_NAPI_ID") as a socket option to look up the NAPI ID associated with the queue for steering, which requires a prior sk_mark_napi_id() after the socket was looked up. Semantics for the __sk_buff napi_id access are similar, meaning if skb->napi_id is < MIN_NAPI_ID (e.g. outgoing packets using sender_cpu), then an invalid napi_id of 0 is returned to the program, otherwise a valid non-zero napi_id. [1] http://netdevconf.org/2.1/slides/apr6/dumazet-BUSY-POLLING-Netdev-2.1.pdf Suggested-by: Eric Dumazet <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2017-04-21selftests: gpio: add config fragment for gpio-mockupFathi Boudra1-0/+2
The gpio test requires to insert the gpio mockup module (CONFIG_GPIO_MOCKUP). The gpio mockup driver depends on gpiolib (CONFIG_GPIOLIB). CONFIG_GPIO_SYSFS is selected automatically by the gpio mockup driver. Tested on x86_64 and arm64 with defconfig and kselftest-merge. Signed-off-by: Fathi Boudra <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2017-04-21selftests: breakpoints: allow to cross-compile for aarch64/arm64Fathi Boudra1-1/+1
To build breakpoint_test_arm64, ARCH value is only tested for "aarch64". It covers only the native build because it's computed from uname -m output. For cross-compilation, ARCH is set to arm64 and prevent to cross-compile the test. Fix the test to allow both native and cross-compilation of the test. Note: glibc is missing several of the TRAP_* constants in the userspace definitions. Specifically TRAP_BRANCH and TRAP_HWBKPT. See https://sourceware.org/bugzilla/show_bug.cgi?id=21286 Signed-off-by: Fathi Boudra <[email protected]> Tested-by: Naresh Kamboju <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2017-04-21selftests/Makefile: Add missed PHONY targetsSeongJae Park1-1/+1
`selftests/Makefile` is defining only `install` as entire PHONY target though there are few more PHONY targets including `run_tests`. This commit defines them as the PHONY targets. Signed-off-by: SeongJae Park <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2017-04-21selftests/vm/run_vmtests: Fix wrong commentSeongJae Park1-1/+1
A comment in `run_vmtests` is wrong because it is saying `128MB + 128MB == 258MB`. This commit fixes the comment. Signed-off-by: SeongJae Park <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2017-04-21selftests/Makefile: Add missed closing `"` in commentSeongJae Park1-1/+1
A comment for make command usage in `selftets/Makefile` has opening `"` but no closing `"`. This commit adds the missed `"` in the comment. Signed-off-by: SeongJae Park <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2017-04-20selftests/net: Fixes psock_fanout CBPF test caseMike Maloney2-12/+23
'psock_fanout' has been failing since commit 4d7b9dc1f36a9 ("tools: psock_lib: harden socket filter used by psock tests"). That commit changed the CBPF filter to examine the full ethernet frame, and was tested on 'psock_tpacket' which uses SOCK_RAW. But 'psock_fanout' was also using this same CBPF in two places, for filtering and fanout, on a SOCK_DGRAM socket. Change 'psock_fanout' to use SOCK_RAW so that the CBPF program used with SO_ATTACH_FILTER can examine the entire frame. Create a new CBPF program for use with PACKET_FANOUT_DATA which ignores the header, as it cannot see the ethernet header. Tested: Ran tools/testing/selftests/net/psock_{fanout,tpacket} 10 times, and they all passed. Fixes: 4d7b9dc1f36a9 ("tools: psock_lib: harden socket filter used by psock tests") Signed-off-by: 'Mike Maloney <[email protected]>' Signed-off-by: David S. Miller <[email protected]>
2017-04-20perf tools: Move timestamp routines from util.h to time-utils.hArnaldo Carvalho de Melo7-31/+35
We already have a header for time utilities, so use it. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-20perf tools: Move units conversion/formatting routines to separate objectArnaldo Carvalho de Melo11-39/+56
Out of util.h, to disentangle it a bit more. Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-20perf tools: Add signal.h to places using its definitionsArnaldo Carvalho de Melo17-1/+16
And remove it from util.h, disentangling it a bit more. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-20perf unwind: Provide only forward declarations for pointer typesArnaldo Carvalho de Melo1-3/+6
No need to drag the headers, helps in untangling them and reducing build time. Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-0/+117
A function in kernel/bpf/syscall.c which got a bug fix in 'net' was moved to kernel/bpf/verifier.c in 'net-next'. Signed-off-by: David S. Miller <[email protected]>
2017-04-19pmem: add dax_operations supportDan Williams1-11/+10
Setup a dax_device to have the same lifetime as the pmem block device and add a ->direct_access() method that is equivalent to pmem_direct_access(). Once fs/dax.c has been converted to use dax_operations the old pmem_direct_access() will be removed. Signed-off-by: Dan Williams <[email protected]>
2017-04-19tools: power: pm-graph: Package makefile and man pagesTodd E Brandt3-0/+403
BootGraph and SleepGraph man pages - includes full descriptions of tool arguments and commands - includes examples of common use cases Makefile - no build required, used only for install - installs man pages and tools as libraries with links - includes an uninstall Signed-off-by: Todd Brandt <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2017-04-19tools: power: pm-graph: AnalyzeBoot v2.0Todd E Brandt1-0/+824
First release into the kernel tools source - pulls in analyze_suspend.py as as library, same html formatting - supplants scripts/bootgraph.pl, outputs HTML instead of SVG - enables automatic reboot and collection for easy timeline capture - enables ftrace callgraph collection from early boot Signed-off-by: Todd Brandt <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2017-04-19tools: power: pm-graph: AnalyzeSuspend v4.6Todd E Brandt1-0/+5309
Moved from scripts into tools, and updated from 4.5 to 4.6 - Changed the tool title to SleepGraph - Reformatted the code so analyze_suspend can be used as a library - Reorganized all html/js/css handling code to be used by other tools - upgraded the -summary feature to work faster with better readability Signed-off-by: Todd Brandt <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2017-04-19torture: Use correct path for Kconfig fragment for duplicatesPaul E. McKenney1-1/+1
Currently, the rcutorture scripting will give an error message if running a duplicate scenario that happens also to have a non-existent build directory (b1, b2, ... in the rcutorture directory). Worse yet, if the build directory has already been created and used for a real build, the script will silently grab the wrong Kconfig fragment, which could cause confusion to the poor sap (me) analyzing old test results. At least the actual test runs correctly... This commit therefore accesses the Kconfig fragment from the results directory corresponding to the first of the duplicate scenarios, for which a build was actually carried out. This prevents both the messages and at least one form of later confusion. Signed-off-by: Paul E. McKenney <[email protected]>
2017-04-19perf tools: Ditch unused strchrnul() reimplementationArnaldo Carvalho de Melo1-16/+0
Remnants from the git codebase. Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2017-04-19perf tools: Remove regex.h and fnmatch.h from util.hArnaldo Carvalho de Melo5-3/+4
The users of regex and fnmatch functions should include those headers instead. Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>