All of lore.kernel.org
 help / color / mirror / Atom feed
From: "avagin@gmail.com" <avagin@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Andrew Vagin <avagin@openvz.org>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH] trace: don't print an extra separator of flags
Date: Mon, 20 Feb 2012 23:39:04 +0400	[thread overview]
Message-ID: <4F42A158.4090501@gmail.com> (raw)
In-Reply-To: <1329761354.25686.32.camel@gandalf.stny.rr.com>

On 02/20/2012 10:09 PM, Steven Rostedt wrote:
> On Sun, 2012-02-19 at 14:16 +0300, Andrew Vagin wrote:
>> From: Andrey Vagin<avagin@openvz.org>
>>
>> It occurs if __print_flags is used more than once
>
> Hi, which tracepoint does this? I like to see what the issue is.

The mainstream kernel doesn't have such trace-point, but I have.

Do you want to say that this bug should not be fixed in this case? :)

>
> Thanks,
>
> -- Steve
>
>>
>> Signed-off-by: Andrew Vagin<avagin@openvz.org>
>> ---
>>   kernel/trace/trace_output.c |    6 ++++--
>>   1 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
>> index 0d6ff35..3efd718 100644
>> --- a/kernel/trace/trace_output.c
>> +++ b/kernel/trace/trace_output.c
>> @@ -300,7 +300,7 @@ ftrace_print_flags_seq(struct trace_seq *p, const char *delim,
>>   	unsigned long mask;
>>   	const char *str;
>>   	const char *ret = p->buffer + p->len;
>> -	int i;
>> +	int i, first = 1;
>>
>>   	for (i = 0;  flag_array[i].name&&  flags; i++) {
>>
>> @@ -310,8 +310,10 @@ ftrace_print_flags_seq(struct trace_seq *p, const char *delim,
>>
>>   		str = flag_array[i].name;
>>   		flags&= ~mask;
>> -		if (p->len&&  delim)
>> +		if (!first&&  delim)
>>   			trace_seq_puts(p, delim);
>> +		else
>> +			first = 0;
>>   		trace_seq_puts(p, str);
>>   	}
>>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


  reply	other threads:[~2012-02-20 19:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-19 11:16 [PATCH] trace: don't print an extra separator of flags Andrew Vagin
2012-02-20 18:09 ` Steven Rostedt
2012-02-20 19:39   ` avagin [this message]
2012-02-20 19:47     ` Steven Rostedt
2012-02-20 20:43       ` [PATCH] " Andrew Vagin
2012-02-21  1:18         ` Steven Rostedt
2012-02-27  9:31 ` [tip:perf/core] tracing: Don't " tip-bot for Andrey Vagin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F42A158.4090501@gmail.com \
    --to=avagin@gmail.com \
    --cc=avagin@openvz.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.