[PATCH] D143966: [DebugInfo][BPF] Add 'annotations' field for DIBasicType & DISubroutineType

Eduard Zingerman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 13:23:45 PDT 2023


eddyz87 marked an inline comment as done.
eddyz87 added a comment.

In D143966#4438793 <https://reviews.llvm.org/D143966#4438793>, @dblaikie wrote:

> Seems generally OK.

Thank you for taking a look.

> As for the design - could this maybe have been a decorator on a type? (or are there other uses for annotations) more like how `DW_TAG_const_type` works, for instance?

You mean why not model this thing as DIDerivedType, right?
The idea is that existing tools would ignore the unknown attribute (annotations), however the same tools won't know how to handle a new derived type in the chain. E.g. gdb would require update to handle some of the types in kernels built using new encoding etc. So, after some discussion we decided to use attributes instead of new derived type.

> And presumably the back-compat can be removed from LLVM once linux has updated pahole/whatever your support timeline is for LLVM (like how many old kernel versions are supported by recent LLVM) - rather than once Linux has dropped support for an LLVM that's old enough not to have the new feature (that milestone is when Linux can remove the backcompat support from pahole, rather than when LLVM can remove support for the old format).

This is my assumption as well. As you correctly note, the dependency here is the minimal version of pahole required for kernel compilation. Kernel documentation lists 1.16 as a current minimal requirement, it was released 3 years ago. I can initiate a discussion on this topic if you want to have specific timeline.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143966/new/

https://reviews.llvm.org/D143966



More information about the llvm-commits mailing list