[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVMG73_OCJOJGWR0CCeoR3taXnj+PXXah0q7fyB=Y4vfwQ@mail.gmail.com>
Date: Wed, 22 May 2013 12:15:57 +0800
From: Ming Lei <tom.leiming@...il.com>
To: "zhangwei(Jovi)" <jovi.zhangwei@...wei.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [ANNOUNCE] ktap 0.1 released
On Tue, May 21, 2013 at 11:56 AM, zhangwei(Jovi)
<jovi.zhangwei@...wei.com> wrote:
>
> Dear,
>
> I'm pleased to announce that ktap release v0.1, this is the first official
> release of ktap project, it is expected that this release is not fully
> functional or very stable and we welcome bug reports and fixes for the issues.
>
> = what's ktap?
>
> 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 allow users to tune, troubleshoot and extend kernel and application.
>
> 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 a kernel module, safe to use in production
> environment, fulfilling the embedd ecosystem's tracing needs.
>
> KTAP also is designed for enabling great interoperability with Linux kernel,
> it gives user the power to modify and extend the system, and let users
> explore the system in an easy way.
>
> KTAP is released as GPL license.
>
> More information can be found at ktap/doc directory.
>
> = Features
>
> Because this is the first release, so there wouldn't include too much features,
> just contain several basic features about tracing, here are the summary:
>
> 1) support x86-32 and x86-64 (other arch is not tested yet)
> 2) support tracepoints, syscalls, kprobes, kretprobes
> 3) timer
> 4) dumpstack
> 5) many built-in functions and library functions in there
>
> There have many features on the todo list, so it will support more
> features in future, and be more stable than this release.
>
> = Planned Changes
>
> we are planning to enable more kernel ineroperability into ktap, implement more
> sample scripts, and performance boost.
>
> = Code
>
> Please download code from:
> https://github.com/ktap/ktap.git
>
> = Building & Running
>
> [root@...i]# cd linux/kernel/trace/
> [root@...i]# git clone https://github.com/ktap/ktap.git
>
> [root@...i]# cd linux/kernel/trace/ktap
> [root@...i]# make #generate ktapvm kernel module
> [root@...i]# make ktap #generate userspace ktap tool
>
> [root@...i]# insmod ./ktapvm.ko
> [root@...i]# ./ktap scripts/syscalls.kp
>
>
> = Simple syscall tracing example
>
> function eventfun (e) {
> printf("%d %d\t%s\t%s", cpu(), pid(), execname(), e.tostring())
> }
>
> kdebug.probe("tp:syscalls", eventfun)
>
> kdebug.probe_end(function () {
> printf("probe end\n")
> })
>
>
> = Examples/Documentation
>
> Example is in ktap/scripts/
> Documentation is in ktap/doc/
Nice job, I have run it on ARM already with only one line change.
But looks 'Control-C' can't stop the tracing or need some time to complete it,
see below:
$sudo ./ktap scripts/syscalls_histogram.kp
.....
Press Control-C to stop.
^C
^C^C^C
^C
value ------------- Distribution ------------- count
sys_enter_rt_sigprocmask |@@@@@@@@@@@@@
70
sys_enter_select |@@@@@@@@@
49
sys_enter_read |@@@@
25
sys_enter_write |@@@@
22
sys_enter_clock_gettime |@@@
19
sys_enter_ioctl |@
6
sys_enter_gettimeofday |
4
sys_enter_munmap |
3
sys_enter_fstat64 |
3
sys_enter_open |
3
sys_enter_close |
3
sys_enter_rt_sigaction |
1
sys_enter_nanosleep |
1
sys_enter_stat64 |
1
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists