On Thu, 21 Nov 2024 19:34:31 +0800 Shuai Xue <xueshuai@xxxxxxxxxxxxxxxxx> wrote: > Sure, I can reorganize the directory. You have two optional proposals: > > 1. /sys/kernel/debug/tracing/events/pci_hp_event I'm guessing the above has TRACING_SYSTEM = pci_hp_event ? That is, the above is a system and not an event. > 2. /sys/kernel/debug/tracing/events/pci/pci_hp_event Whereas here, it's an event. > > I personally prefer the second approach. However, I'll defer the final decision > to the tracing subsystem maintainer, considering their expertise and > familiarity with the existing conventions. Normally the system is determined by the users of the tracing infrastructure and not the tracing maintainers. But I can give you some guidelines. The "system" level: /sys/kernel/tracing/events/<system> is just a way to group like events making it easier to enable them all at once: echo 1 > /sys/kernel/tracing/events/<system>/enable or trace-cmd start -e <system> The name of the "system" should be something that all the events underneath represent. Note, although events in two different systems can have the same name, it's best to try to keep them all unique. That's because if you have: systemA/foo and systemB/foo If you add to the kernel command line: trace_event=foo it will enable both events. Although that could be fixed with: trace_event=systemA:foo Note: trace_event=systemA would enable all systemA events at boot. That said, is all these events going to be related to hotplug? If so, you probably want "hotplug" or "hp" in the system name. If you make it just "pci", then it will be expected that all the events will be related to PCI in general. Does that help? -- Steve