On 9/11/2023 9:32 PM, Greg Kroah-Hartman wrote:
On Mon, Sep 11, 2023 at 07:24:35PM +0800, Linyu Yuan wrote:
some trace event use an interger to to save a bit field info of gadget,
also some trace save endpoint name in string forat, it all can be
chagned to other way at trace event store phase.
bit field can be replace with a union interger member which include
multiple bit fields.
ep name stringe can be replace to a interger which contaion number
and dir info.
Ok, but how much memory did you actually save here? Is the memory saved
only if tracing is enbaled, or it is always? Is there a speed penality
for these changes or is it the same?
yes, it is save trace ring buffer only when tracing enabled, as save
less data, speed is higher.
it is help when enable trace for a long period.
for a single trace entry, take struct usb_gadget as example, at worst
case, it save (19 dword - 1 dword) / 19dword = 94% buffer.
for ep name, it only need 4 bytes/ (4bytes + 9bytes ) = 30%.
You are doing a lot of code reorginization without any real explaination
of why this is needed, nor proof about it.
thanks,
greg k-h