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

Definitions inside duplicate files are not displayed #402

Description

@tleb

For some reason, the kernel_fpu_begin definition in arch/arm64/include/asm/fpu.h isn't indexed. Sources. This was reported to us by email. It doesn't affect only v6.13.7 but I didn't dig deep to list faulty versions.

No operator or CONFIG_ to be found in the line, so it doesn't seem related to the known issues with the current parse_defs_C() implementation.

All ctags I tested (v5.9.0 from Ubuntu, v6.1.0 locally and v6.1.0 from our current Docker container) properly report the definition, so it appears to be a bug elsewhere in the Elixir code.

Locally:
⟩ ctags --version | grep -i copyright
Universal Ctags 6.1.0(v6.1.0), Copyright (C) 2015-2023 Universal Ctags Team
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert

⟩ wget -O fpu.h "https://elixir.bootlin.com/linux/v6.13.7/source/arch/arm64/include/asm/fpu.h?raw=1"

⟩ ctags -x --kinds-c=+p+x fpu.h
__ASM_FPU_H      macro         7 fpu.h            #define __ASM_FPU_H
kernel_fpu_available macro        11 fpu.h            #define kernel_fpu_available() cpu_has_neon()
kernel_fpu_begin macro        12 fpu.h            #define kernel_fpu_begin() kernel_neon_begin()
kernel_fpu_end   macro        13 fpu.h            #define kernel_fpu_end() kernel_neon_end()
Ubuntu Docker container:
⟩ docker run -it --rm ubuntu:jammy /bin/bash
$ apt update -y && apt upgrade -y
$ apt install -y wget universal-ctags

$ ctags --version | grep -i copyright
Universal Ctags 5.9.0, Copyright (C) 2015 Universal Ctags Team
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert

$ wget -O fpu.h "https://elixir.bootlin.com/linux/v6.13.7/source/arch/arm64/include/asm/fpu.h?raw=1"

$ ctags -x --kinds-c=+p+x fpu.h
__ASM_FPU_H      macro         7 fpu.h            #define __ASM_FPU_H
kernel_fpu_available macro        11 fpu.h            #define kernel_fpu_available() cpu_has_neon()
kernel_fpu_begin macro        12 fpu.h            #define kernel_fpu_begin() kernel_neon_begin()
kernel_fpu_end   macro        13 fpu.h            #define kernel_fpu_end() kernel_neon_end()
Current Elixir container:
⟩ git rev-parse --short HEAD
c4f1532
⟩ docker build -t elixir --build-arg ELIXIR_VERSION=$(git rev-parse --short HEAD) -f ./docker/Dockerfile .
⟩ docker run -it --rm --entrypoint /bin/bash elixir

$ ctags --version | grep -i copyright
Universal Ctags 6.1.0(v6.1.0), Copyright (C) 2015-2023 Universal Ctags Team
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert

$ wget -O fpu.h "https://elixir.bootlin.com/linux/v6.13.7/source/arch/arm64/include/asm/fpu.h?raw=1"

$ ctags -x --kinds-c=+p+x fpu.h
__ASM_FPU_H      macro         7 fpu.h            #define __ASM_FPU_H
kernel_fpu_available macro        11 fpu.h            #define kernel_fpu_available() cpu_has_neon()
kernel_fpu_begin macro        12 fpu.h            #define kernel_fpu_begin() kernel_neon_begin()
kernel_fpu_end   macro        13 fpu.h            #define kernel_fpu_end() kernel_neon_end()

Activity

  1. added
    indexing
    on Mar 17, 2025
  2. added theissue type on Mar 17, 2025
  3. fstachura commented on Mar 17, 2025

    @fstachura
    Collaborator

    https://elixir.bootlin.com/linux/v6.13.7/source/arch/arm/include/asm/fpu.h and https://elixir.bootlin.com/linux/v6.13.7/source/arch/arm64/include/asm/fpu.h are the exact same file, so their git blob ids (and Elixir blob ids) are the same. The first (arm) file is on the definitions list, because it's before arm64 file in vers database.

    >>> [n for n in db.vers.get('v6.13.6').iter() if n[1].endswith('/fpu.h') and 'arm' in n[1]]
    [(133770, 'arch/arm/include/asm/fpu.h'), (133770, 'arch/arm64/include/asm/fpu.h')]
    

    A fix should land somewhere in query.py:Query.get_idents_defs (likely get_ident_comps too). PathList items are sorted by blob id, so it's just a matter of making sure the function collects all entries with the same id, not just a single entry.

  4. changed the title [-]`kernel_fpu_begin` ARM64 definition isn't indexed[/-] [+]Display definitions inside duplicate files[/+] on Mar 19, 2025
  5. changed the title [-]Display definitions inside duplicate files[/-] [+]Definitions inside duplicate files are not displayed[/+] on Mar 19, 2025
  6. added 2 commits that reference this issue on May 23, 2025
    0a822ce
    55613f7
  7. added a commit that references this issue on Aug 14, 2026
    4f14855
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