Commit b576e09
committed
tracing/probes: Support function parameters if BTF is available
Support function or tracepoint parameters by name if BTF support is enabled
and the event is for function entry (this feature can be used with kprobe-
events, fprobe-events and tracepoint probe events.)
Note that the BTF variable syntax does not require a prefix. If it starts
with an alphabetic character or an underscore ('_') without a prefix like
'$' and '%', it is considered as a BTF variable.
If you specify only the BTF variable name, the argument name will also
be the same name instead of 'arg*'.
# echo 'p vfs_read count pos' >> dynamic_events
# echo 'f vfs_write count pos' >> dynamic_events
# echo 't sched_overutilized_tp rd overutilized' >> dynamic_events
# cat dynamic_events
p:kprobes/p_vfs_read_0 vfs_read count=count pos=pos
f:fprobes/vfs_write__entry vfs_write count=count pos=pos
t:tracepoints/sched_overutilized_tp sched_overutilized_tp rd=rd overutilized=overutilized
Link: https://lore.kernel.org/all/168507474014.913472.16963996883278039183.stgit@mhiramat.roam.corp.google.com/
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Tested-by: Alan Maguire <alan.maguire@oracle.com>1 parent 1b8b0cd commit b576e09
File tree
6 files changed
+270
-31
lines changed- kernel/trace
6 files changed
+270
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
667 | 679 | | |
668 | 680 | | |
669 | 681 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5698 | 5698 | | |
5699 | 5699 | | |
5700 | 5700 | | |
| 5701 | + | |
| 5702 | + | |
| 5703 | + | |
5701 | 5704 | | |
| 5705 | + | |
5702 | 5706 | | |
5703 | 5707 | | |
5704 | 5708 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
| |||
385 | 386 | | |
386 | 387 | | |
387 | 388 | | |
| 389 | + | |
388 | 390 | | |
389 | 391 | | |
390 | 392 | | |
| |||
930 | 932 | | |
931 | 933 | | |
932 | 934 | | |
933 | | - | |
| 935 | + | |
934 | 936 | | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
935 | 941 | | |
936 | 942 | | |
937 | 943 | | |
| |||
995 | 1001 | | |
996 | 1002 | | |
997 | 1003 | | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
1005 | | - | |
1006 | 1004 | | |
1007 | 1005 | | |
1008 | 1006 | | |
| |||
1014 | 1012 | | |
1015 | 1013 | | |
1016 | 1014 | | |
1017 | | - | |
| 1015 | + | |
| 1016 | + | |
1018 | 1017 | | |
1019 | 1018 | | |
1020 | 1019 | | |
1021 | 1020 | | |
1022 | 1021 | | |
1023 | 1022 | | |
1024 | 1023 | | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
1025 | 1043 | | |
1026 | | - | |
| 1044 | + | |
1027 | 1045 | | |
1028 | 1046 | | |
1029 | 1047 | | |
| |||
1032 | 1050 | | |
1033 | 1051 | | |
1034 | 1052 | | |
1035 | | - | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
| 1053 | + | |
1042 | 1054 | | |
1043 | 1055 | | |
1044 | | - | |
1045 | 1056 | | |
1046 | 1057 | | |
1047 | | - | |
1048 | 1058 | | |
1049 | 1059 | | |
1050 | | - | |
1051 | | - | |
1052 | 1060 | | |
| 1061 | + | |
1053 | 1062 | | |
1054 | 1063 | | |
1055 | 1064 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
742 | 742 | | |
743 | 743 | | |
744 | 744 | | |
745 | | - | |
| 745 | + | |
746 | 746 | | |
747 | 747 | | |
748 | 748 | | |
| |||
823 | 823 | | |
824 | 824 | | |
825 | 825 | | |
826 | | - | |
| 826 | + | |
827 | 827 | | |
828 | 828 | | |
829 | | - | |
| 829 | + | |
830 | 830 | | |
831 | 831 | | |
832 | 832 | | |
| |||
856 | 856 | | |
857 | 857 | | |
858 | 858 | | |
859 | | - | |
| 859 | + | |
860 | 860 | | |
861 | 861 | | |
862 | 862 | | |
| |||
866 | 866 | | |
867 | 867 | | |
868 | 868 | | |
| 869 | + | |
869 | 870 | | |
870 | | - | |
871 | | - | |
872 | 871 | | |
| 872 | + | |
873 | 873 | | |
874 | 874 | | |
875 | 875 | | |
| |||
0 commit comments