File tree Expand file tree Collapse file tree 2 files changed +13
-19
lines changed
tools/testing/selftests/ftrace/test.d/kprobe Expand file tree Collapse file tree 2 files changed +13
-19
lines changed Original file line number Diff line number Diff line change @@ -9,46 +9,40 @@ echo > kprobe_events
9
9
10
10
case ` uname -m` in
11
11
x86_64)
12
- ARG2=%si
13
- OFFS=8
12
+ ARG1=%di
14
13
;;
15
14
i[3456]86)
16
- ARG2=%cx
17
- OFFS=4
15
+ ARG1=%ax
18
16
;;
19
17
aarch64)
20
- ARG2=%x1
21
- OFFS=8
18
+ ARG1=%x0
22
19
;;
23
20
arm* )
24
- ARG2=%r1
25
- OFFS=4
21
+ ARG1=%r0
26
22
;;
27
23
ppc64* )
28
- ARG2=%r4
29
- OFFS=8
24
+ ARG1=%r3
30
25
;;
31
26
ppc* )
32
- ARG2=%r4
33
- OFFS=4
27
+ ARG1=%r3
34
28
;;
35
29
* )
36
30
echo " Please implement other architecture here"
37
31
exit_untested
38
32
esac
39
33
40
34
: " Test get argument (1)"
41
- echo " p:testprobe create_trace_kprobe arg1=+0(+0( ${ARG2} ) ):string" > kprobe_events
35
+ echo " p:testprobe tracefs_create_dir arg1=+0(${ARG1} ):string" > kprobe_events
42
36
echo 1 > events/kprobes/testprobe/enable
43
- ! echo test >> kprobe_events
44
- tail -n 1 trace | grep -qe " testprobe.* arg1=\" test\" "
37
+ echo " p: test _do_fork " >> kprobe_events
38
+ grep -qe " testprobe.* arg1=\" test\" " trace
45
39
46
40
echo 0 > events/kprobes/testprobe/enable
47
41
: " Test get argument (2)"
48
- echo " p:testprobe create_trace_kprobe arg1=+0(+0( ${ARG2} )) :string arg2=+0(+ ${OFFS} ( ${ARG2} ) ):string" > kprobe_events
42
+ echo " p:testprobe tracefs_create_dir arg1=+0(${ARG1} ) :string arg2=+0(${ARG1} ):string" > kprobe_events
49
43
echo 1 > events/kprobes/testprobe/enable
50
- ! echo test1 test2 >> kprobe_events
51
- tail -n 1 trace | grep -qe " testprobe.* arg1=\" test1 \" arg2=\" test2 \" "
44
+ echo " p:test _do_fork " >> kprobe_events
45
+ grep -qe " testprobe.* arg1=\" test \" arg2=\" test \" " trace
52
46
53
47
echo 0 > events/enable
54
48
echo > kprobe_events
Original file line number Diff line number Diff line change 4
4
5
5
[ -f kprobe_events ] || exit_unsupported # this is configurable
6
6
7
- TARGET_FUNC=create_trace_kprobe
7
+ TARGET_FUNC=tracefs_create_dir
8
8
9
9
dec_addr () { # hexaddr
10
10
printf " %d" " 0x" ` echo $1 | tail -c 8`
You can’t perform that action at this time.
0 commit comments