linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][RT] tracing: Show padding as unsigned short
@ 2011-11-16 18:19 Steven Rostedt
  2011-11-19 13:09 ` John Kacur
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2011-11-16 18:19 UTC (permalink / raw)
  To: LKML, linux-rt-users; +Cc: Thomas Gleixner

RT added two bytes to trace migrate disable counting to the trace events
and used two bytes of the padding to make the change. The structures and
all were updated correctly, but the display in the event formats was
not:

cat /debug/tracing/events/sched/sched_switch/format

name: sched_switch
ID: 51
format:
	field:unsigned short common_type;	offset:0;	size:2;	signed:0;
	field:unsigned char common_flags;	offset:2;	size:1;	signed:0;
	field:unsigned char common_preempt_count;	offset:3;	size:1;	signed:0;
	field:int common_pid;	offset:4;	size:4;	signed:1;
	field:unsigned short common_migrate_disable;	offset:8;	size:2;	signed:0;
	field:int common_padding;	offset:10;	size:2;	signed:0;


The field for common_padding has the correct size and offset, but the
use of "int" might confuse some parsers (and people that are reading
it). This needs to be changed to "unsigned short".

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 37d3ffb..c71844c 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -117,7 +117,7 @@ static int trace_define_common_fields(void)
 	__common_field(unsigned char, preempt_count);
 	__common_field(int, pid);
 	__common_field(unsigned short, migrate_disable);
-	__common_field(int, padding);
+	__common_field(unsigned short, padding);
 
 	return ret;
 }



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][RT] tracing: Show padding as unsigned short
  2011-11-16 18:19 [PATCH][RT] tracing: Show padding as unsigned short Steven Rostedt
@ 2011-11-19 13:09 ` John Kacur
  2011-11-21 16:11   ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: John Kacur @ 2011-11-19 13:09 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, linux-rt-users, Thomas Gleixner

On Wed, Nov 16, 2011 at 7:19 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> RT added two bytes to trace migrate disable counting to the trace events
> and used two bytes of the padding to make the change. The structures and
> all were updated correctly, but the display in the event formats was
> not:
>
> cat /debug/tracing/events/sched/sched_switch/format
>
> name: sched_switch
> ID: 51
> format:
>        field:unsigned short common_type;       offset:0;       size:2; signed:0;
>        field:unsigned char common_flags;       offset:2;       size:1; signed:0;
>        field:unsigned char common_preempt_count;       offset:3;       size:1; signed:0;
>        field:int common_pid;   offset:4;       size:4; signed:1;
>        field:unsigned short common_migrate_disable;    offset:8;       size:2; signed:0;
>        field:int common_padding;       offset:10;      size:2; signed:0;
>
>
> The field for common_padding has the correct size and offset, but the
> use of "int" might confuse some parsers (and people that are reading
> it). This needs to be changed to "unsigned short".
>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
>
> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> index 37d3ffb..c71844c 100644
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -117,7 +117,7 @@ static int trace_define_common_fields(void)
>        __common_field(unsigned char, preempt_count);
>        __common_field(int, pid);
>        __common_field(unsigned short, migrate_disable);
> -       __common_field(int, padding);
> +       __common_field(unsigned short, padding);
>
>        return ret;
>  }
>

This one should also be included in 3.0.9-rt26
Thanks

John Kacur
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][RT] tracing: Show padding as unsigned short
  2011-11-19 13:09 ` John Kacur
@ 2011-11-21 16:11   ` Steven Rostedt
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2011-11-21 16:11 UTC (permalink / raw)
  To: John Kacur; +Cc: LKML, linux-rt-users, Thomas Gleixner

On Sat, 2011-11-19 at 14:09 +0100, John Kacur wrote:

> 
> This one should also be included in 3.0.9-rt26
> Thanks

Yes it was added in -rt3, where my stable was based on -rt2. My scripts
picked it up when I ran it against -rt3.

-- Steve



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-21 16:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-16 18:19 [PATCH][RT] tracing: Show padding as unsigned short Steven Rostedt
2011-11-19 13:09 ` John Kacur
2011-11-21 16:11   ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).