On Thu, Mar 13, 2025 at 03:24:22PM -0700, Namhyung Kim wrote: > I think #ifdef placements is not a big deal, but I still don't want to > pull libcapstone details into the perf tree. > For LLVM, I think you should to build llvm-c-helpers anyway which means > you still need LLVM headers and don't need to redefine the structures. > Can we do the same for capstone? I think it's best to use capstone > headers directly and add a build option to use dlopen(). My two cents: if one wants to support some library, then have its devel packages available at build time. Then, perf nowadays has lots of dependencies, we need to rein on that, making the good to have but not always used things to be dlopen'ed. Like we did with gtk (that at this point I think is really deprecated, BTW). gdb has prior art in this area that we could use, it is not even a TUI but it asks if debuginfo should be used and if so it goes on on potentially lenghty updates of the local buildid cache they keep (which is not the one we use, it should be). And in the recent discussion with Dmitry Vyukov the possibility doing a question to the user about a default behaviour to be set and then using .perfconfig not to bother anymore the user about things is part of helping the user to deal with the myriad possibilites perf offers. gdb could use that as well, why ask at every session if debuginfod should be used? Annoying. I think perf should try to use what is available, both at build and at run time, and it shouldn't change the way it output things, but should warn the user about recent developments, things we over time figured out are problematic and thus a new default would be better, but then obtain consent if the user cares about it, and allow for backtracking, to go and change .perfconfig when the user realises the old output/behaviour is not really nice. But keeping the grass green as it used to be should be the priority. - Arnaldo