Re: [PATCH v2] staging: dwc2: toggle periodic debugging output separately
Hi Felipe, > > In some cases, this could help, but a lot of the prints modified by this > > patch are used for both periodic and non-periodic transfers. AFAIU, with > > dynamic printks you could only enable/disable them altogether, not based > > on some arbitrary condition (e.g., the urb being handled is targeted at > > a periodic endpoint or not). > > you can enable prints line-by-line Yeah, I know that. But my point is that some prints are used for both periodic and non-periodic transfers. So when I enable them, my log gets flooded with the messages resulting from periodic transfers, locking up my board. But when I disable them, I obviously don't get any useful debugging info for the non-periodic transfers I'm looking at... Gr. Matthijs -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] staging: dwc2: toggle periodic debugging output separately
Hi, On Tue, Apr 09, 2013 at 07:35:33PM +0200, Matthijs Kooijman wrote: > > > This adds a config option USB_DWC2_DEBUG_PERIODIC that allows debugging > > > output be suppressed for periodic transfers. This helps when debugging > > > non-periodic transfers while there are also periodic transfers going on > > > (both to make the debug output less polluted and to prevent all CPU time > > > going to debug messages). > > > [...] > > > Signed-off-by: Matthijs Kooijman > > > > why don't you just use dynamic printk instead ? > In some cases, this could help, but a lot of the prints modified by this > patch are used for both periodic and non-periodic transfers. AFAIU, with > dynamic printks you could only enable/disable them altogether, not based > on some arbitrary condition (e.g., the urb being handled is targeted at > a periodic endpoint or not). you can enable prints line-by-line -- balbi signature.asc Description: Digital signature
RE: [PATCH v2] staging: dwc2: toggle periodic debugging output separately
> From: Matthijs Kooijman [mailto:matth...@stdin.nl] > Sent: Tuesday, April 09, 2013 8:02 AM > > This adds a config option USB_DWC2_DEBUG_PERIODIC that allows debugging > output be suppressed for periodic transfers. This helps when debugging > non-periodic transfers while there are also periodic transfers going on > (both to make the debug output less polluted and to prevent all CPU time > going to debug messages). > > In addition, a debug message from dwc2_hcd_is_status_changed is removed > entirely, since it often floods the log regardless of periodic > transfers. Hi Matthijs, This is fine by me. This should be OK while the driver is in staging, but would probably have to be removed before the driver could be moved to mainline. But at that point the plan is to remove most of the debug messages anyway. A couple of coding style problems - in the kernel, #ifdef statements always start in column 0, they are not indented with the C code like you have done. Also, instead of having #ifdef CONFIG_USB_DWC2_DEBUG_PERIODIC statements in the .c files, please add another macro, say "dbg_isoc()", which is true if USB_DWC2_DEBUG_PERIODIC is defined, and use that in the .c files instead. If you fix those two things, I will take this. One question - is this meant to be applied now, or is it based on top of your previous patch series which you are redoing? -- Paul -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] staging: dwc2: toggle periodic debugging output separately
Hi Felipe, > > This adds a config option USB_DWC2_DEBUG_PERIODIC that allows debugging > > output be suppressed for periodic transfers. This helps when debugging > > non-periodic transfers while there are also periodic transfers going on > > (both to make the debug output less polluted and to prevent all CPU time > > going to debug messages). > > [...] > > Signed-off-by: Matthijs Kooijman > > why don't you just use dynamic printk instead ? In some cases, this could help, but a lot of the prints modified by this patch are used for both periodic and non-periodic transfers. AFAIU, with dynamic printks you could only enable/disable them altogether, not based on some arbitrary condition (e.g., the urb being handled is targeted at a periodic endpoint or not). Gr. Matthijs -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] staging: dwc2: toggle periodic debugging output separately
On Tue, Apr 09, 2013 at 05:01:36PM +0200, Matthijs Kooijman wrote: > This adds a config option USB_DWC2_DEBUG_PERIODIC that allows debugging > output be suppressed for periodic transfers. This helps when debugging > non-periodic transfers while there are also periodic transfers going on > (both to make the debug output less polluted and to prevent all CPU time > going to debug messages). > > In addition, a debug message from dwc2_hcd_is_status_changed is removed > entirely, since it often floods the log regardless of periodic > transfers. > > Signed-off-by: Matthijs Kooijman why don't you just use dynamic printk instead ? -- balbi signature.asc Description: Digital signature