some code cleanup in ktap_types.h

kill _ktap_value, it exist in there for no good reason.
No functional change.

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
fix compiler warning

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
add sample script scripts/syscalls/execve.kp

Example:

	# ./ktap scripts/syscalls/execve.kp

	[do_execve entry]: (bash) name=/usr/bin/ls
	[do_execve entry]: (bash) name=/usr/bin/top
	[do_execve entry]: (bash) name=/usr/bin/ls
	...

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
introduce sort_pairs for ordered table iteration

sort_pairs is purposed for ordered table iteration,
if only one argument is given, it will use default
compare function <example 1>, otherwise, it use
closure function given by user like <example 2>.

Example 1:
	for (k, v in sort_pairs(s)) {
		print(k)
		print(v)
	}

Example 2:
	function cmp(v1, v2) {
		return (v1 > v2))
	}
	for (k, v in sort_pairs(s, cmp)) {
		print(k)
		print(v)
	}

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
use sort_pairs in stack_profile.kp

dump the stack profile data in ordered format.

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
add testcase for sort_pairs built-in function

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
type rename

No functional change.

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
ktap v0.3 released

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
Add token '`' to support kernel symbol read

When using "`symbol_name`" in the script, parser will read symbol name
from kernel. Then, the symbol is replaced by a constant number, which
indicates its address in the kernel, or makes the compile fail.

Tested:
test/ksym.kp: Parse kernel symbol names.

Signed-off-by: Yicheng Qin <qycqycqycqycqyc@gmail.com>
Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
 - Jovi: Use "ksym" instead of symbol, represent kernel symobl reading,
         not userspace symobl.
         Move read_ksym function to util.c
         better error handing when find symobl failure.
fix performance regression in test/bench/test.sh

ktap overhead increased when using task-bound tracing,
the reason is there have a lot of perf-event schedule
in and schedule out when using task-bound tracing.

So change it back to system tracing.

Before:
run time 30 seconds 200248 worker burns per second

After:
run time 30 seconds 250742 worker burns per second

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>