diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-27 14:05:02 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-27 14:05:02 -0700 |
| commit | 365aa51e11cc537ac39a96f765ad8e7511aa93ff (patch) | |
| tree | f47c7455d06be57bb63835f53bed6c2df1bed0a7 /drivers | |
| parent | 9908b4f32f91aafa86239dd092e9e5540e8615e0 (diff) | |
| download | linux-365aa51e11cc537ac39a96f765ad8e7511aa93ff.tar.gz linux-365aa51e11cc537ac39a96f765ad8e7511aa93ff.tar.bz2 linux-365aa51e11cc537ac39a96f765ad8e7511aa93ff.zip | |
staging: ktap: remove code from tree
ktap should be merged through the "proper" place in the kernel tree, in
the perf tool, not as a stand-alone kernel module in staging. So remove
it from here for now so that it can be merged correctly later.
Reported-by: Ingo Molnar <mingo@kernel.org>
Cc: Jovi Zhangwei <jovi.zhangwei@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
79 files changed, 0 insertions, 16368 deletions
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index 3b1501b7d894..3bfdaa8d80a9 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -150,6 +150,4 @@ source "drivers/staging/dgnc/Kconfig" source "drivers/staging/dgap/Kconfig" -source "drivers/staging/ktap/Kconfig" - endif # STAGING diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index 2270ed077bde..b0d3303b4680 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -67,4 +67,3 @@ obj-$(CONFIG_XILLYBUS) += xillybus/ obj-$(CONFIG_DGNC) += dgnc/ obj-$(CONFIG_DGAP) += dgap/ obj-$(CONFIG_MTD_SPINAND_MT29F) += mt29f_spinand/ -obj-$(CONFIG_KTAP) += ktap/ diff --git a/drivers/staging/ktap/Kconfig b/drivers/staging/ktap/Kconfig deleted file mode 100644 index 21f8d2ed03b9..000000000000 --- a/drivers/staging/ktap/Kconfig +++ /dev/null @@ -1,21 +0,0 @@ -config KTAP - tristate "a programable dynamic tracing tool for Linux" - depends on PERF_EVENTS && EVENT_TRACING - default n - help - ktap is a new script-based dynamic tracing tool for Linux, - it uses a scripting language and lets users trace the - Linux kernel dynamically. ktap is designed to give - operational insights with interoperability that allow - users to tune, troubleshoot and extend kernel and application. - It's similar with Linux Systemtap and Solaris Dtrace. - - ktap have different design principles from Linux mainstream - dynamic tracing language in that it's based on bytecode, - so it doesn't depend upon GCC, doesn't require compiling - kernel module for each script, safe to use in production - environment, fulfilling the embedded ecosystem's tracing needs. - - See ktap tutorial for more information: - http://www.ktap.org/doc/tutorial.html - diff --git a/drivers/staging/ktap/Makefile b/drivers/staging/ktap/Makefile deleted file mode 100644 index e2e54baf36d9..000000000000 --- a/drivers/staging/ktap/Makefile +++ /dev/null @@ -1,101 +0,0 @@ - -# Do not instrument the tracer itself: -ifdef CONFIG_FUNCTION_TRACER -ORIG_CFLAGS := $(KBUILD_CFLAGS) -KBUILD_CFLAGS = $(subst -pg,,$(ORIG_CFLAGS)) -endif - -all: mod ktap - -INTP = interpreter - -LIBDIR = $(INTP)/library - -LIB_OBJS += $(LIBDIR)/baselib.o $(LIBDIR)/kdebug.o $(LIBDIR)/timer.o \ - $(LIBDIR)/ansilib.o - -INTP_OBJS += $(INTP)/ktap.o $(INTP)/loader.o $(INTP)/object.o \ - $(INTP)/tstring.o $(INTP)/table.o $(INTP)/vm.o \ - $(INTP)/opcode.o $(INTP)/strfmt.o $(INTP)/transport.o \ - $(LIB_OBJS) - -obj-m += ktapvm.o -ktapvm-y := $(INTP_OBJS) - -KVERSION ?= $(shell uname -r) -KERNEL_SRC ?= /lib/modules/$(KVERSION)/build -mod: - $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules - -modules_install: - $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules_install - -KTAPC_CFLAGS = -Wall -O2 - -UDIR = userspace - -$(UDIR)/lex.o: $(UDIR)/lex.c - $(QUIET_CC)$(CC) $(DEBUGINFO_FLAG) $(KTAPC_CFLAGS) -o $@ -c $< -$(UDIR)/parser.o: $(UDIR)/parser.c - $(QUIET_CC)$(CC) $(DEBUGINFO_FLAG) $(KTAPC_CFLAGS) -o $@ -c $< -$(UDIR)/code.o: $(UDIR)/code.c - $(QUIET_CC)$(CC) $(DEBUGINFO_FLAG) $(KTAPC_CFLAGS) -o $@ -c $< -$(UDIR)/dump.o: $(UDIR)/dump.c - $(QUIET_CC)$(CC) $(DEBUGINFO_FLAG) $(KTAPC_CFLAGS) -o $@ -c $< -$(UDIR)/main.o: $(UDIR)/main.c - $(QUIET_CC)$(CC) $(DEBUGINFO_FLAG) $(KTAPC_CFLAGS) -o $@ -c $< -$(UDIR)/util.o: $(UDIR)/util.c - $(QUIET_CC)$(CC) $(DEBUGINFO_FLAG) $(KTAPC_CFLAGS) -o $@ -c $< -$(UDIR)/ktapio.o: $(UDIR)/ktapio.c - $(QUIET_CC)$(CC) $(DEBUGINFO_FLAG) $(KTAPC_CFLAGS) -o $@ -c $< -$(UDIR)/eventdef.o: $(UDIR)/eventdef.c - $(QUIET_CC)$(CC) $(DEBUGINFO_FLAG) $(KTAPC_CFLAGS) -o $@ -c $< -$(UDIR)/opcode.o: $(INTP)/opcode.c - $(QUIET_CC)$(CC) $(DEBUGINFO_FLAG) $(KTAPC_CFLAGS) -o $@ -c $< -$(UDIR)/table.o: $(INTP)/table.c - $(QUIET_CC)$(CC) $(DEBUGINFO_FLAG) $(KTAPC_CFLAGS) -o $@ -c $< -$(UDIR)/tstring.o: $(INTP)/tstring.c - $(QUIET_CC)$(CC) $(DEBUGINFO_FLAG) $(KTAPC_CFLAGS) -o $@ -c $< -$(UDIR)/object.o: $(INTP)/object.c - $(QUIET_CC)$(CC) $(DEBUGINFO_FLAG) $(KTAPC_CFLAGS) -o $@ -c $< - -KTAPOBJS = -KTAPOBJS += $(UDIR)/lex.o -KTAPOBJS += $(UDIR)/parser.o -KTAPOBJS += $(UDIR)/code.o -KTAPOBJS += $(UDIR)/dump.o -KTAPOBJS += $(UDIR)/main.o -KTAPOBJS += $(UDIR)/util.o -KTAPOBJS += $(UDIR)/ktapio.o -KTAPOBJS += $(UDIR)/eventdef.o -KTAPOBJS += $(UDIR)/opcode.o -KTAPOBJS += $(UDIR)/table.o -KTAPOBJS += $(UDIR)/tstring.o -KTAPOBJS += $(UDIR)/object.o - -ktap: $(KTAPOBJS) - $(QUIET_LINK)$(CC) $(KTAPC_CFLAGS) -o $@ $(KTAPOBJS) -lpthread - -KMISC := /lib/modules/$(KVERSION)/ktapvm/ - -install: mod ktap - install -d $(KMISC) - install -m 644 -c *.ko /lib/modules/$(KVERSION)/ktapvm/ - /sbin/depmod -a - -load: - insmod ktapvm.ko - -unload: - rmmod ktapvm - -test: FORCE - cd test; sh ./run_test.sh; cd - - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean - $(RM) ktap - -PHONY += FORCE -FORCE: - diff --git a/drivers/staging/ktap/README.md b/drivers/staging/ktap/README.md deleted file mode 100644 index c8ddd5fa66c6..000000000000 --- a/drivers/staging/ktap/README.md +++ /dev/null @@ -1,144 +0,0 @@ -# ktap - -A New Scripting Dynamic Tracing Tool For Linux -[www.ktap.org][homepage] - -ktap is a new scripting dynamic tracing tool for Linux, -it uses a scripting language and lets users trace the Linux kernel dynamically. -ktap is designed to give operational insights with interoperability -that allows users to tune, troubleshoot and extend kernel and application. -It's similar with Linux Systemtap and Solaris Dtrace. - -ktap have different design principles from Linux mainstream dynamic tracing -language in that it's based on bytecode, so it doesn't depend upon GCC, -doesn't require compiling kernel module for each script, safe to use in -production environment, fulfilling the embedded ecosystem's tracing needs. - -More information can be found at [ktap homepage][homepage]. - -[homepage]: http://www.ktap.org - -## Highlights - - * simple but powerful scripting language - * register based interpreter (heavily optimized) in Linux kernel - * small and lightweight (6KLOC of interpreter) - * not depend on gcc for each script running - * easy to use in embedded environment without debugging info - * support for tracepoint, kprobe, uprobe, function trace, timer, and more - * supported in x86, arm, ppc, mips - * safety in sandbox - -## Building & Running - -1. Clone ktap from github - - $ git clone http://github.com/ktap/ktap.git - -2. Compiling ktap - - $ cd ktap - $ make #generate ktapvm kernel module and ktap binary - -3. Load ktapvm kernel module(make sure debugfs mounted) - - $ make load #need to be root or have sudo access - -4. Running ktap - - $ ./ktap scripts/helloworld.kp - - -## Examples - -1. simplest one-liner command to enable all tracepoints - - ktap -e "trace *:* { print(argevent) }" - -2. syscall tracing on target process - - ktap -e "trace syscalls:* { print(argevent) }" -- ls - -3. function tracing - - ktap -e "trace ftrace:function { print(argevent) }" - - ktap -e "trace ftrace:function /ip==mutex*/ { print(argevent) }" - -4. simple syscall tracing - - trace syscalls:* { - print(cpu(), pid(), execname(), argevent) - } - -5. syscall tracing in histogram style - - s = {} - - trace syscalls:sys_enter_* { - s[argname] += 1 - } - - trace_end { - histogram(s) - } - -6. kprobe tracing - - trace probe:do_sys_open dfd=%di fname=%dx flags=%cx mode=+4($stack) { - print("entry:", execname(), argevent) - } - - trace probe:do_sys_open%return fd=$retval { - print("exit:", execname(), argevent) - } - -7. uprobe tracing - - trace probe:/lib/libc.so.6:0x000773c0 { - print("entry:", execname(), argevent) - } - - trace probe:/lib/libc.so.6:0x000773c0%return { - print("exit:", execname(), argevent) - } - -8. timer - - tick-1ms { - printf("time fired on one cpu\n"); - } - - profile-2s { - printf("time fired on every cpu\n"); - } - -More sample scripts can be found at scripts/ directory. - -## Mailing list - -ktap@freelists.org -You can subscribe to ktap mailing list at link (subscribe before posting): -http://www.freelists.org/list/ktap - - -## Copyright and License - -ktap is licensed under GPL v2 - -Copyright (C) 2012-2013, Jovi Zhangwei <jovi.zhangwei@gmail.com>. -All rights reserved. - - -## Contribution - -ktap is still under active development, so contributions are welcome. -You are encouraged to report bugs, provide feedback, send feature request, -or hack on it. - - -## See More - -More info can be found at [documentation][tutorial] -[tutorial]: http://www.ktap.org/doc/tutorial.html - diff --git a/drivers/staging/ktap/doc/tutorial.md b/drivers/staging/ktap/doc/tutorial.md deleted file mode 100644 index 3c32ce77a731..000000000000 --- a/drivers/staging/ktap/doc/tutorial.md +++ /dev/null @@ -1,552 +0,0 @@ -% The ktap Tutorial - -# Introduction - -ktap is a new scripting dynamic tracing tool for linux - -ktap is a new scripting dynamic tracing tool for Linux, -it uses a scripting language and lets users trace the Linux kernel dynamically. -ktap is designed to give operational insights with interoperability -that allows users to tune, troubleshoot and extend kernel and application. -It's similar with Linux Systemtap and Solaris Dtrace. - -ktap have different design principles from Linux mainstream dynamic tracing -language in that it's based on bytecode, so it doesn't depend upon GCC, -doesn't require compiling kernel module for each script, safe to use in -production environment, fulfilling the embedded ecosystem's tracing needs. - -Highlights features: - -* simple but powerful scripting language -* register based interpreter (heavily optimized) in Linux kernel -* small and lightweight (6KLOC of interpreter) -* not depend on gcc for each script running -* easy to use in embedded environment without debugging info -* support for tracepoint, kprobe, uprobe, function trace, timer, and more -* supported in x86, arm, ppc, mips -* safety in sandbox - - -# Getting started - -Requirements - -* Linux 3.1 or later(Need some kernel patches for kernel earlier than 3.1) -* CONFIG_EVENT_TRACING enabled -* CONFIG_PERF_EVENTS enabled -* CONFIG_DEBUG_FS enabled - (make sure debugfs mounted before insmod ktapvm - mount debugfs: mount -t debugfs none /sys/kernel/debug/) - -Note that those configuration is always enabled in Linux distribution, -like REHL, Fedora, Ubuntu, etc. - -1. Clone ktap from github - - $ git clone http://github.com/ktap/ktap.git - -2. Compiling ktap - - $ cd ktap - $ make #generate ktapvm kernel module and ktap binary - -3. Load ktapvm kernel module(make sure debugfs mounted) - - $ make load #need to be root or have sudo access - -4. Running ktap - - $ ./ktap scripts/helloworld.kp - - -# Language basics - -## Syntax basics - -ktap's syntax is design on the mind of C language syntax friendly, -to make it easy scripting by kernel developer. - -1. Variable declaration -The biggest syntax differences with C is that ktap is a dynamic typed -language, so you won't need add any variable type declaration, just -use the variable. - -2. function -All functions in ktap should use keyword "function" declaration - -3. comments -The comments of ktap is starting from '#', long comments doesn't support now. - -4. others -Don't need place any ';' at the ending of statement in ktap. -ktap use free syntax style, so you can choose to use the ';' or not. - -ktap use nil as NULL, the result of any number operate on nil is nil. - -ktap don't have array structure, also don't have any pointer operation. - -## Control structures - -ktap if/else is same as C language. - -There have two method of for-loop in ktap: - - for (i = init, limit, step) { body } - -this is same as below in C: - - for (i = init; i < limit; i += step) { body } - -The next for-loop method is: - - for (k, v in pairs(t)) { body } # looping all elements of table - -Note that ktap don't have "continue" keyword, but C does. - -## Date structures - -Associative array is heavily used in ktap, it's also called by table. - -table declaration: - - t = {} - -how to use table: - - t[1] = 1 - |
