Zero destination address when setting ffi arguments

It makes the arguments for ffi call more reasonable.
change cdef syntax to use long string

previous cdef syntax:

```
cdef("int foo();")
```

new syntax:

```
cdef[[
int foo();
]]
```

Signed-off-by: Qingping Hou <qingping.hou@gmail.com>
Signed-off-by: Yicheng Qin <qycqycqycqycqyc@gmail.com>
update FFI samples/tests/document to use new cdef syntax

Signed-off-by: Qingping Hou <qingping.hou@gmail.com>
Signed-off-by: Yicheng Qin <qycqycqycqycqyc@gmail.com>
fix the crash when tracing large events

Now ktap support trace bigger much events number, for example:
	trace probe:one_big_dso:* { }

Many big dso contains 20K symbols or more, ktap must need to support it.

To support this, kdebug.probe_by_id interface changed, don't pass string
anymore, use userspace memory pointer as first argument: struct eventdef_info.
	struct eventdef_info {
		int nr;
		int *id_arr;
		char *filter;
	};

It would be possible to embed this eventdef_info info trunk file in future.

Tested with nodejs, a compiled node process contains 17674 symbols.
(Another bug was found when test node, node coredump when using ktap script:
	trace probe:node:* {}
)

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
add documentation note for ftrace:function event

kernel must be newer than 3.3, then can use ftrace:function tracepoint in ktap.

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
use kmem_cache_alloc to allocate ktap_probe_event structure

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

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
add v0.4 release note into RELEASES.txt

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
fix unable create perf event when run samples/schedule/schedtimes.kp

clear the idmap nr in idmap_free.

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
unshare common files between userspace and runtime

Now usespace and runtime have completely seperated build
dependency, no common files shared.

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
remove __KERNEL__ ifdef in ktap.h

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

remove some unused functions in userspace/util.c
rename ktapio.c to ktap_io.c

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

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
fix typo in Makefile

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
improve performance for table resize

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
use lastfree field to improve userspace table set operation

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
tiny header file cleanup

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
move dump_function into dump.c

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
make table to be pre-allocated and disallow table resize

New function for pre-allocate table entries:
	 table.new(narr, nrec)

For ptable, use:
	ptable(narr, nrec)

If no parameter given, then ktapvm pre-allocate default size:
	default narr: 128
	default nrec: 2048

if table entries exceed the default number, ktapvm will exit
with overflow error.

If default value is not enough for script, user must to enlarge
the vaule by above two functions.

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

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