Re: [PATCH] ftracetest: Do not use usleep

2015-03-30 Thread Steven Rostedt
On Tue, 31 Mar 2015 02:08:06 +0100 Pádraig Brady wrote: > > I'm okay with ping though but worried if some tiny system might lack > > the ping command.. > > I'd use a fallback method like: > > yield() { sleep .001 || usleep 1 || sleep 1; } > > Then just s/usleep 1/yield/ yield() { ping

Re: [PATCH] ftracetest: Do not use usleep

2015-03-30 Thread Pádraig Brady
On 31/03/15 01:48, Namhyung Kim wrote: > Hi Steve, > > On Mon, Mar 30, 2015 at 05:15:11PM -0400, Steven Rostedt wrote: >> On Thu, 26 Mar 2015 09:32:23 +0900 >> Namhyung Kim wrote: >> >>> The usleep is only provided on distros from Redhat so running ftracetest >>> on other distro resulted in

Re: [PATCH] ftracetest: Do not use usleep

2015-03-30 Thread Steven Rostedt
On Tue, 31 Mar 2015 09:48:55 +0900 Namhyung Kim wrote: > I understand your point. But this is not just cat, it needs grep and > wc also. So I think there should be scheduler event(s). > Yes, and cat opens 'trace', which will disable tracing, and if that happens before grep and wc, then those

Re: [PATCH] ftracetest: Do not use usleep

2015-03-30 Thread Namhyung Kim
Hi Steve, On Mon, Mar 30, 2015 at 05:15:11PM -0400, Steven Rostedt wrote: > On Thu, 26 Mar 2015 09:32:23 +0900 > Namhyung Kim wrote: > > > The usleep is only provided on distros from Redhat so running ftracetest > > on other distro resulted in failures due to the missing usleep. > > > > The

Re: [PATCH] ftracetest: Do not use usleep

2015-03-30 Thread Steven Rostedt
On Thu, 26 Mar 2015 09:32:23 +0900 Namhyung Kim wrote: > The usleep is only provided on distros from Redhat so running ftracetest > on other distro resulted in failures due to the missing usleep. > > The reason of using [u]sleep in the test was to generate (scheduler) > events. But as we use

Re: [PATCH] ftracetest: Do not use usleep

2015-03-30 Thread Shuah Khan
On 03/25/2015 06:32 PM, Namhyung Kim wrote: > The usleep is only provided on distros from Redhat so running ftracetest > on other distro resulted in failures due to the missing usleep. > > The reason of using [u]sleep in the test was to generate (scheduler) > events. But as we use 'cat trace |

Re: [PATCH] ftracetest: Do not use usleep

2015-03-30 Thread Shuah Khan
On 03/25/2015 06:32 PM, Namhyung Kim wrote: The usleep is only provided on distros from Redhat so running ftracetest on other distro resulted in failures due to the missing usleep. The reason of using [u]sleep in the test was to generate (scheduler) events. But as we use 'cat trace | grep |

Re: [PATCH] ftracetest: Do not use usleep

2015-03-30 Thread Steven Rostedt
On Thu, 26 Mar 2015 09:32:23 +0900 Namhyung Kim namhy...@kernel.org wrote: The usleep is only provided on distros from Redhat so running ftracetest on other distro resulted in failures due to the missing usleep. The reason of using [u]sleep in the test was to generate (scheduler) events.

Re: [PATCH] ftracetest: Do not use usleep

2015-03-30 Thread Steven Rostedt
On Tue, 31 Mar 2015 09:48:55 +0900 Namhyung Kim namhy...@kernel.org wrote: I understand your point. But this is not just cat, it needs grep and wc also. So I think there should be scheduler event(s). Yes, and cat opens 'trace', which will disable tracing, and if that happens before grep

Re: [PATCH] ftracetest: Do not use usleep

2015-03-30 Thread Pádraig Brady
On 31/03/15 01:48, Namhyung Kim wrote: Hi Steve, On Mon, Mar 30, 2015 at 05:15:11PM -0400, Steven Rostedt wrote: On Thu, 26 Mar 2015 09:32:23 +0900 Namhyung Kim namhy...@kernel.org wrote: The usleep is only provided on distros from Redhat so running ftracetest on other distro resulted in

Re: [PATCH] ftracetest: Do not use usleep

2015-03-30 Thread Steven Rostedt
On Tue, 31 Mar 2015 02:08:06 +0100 Pádraig Brady p...@draigbrady.com wrote: I'm okay with ping though but worried if some tiny system might lack the ping command.. I'd use a fallback method like: yield() { sleep .001 || usleep 1 || sleep 1; } Then just s/usleep 1/yield/ yield() {

Re: [PATCH] ftracetest: Do not use usleep

2015-03-30 Thread Namhyung Kim
Hi Steve, On Mon, Mar 30, 2015 at 05:15:11PM -0400, Steven Rostedt wrote: On Thu, 26 Mar 2015 09:32:23 +0900 Namhyung Kim namhy...@kernel.org wrote: The usleep is only provided on distros from Redhat so running ftracetest on other distro resulted in failures due to the missing usleep.

[PATCH] ftracetest: Do not use usleep

2015-03-25 Thread Namhyung Kim
The usleep is only provided on distros from Redhat so running ftracetest on other distro resulted in failures due to the missing usleep. The reason of using [u]sleep in the test was to generate (scheduler) events. But as we use 'cat trace | grep | wc -l' to read the events, the command themselves

[PATCH] ftracetest: Do not use usleep

2015-03-25 Thread Namhyung Kim
The usleep is only provided on distros from Redhat so running ftracetest on other distro resulted in failures due to the missing usleep. The reason of using [u]sleep in the test was to generate (scheduler) events. But as we use 'cat trace | grep | wc -l' to read the events, the command themselves