Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Tracepoints functions can not be searched #392

Open

Description

@Tropicao

Knowing the name of a specific tracepoint in the kernel (eg: sched_switch), it is currently possible to find its definition, but the corresponding function call can not be found directly with the search field. In this example, the corresponding function is trace_sched_switch, but inputing trace_sched_switch in the research field yields no results in Elixir.

Activity

  1. tleb commented on Feb 19, 2025

    @tleb
    Member

    So we have two entry types (summarising):

    • defs, or definitions. Those are given to us by universal-ctags.
    • refs, or references. Those are ANY word in the source code that have a definition with the same name.

    So we don't have any entry for trace_sched_switch because ctags gives us no entry for it anywhere in the kernel. And no references because there are no definitions.


    We could be able to do something about the definition using ctags -D:

    ⟩ wget -O sched.h \
        'https://elixir.bootlin.com/linux/v6.13.3/source/include/trace/events/sched.h?raw'
    
    ⟩ ctags -x -D "TRACE_EVENT(NAME, ...)=void trace_##NAME(void) {}" sched.h | \
        grep sched_switch
    __trace_sched_switch_state function    190 sched.h          static inline long __trace_sched_switch_state(bool preempt,
    trace_sched_switch function    269 sched.h          );
    
    

    The issue is that -D leads to functions reported at the end of the macro. The question was asked to the universal-ctags maintainer. See #379. And masatake released a draft PR two days ago handling the issue! universal-ctags/ctags#4198

  2. added
    indexing
    on Feb 21, 2025
  3. added theissue type on Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    indexing

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions