Re: [PATCH] ring_buffer: Update logging to use single line output

2018-07-12 Thread Steven Rostedt
On Wed, 11 Jul 2018 21:42:53 -0700
Joe Perches  wrote:

> > I just noticed this patch. Please don't send patches Cc'd to other
> > threads. They need to start a new thread, otherwise, like this one, it
> > will most likely be lost.
> > 
> > If you want this applied still, please resend it properly.  
> 
> An email sent directly to you should not be lost by you.

OK, it was ignored.

-- Steve


Re: [PATCH] ring_buffer: Update logging to use single line output

2018-07-12 Thread Steven Rostedt
On Wed, 11 Jul 2018 21:42:53 -0700
Joe Perches  wrote:

> > I just noticed this patch. Please don't send patches Cc'd to other
> > threads. They need to start a new thread, otherwise, like this one, it
> > will most likely be lost.
> > 
> > If you want this applied still, please resend it properly.  
> 
> An email sent directly to you should not be lost by you.

OK, it was ignored.

-- Steve


Re: [PATCH] ring_buffer: Update logging to use single line output

2018-07-11 Thread Joe Perches
On Wed, 2018-07-11 at 22:57 -0400, Steven Rostedt wrote:
> On Fri, 11 May 2018 14:39:18 -0700
> Joe Perches  wrote:
> 
> > With a possible change to pr_fmt coming, the logging output can
> > become unbalanced when an initial line has a prefix and subsequent
> > lines do not when a multiple line pr_ is emitted.
> > 
> > Fix it by emitting a single line.
> > 
> > Miscellanea:
> > 
> > o Convert consecutive tests of total_lost and !total_lost to if/else
> 
> I just noticed this patch. Please don't send patches Cc'd to other
> threads. They need to start a new thread, otherwise, like this one, it
> will most likely be lost.
> 
> If you want this applied still, please resend it properly.

An email sent directly to you should not be lost by you.


> -- Steve
> 
> > 
> > Signed-off-by: Joe Perches 
> > ---
> >  kernel/trace/ring_buffer.c | 7 +++
> >  1 file changed, 3 insertions(+), 4 deletions(-)
> > 
> > diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> > index c9cb9767d49b..ee74494a2da3 100644
> > --- a/kernel/trace/ring_buffer.c
> > +++ b/kernel/trace/ring_buffer.c
> > @@ -5132,10 +5132,9 @@ static __init int test_ringbuffer(void)
> > pr_info("total events:   %ld\n", total_lost + 
> > total_read);
> > pr_info("  recorded len bytes:   %ld\n", total_len);
> > pr_info(" recorded size bytes:   %ld\n", total_size);
> > -   if (total_lost)
> > -   pr_info(" With dropped events, record len and size may 
> > not match\n"
> > -   " alloced and written from above\n");
> > -   if (!total_lost) {
> > +   if (total_lost) {
> > +   pr_info(" With dropped events, record len and size may 
> > not match alloced and written from above\n");
> > +   } else {
> > if (RB_WARN_ON(buffer, total_len != total_alloc ||
> >total_size != total_written))
> > break;
> 
> 


Re: [PATCH] ring_buffer: Update logging to use single line output

2018-07-11 Thread Joe Perches
On Wed, 2018-07-11 at 22:57 -0400, Steven Rostedt wrote:
> On Fri, 11 May 2018 14:39:18 -0700
> Joe Perches  wrote:
> 
> > With a possible change to pr_fmt coming, the logging output can
> > become unbalanced when an initial line has a prefix and subsequent
> > lines do not when a multiple line pr_ is emitted.
> > 
> > Fix it by emitting a single line.
> > 
> > Miscellanea:
> > 
> > o Convert consecutive tests of total_lost and !total_lost to if/else
> 
> I just noticed this patch. Please don't send patches Cc'd to other
> threads. They need to start a new thread, otherwise, like this one, it
> will most likely be lost.
> 
> If you want this applied still, please resend it properly.

An email sent directly to you should not be lost by you.


> -- Steve
> 
> > 
> > Signed-off-by: Joe Perches 
> > ---
> >  kernel/trace/ring_buffer.c | 7 +++
> >  1 file changed, 3 insertions(+), 4 deletions(-)
> > 
> > diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> > index c9cb9767d49b..ee74494a2da3 100644
> > --- a/kernel/trace/ring_buffer.c
> > +++ b/kernel/trace/ring_buffer.c
> > @@ -5132,10 +5132,9 @@ static __init int test_ringbuffer(void)
> > pr_info("total events:   %ld\n", total_lost + 
> > total_read);
> > pr_info("  recorded len bytes:   %ld\n", total_len);
> > pr_info(" recorded size bytes:   %ld\n", total_size);
> > -   if (total_lost)
> > -   pr_info(" With dropped events, record len and size may 
> > not match\n"
> > -   " alloced and written from above\n");
> > -   if (!total_lost) {
> > +   if (total_lost) {
> > +   pr_info(" With dropped events, record len and size may 
> > not match alloced and written from above\n");
> > +   } else {
> > if (RB_WARN_ON(buffer, total_len != total_alloc ||
> >total_size != total_written))
> > break;
> 
> 


Re: [PATCH] ring_buffer: Update logging to use single line output

2018-07-11 Thread Steven Rostedt
On Fri, 11 May 2018 14:39:18 -0700
Joe Perches  wrote:

> With a possible change to pr_fmt coming, the logging output can
> become unbalanced when an initial line has a prefix and subsequent
> lines do not when a multiple line pr_ is emitted.
> 
> Fix it by emitting a single line.
> 
>   Miscellanea:
> 
> o Convert consecutive tests of total_lost and !total_lost to if/else

I just noticed this patch. Please don't send patches Cc'd to other
threads. They need to start a new thread, otherwise, like this one, it
will most likely be lost.

If you want this applied still, please resend it properly.

-- Steve

> 
> Signed-off-by: Joe Perches 
> ---
>  kernel/trace/ring_buffer.c | 7 +++
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> index c9cb9767d49b..ee74494a2da3 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@ -5132,10 +5132,9 @@ static __init int test_ringbuffer(void)
>   pr_info("total events:   %ld\n", total_lost + 
> total_read);
>   pr_info("  recorded len bytes:   %ld\n", total_len);
>   pr_info(" recorded size bytes:   %ld\n", total_size);
> - if (total_lost)
> - pr_info(" With dropped events, record len and size may 
> not match\n"
> - " alloced and written from above\n");
> - if (!total_lost) {
> + if (total_lost) {
> + pr_info(" With dropped events, record len and size may 
> not match alloced and written from above\n");
> + } else {
>   if (RB_WARN_ON(buffer, total_len != total_alloc ||
>  total_size != total_written))
>   break;



Re: [PATCH] ring_buffer: Update logging to use single line output

2018-07-11 Thread Steven Rostedt
On Fri, 11 May 2018 14:39:18 -0700
Joe Perches  wrote:

> With a possible change to pr_fmt coming, the logging output can
> become unbalanced when an initial line has a prefix and subsequent
> lines do not when a multiple line pr_ is emitted.
> 
> Fix it by emitting a single line.
> 
>   Miscellanea:
> 
> o Convert consecutive tests of total_lost and !total_lost to if/else

I just noticed this patch. Please don't send patches Cc'd to other
threads. They need to start a new thread, otherwise, like this one, it
will most likely be lost.

If you want this applied still, please resend it properly.

-- Steve

> 
> Signed-off-by: Joe Perches 
> ---
>  kernel/trace/ring_buffer.c | 7 +++
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> index c9cb9767d49b..ee74494a2da3 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@ -5132,10 +5132,9 @@ static __init int test_ringbuffer(void)
>   pr_info("total events:   %ld\n", total_lost + 
> total_read);
>   pr_info("  recorded len bytes:   %ld\n", total_len);
>   pr_info(" recorded size bytes:   %ld\n", total_size);
> - if (total_lost)
> - pr_info(" With dropped events, record len and size may 
> not match\n"
> - " alloced and written from above\n");
> - if (!total_lost) {
> + if (total_lost) {
> + pr_info(" With dropped events, record len and size may 
> not match alloced and written from above\n");
> + } else {
>   if (RB_WARN_ON(buffer, total_len != total_alloc ||
>  total_size != total_written))
>   break;



[PATCH] ring_buffer: Update logging to use single line output

2018-05-11 Thread Joe Perches
With a possible change to pr_fmt coming, the logging output can
become unbalanced when an initial line has a prefix and subsequent
lines do not when a multiple line pr_ is emitted.

Fix it by emitting a single line.

Miscellanea:

o Convert consecutive tests of total_lost and !total_lost to if/else

Signed-off-by: Joe Perches 
---
 kernel/trace/ring_buffer.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index c9cb9767d49b..ee74494a2da3 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -5132,10 +5132,9 @@ static __init int test_ringbuffer(void)
pr_info("total events:   %ld\n", total_lost + 
total_read);
pr_info("  recorded len bytes:   %ld\n", total_len);
pr_info(" recorded size bytes:   %ld\n", total_size);
-   if (total_lost)
-   pr_info(" With dropped events, record len and size may 
not match\n"
-   " alloced and written from above\n");
-   if (!total_lost) {
+   if (total_lost) {
+   pr_info(" With dropped events, record len and size may 
not match alloced and written from above\n");
+   } else {
if (RB_WARN_ON(buffer, total_len != total_alloc ||
   total_size != total_written))
break;


[PATCH] ring_buffer: Update logging to use single line output

2018-05-11 Thread Joe Perches
With a possible change to pr_fmt coming, the logging output can
become unbalanced when an initial line has a prefix and subsequent
lines do not when a multiple line pr_ is emitted.

Fix it by emitting a single line.

Miscellanea:

o Convert consecutive tests of total_lost and !total_lost to if/else

Signed-off-by: Joe Perches 
---
 kernel/trace/ring_buffer.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index c9cb9767d49b..ee74494a2da3 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -5132,10 +5132,9 @@ static __init int test_ringbuffer(void)
pr_info("total events:   %ld\n", total_lost + 
total_read);
pr_info("  recorded len bytes:   %ld\n", total_len);
pr_info(" recorded size bytes:   %ld\n", total_size);
-   if (total_lost)
-   pr_info(" With dropped events, record len and size may 
not match\n"
-   " alloced and written from above\n");
-   if (!total_lost) {
+   if (total_lost) {
+   pr_info(" With dropped events, record len and size may 
not match alloced and written from above\n");
+   } else {
if (RB_WARN_ON(buffer, total_len != total_alloc ||
   total_size != total_written))
break;