trace
is one of the eBPF bcc toolkits.
In this example
Using the trace multi-tool to watch login requests, by instrumenting the pam library:
# trace 'pam:pam_start "%s: %s", arg1, arg2'
TIME PID COMM FUNC -
17:49:45 5558 sshd pam_start sshd: root
17:49:47 5662 sudo pam_start sudo: root
17:49:49 5727 login pam_start login: bgregg
Many tools have usage messages (-h), and all should have man pages and text files of example output in the bcc project.
Since trace
can probe both user-level and kernel-level function activities(shown in the following figure), but tutorials are very limited!!!
Could anyone provide a step-by-step tutorial for hacking user-level program code, like the question in this post?
Goal: I want to probe function minor_collection_begin