traceprobe_parse_event_name(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ traceprobe_parse_event_name(9) ✨

okay so bestie, welcome to the kernel API manual page for traceprobe_parse_event_name(9) β€” yes that's the whole title, it's giving "function so important it gets its own little paper" πŸ’…


🌸 NAME 🌸

traceprobe_parse_event_name β€” parses a string into group and event names πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int traceprobe_parse_event_name (const char **pevent , const char
**pgroup , char *buf , int offset );

πŸ’– ARGUMENTS πŸ’–

  • pevent β€” a pointer to the string that's gonna get parsed, the main character of this whole operation ✨
  • pgroup β€” a pointer to the group name 🫢
  • buf β€” a buffer where we stash the parsed group name πŸ’
  • offset β€” the offset of the string in the original user command, and it's literally only there for logging purposes, no cap πŸ“

πŸ”₯ DESCRIPTION πŸ”₯

so what this does is it parses a string that's formatted like [GROUP/][EVENT] or [GROUP.][EVENT] β€” and heads up bestie, either GROUP or EVENT or both must be specified, you can't just roll up with nothing πŸ™ˆ

because the parsed group name gets stored in buf, the caller has to make sure buf is at least MAX_EVENT_NAME_LEN bytes. that's on you, not on this function, so like… don't skip the vibe check on your buffer size πŸ’€

if it succeeds, *pevent gets updated to point to the event name part of the original string, or NULL if there's no event name. also, *pgroup gets updated to point to the parsed group, which is the one stored in buf, or NULL if there's no group name. slay πŸ‘‘


⭐ RETURN ⭐

0 on success, or -EINVAL on failure 😭


🌈 SEE ALSO 🌈

Kernel file ./kernel/trace/trace_probe.c β€” go read it, iykyk πŸ’œ


and that's the page fr fr 🧚 from ./kernel/trace, the October 2026 edition β€” mwah, go parse some event names bestie πŸ’…πŸ’–πŸŒΈ

πŸ“¦ where this page comes from