Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • J jg-open
  • Project information
    • Project information
    • Activity
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
    • Locked Files
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • linux-arm
  • jg-open
  • Repository
Switch branch/tag
  • jg-open
  • kernel
  • trace
  • trace_eprobe.c
Find file BlameHistoryPermalink
  • Steven Rostedt (VMware)'s avatar
    tracing: Fix event probe removal from dynamic events · 7d5fda1c
    Steven Rostedt (VMware) authored Oct 13, 2021
    When an event probe is to be removed via the API that created it via the
    dynamic events, an -ENOENT error is returned.
    
    This is because the removal of the event probe does not expect to see the
    event system and name that the event probe is attached to, even though
    that's part of the API to create it. As the removal of probes is to use
    the same API as they are created.
    
    In fact, the removal is not consistent with the kprobes and uprobes
    removal. Fix that by allowing various ways to remove the eprobe.
    
    The eprobe is created with:
    
     e:[GROUP/]NAME SYSTEM/EVENT [OPTIONS]
    
    Have it get removed by echoing in the following into dynamic_events:
    
     # Remove all eprobes with NAME
     echo '-:NAME' >> dynamic_events
    
     # Remove a specific eprobe
     echo '-:GROUP/NAME' >> dynamic_events
     echo '-:GROUP/NAME SYSTEM/EVENT' >> dynamic_events
     echo '-:NAME SYSTEM/EVENT' >> dynamic_events
     echo '-:GROUP/NAME SYSTEM/EVENT OPTIONS' >> dynamic_events
     echo '-:NAME SYSTEM/EVENT OPTIONS' >> dynamic_events
    
    Link: https://lkml.kernel.org/r/20211012081925.0e19cc4f@gandalf.local.home
    Link: https://lkml.kernel.org/r/20211013205533.630722129@goodmis.org
    
    
    
    Suggested-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
    Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
    Fixes: 7491e2c4
    
     ("tracing: Add a probe that attaches to trace events")
    Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
    7d5fda1c