rename ktap_dir to kp_dir_dentry

Also pass this global struct dentry to transport module in
function argument.

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@gmail.com>
rename ktap_running to kp_is_running

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@gmail.com>
allow branch profiling for ktapvm in Makefile

ktap don't support branch profiling now, so it's have no
reason to let kernel branch profiling not see ktapvm branch
profiling stats.

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@gmail.com>
rename count variable into n

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@gmail.com>
support aggregation table

Aggregation table is a percpu table, so each cpu update
its own table, no table lock need to accquire.

Currently we don't change compiler to support aggregation,
so library call is needed, see example as below:

	s = aggr_table()

	trace "*:*" {
		s[argname] = count()
	}

	trace_end {
		histogram(s)
	}

This approach will reduce ktap overhead heavily, also
reduce lock contention, note that we cannot use this
aggregation in everywhere, for example, you can not
use aggregation for thread-local associative array.

Four aggregation functions was implemented at present:

	s[KEY] = count()
	s[KEY] = max(N)
	s[KEY] = min(N)
	s[KEY] = avg(N)

you have to use aggr_table() library function to allocate
a new aggregation table, in future, perhaps we can use @
to repesent aggregation table like below:
	@s = {}

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@gmail.com>
update sample scripts by new aggregation table

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@gmail.com>
fix aggregation min/avg return wrong number

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@gmail.com>
add test/aggr_table.kp for basic aggregation testing

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@gmail.com>
fix compile error for scripts/function_profiler.kp

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@gmail.com>
change scripts/function_profiler.kp to use aggregation table

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@gmail.com>
enable non-kenrel-symbol integer key showing in histogram

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@gmail.com>
use aggregation in stack_profile.kp

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@gmail.com>
add sum aggregation function

s = aggr_table()

s[0] = sum(1)
s[0] = sum(2)
s[0] = sum(3)

print(s[0]) <--- 6

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@gmail.com>
set n field value of nil as 0

nvalue(nil) is 0 after this change.

This issue was found when use aggr_table in traceio.kp

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@gmail.com>
use aggregation table in scripts/traceio.kp

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