Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User defined probe UX improvements #435

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

User defined probe UX improvements #435

wants to merge 4 commits into from

Conversation

atenart
Copy link
Contributor

@atenart atenart commented Oct 23, 2024

A few improvements in how we parse --probe cli arguments, to make them easier to use and more aligned to other tools with similar arguments.

This makes the probe type optional when using a tracepoint; one can use
`-p skb:kfree_skb` instead of `-p tp:skb:kfree_skb`.

The logic is as follow:
- If a probe type is explicitly given, we're using it.
- If no probe type is given:
  + If a single ':' is found, defaults to 'raw_tracepoint'.
  + If no ':' is found, defaults to 'kprobe'.

Note that default probe types are not considered stable and might evolve
over time (and this was never the intent). Update the help accordingly.

Signed-off-by: Antoine Tenart <[email protected]>
Probe types are reported using abbreviations in the events output. Also
'tp' was already accepted instead of 'raw_tracepoint' when adding a
user-defined probe. Extend the logic to cover kprobes and kretprobes.

Signed-off-by: Antoine Tenart <[email protected]>
Reuse the same logic that is used elsewhere to parse probes, so the user
has a unified experience. Also this allows using the same defaults and
abbreviations.

Signed-off-by: Antoine Tenart <[email protected]>
@atenart atenart added this to the v1.5 milestone Oct 23, 2024
This should now be the default usage as it makes things easier. Explicit
probe types can be used if not used by default (eg. kretprobe) or in
profiles.

Signed-off-by: Antoine Tenart <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant