On Thu, Apr 07, 2022 at 09:27:40AM +0800, Linyu Yuan wrote: > Last year I try to add trace event support for usb gadget configfs [1], > this time the idea is change a lot, the purpose is trace all user space > operation to gadget configuration, include gadget and it's function. But why? Who will use this, and what for? > In usb gadget configfs, mainly user can do mkdir/rmdir a group, > link/unlink a function, change gadget/function attributes, > each operation will touch a struct config_item. As userspace is the thing doing this, why do you need to tell userspace again that this happened? > It only have one trace event entry which store string, > provide several API which represent user operation and generate string > from struct config_item. > > example output, > mkdir-80 [000] ..... 44.555106: gadget_configfs: mkdir dummy > sh-76 [000] ..... 44.562609: gadget_configfs: echo dummy/idVendor 0x05C6 > > mkdir-81 [000] ..... 44.569795: gadget_configfs: mkdir dummy/functions/eem.0 > sh-76 [000] ..... 44.600221: gadget_configfs: echo dummy/functions/eem.0/dev_addr 1e:77:46:4b:1e:96 > > mkdir-82 [000] ..... 44.615542: gadget_configfs: mkdir dummy/configs/dummy.1 > ln-83 [000] ..... 44.628997: gadget_configfs: link dummy/configs/dummy.1 dummy/functions/eem.0 > sh-76 [000] ..... 44.634506: gadget_configfs: echo dummy/configs/dummy.1/MaxPower 500 > > mkdir-84 [000] ..... 44.642265: gadget_configfs: mkdir dummy/configs/dummy.1/strings/0x409 > sh-76 [000] ..... 44.663886: gadget_configfs: echo dummy/configs/dummy.1/strings/0x409/configuration dummy > > rmdir-85 [000] ..... 64.255507: gadget_configfs: rmdir dummy/configs/dummy.1/strings/0x409 > rm-86 [000] ..... 64.263926: gadget_configfs: unlink dummy/configs/dummy.1 dummy/functions/eem.0 > rmdir-87 [000] ..... 64.279768: gadget_configfs: rmdir dummy/configs/dummy.1 > rmdir-88 [000] ..... 64.328124: gadget_configfs: rmdir dummy/functions/eem.0 > rmdir-89 [000] ..... 64.992085: gadget_configfs: rmdir dummy As I said in other places, why not just add this to configfs directly instead of all over the individual users of this one subsystem? And again, why? thanks, greg k-h