* [PATCH] ftrace: Make output nicely spaced for up to 999 cpus
@ 2008-07-16 7:15 Michael Ellerman
2008-07-25 22:11 ` Steven Rostedt
0 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2008-07-16 7:15 UTC (permalink / raw)
To: srostedt; +Cc: Andrew Morton, linux-kernel
Currently some of the ftrace output goes skewiff if you have more
than 9 cpus, and some if you have more than 99.
Twiddle with the headers and format strings to make up to 999 cpus
display without causing spacing problems.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
kernel/trace/trace.c | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 868e121..be92a79 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1334,21 +1334,21 @@ seq_print_ip_sym(struct trace_seq *s, unsigned long ip, unsigned long sym_flags)
static void print_lat_help_header(struct seq_file *m)
{
- seq_puts(m, "# _------=> CPU# \n");
- seq_puts(m, "# / _-----=> irqs-off \n");
- seq_puts(m, "# | / _----=> need-resched \n");
- seq_puts(m, "# || / _---=> hardirq/softirq \n");
- seq_puts(m, "# ||| / _--=> preempt-depth \n");
- seq_puts(m, "# |||| / \n");
- seq_puts(m, "# ||||| delay \n");
- seq_puts(m, "# cmd pid ||||| time | caller \n");
- seq_puts(m, "# \\ / ||||| \\ | / \n");
+ seq_puts(m, "# _------=> CPU# \n");
+ seq_puts(m, "# / _-----=> irqs-off \n");
+ seq_puts(m, "# | / _----=> need-resched \n");
+ seq_puts(m, "# || / _---=> hardirq/softirq \n");
+ seq_puts(m, "# ||| / _--=> preempt-depth \n");
+ seq_puts(m, "# |||| / \n");
+ seq_puts(m, "# ||||| delay \n");
+ seq_puts(m, "# cmd pid ||||| time | caller \n");
+ seq_puts(m, "# \\ / ||||| \\ | / \n");
}
static void print_func_help_header(struct seq_file *m)
{
- seq_puts(m, "# TASK-PID CPU# TIMESTAMP FUNCTION\n");
- seq_puts(m, "# | | | | |\n");
+ seq_puts(m, "# TASK-PID CPU# TIMESTAMP FUNCTION\n");
+ seq_puts(m, "# | | | | |\n");
}
@@ -1432,7 +1432,7 @@ lat_print_generic(struct trace_seq *s, struct trace_entry *entry, int cpu)
comm = trace_find_cmdline(entry->pid);
trace_seq_printf(s, "%8.8s-%-5d ", comm, entry->pid);
- trace_seq_printf(s, "%d", cpu);
+ trace_seq_printf(s, "%3d", cpu);
trace_seq_printf(s, "%c%c",
(entry->flags & TRACE_FLAG_IRQS_OFF) ? 'd' : '.',
((entry->flags & TRACE_FLAG_NEED_RESCHED) ? 'N' : '.'));
@@ -1497,7 +1497,7 @@ print_lat_fmt(struct trace_iterator *iter, unsigned int trace_idx, int cpu)
if (verbose) {
comm = trace_find_cmdline(entry->pid);
- trace_seq_printf(s, "%16s %5d %d %d %08x %08x [%08lx]"
+ trace_seq_printf(s, "%16s %5d %3d %d %08x %08x [%08lx]"
" %ld.%03ldms (+%ld.%03ldms): ",
comm,
entry->pid, cpu, entry->flags,
@@ -1580,7 +1580,7 @@ static int print_trace_fmt(struct trace_iterator *iter)
ret = trace_seq_printf(s, "%16s-%-5d ", comm, entry->pid);
if (!ret)
return 0;
- ret = trace_seq_printf(s, "[%02d] ", iter->cpu);
+ ret = trace_seq_printf(s, "[%03d] ", iter->cpu);
if (!ret)
return 0;
ret = trace_seq_printf(s, "%5lu.%06lu: ", secs, usec_rem);
--
1.5.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ftrace: Make output nicely spaced for up to 999 cpus
2008-07-16 7:15 [PATCH] ftrace: Make output nicely spaced for up to 999 cpus Michael Ellerman
@ 2008-07-25 22:11 ` Steven Rostedt
2008-07-31 3:52 ` Michael Ellerman
0 siblings, 1 reply; 6+ messages in thread
From: Steven Rostedt @ 2008-07-25 22:11 UTC (permalink / raw)
To: Michael Ellerman; +Cc: srostedt, Andrew Morton, linux-kernel
On Wed, Jul 16, 2008 at 05:15:01PM +1000, Michael Ellerman wrote:
>
> Currently some of the ftrace output goes skewiff if you have more
> than 9 cpus, and some if you have more than 99.
>
> Twiddle with the headers and format strings to make up to 999 cpus
> display without causing spacing problems.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
-- Steve
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ftrace: Make output nicely spaced for up to 999 cpus
2008-07-25 22:11 ` Steven Rostedt
@ 2008-07-31 3:52 ` Michael Ellerman
2008-07-31 4:01 ` Andrew Morton
0 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2008-07-31 3:52 UTC (permalink / raw)
To: Steven Rostedt; +Cc: srostedt, Andrew Morton, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 879 bytes --]
On Fri, 2008-07-25 at 18:11 -0400, Steven Rostedt wrote:
> On Wed, Jul 16, 2008 at 05:15:01PM +1000, Michael Ellerman wrote:
> >
> > Currently some of the ftrace output goes skewiff if you have more
> > than 9 cpus, and some if you have more than 99.
> >
> > Twiddle with the headers and format strings to make up to 999 cpus
> > display without causing spacing problems.
> >
> > Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
>
> Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Hi Steven,
Is there an ftrace tree I should send this to? Or should I ask Andrew to
throw it in -mm ?
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ftrace: Make output nicely spaced for up to 999 cpus
2008-07-31 3:52 ` Michael Ellerman
@ 2008-07-31 4:01 ` Andrew Morton
2008-07-31 4:07 ` Michael Ellerman
2008-07-31 10:49 ` Steven Rostedt
0 siblings, 2 replies; 6+ messages in thread
From: Andrew Morton @ 2008-07-31 4:01 UTC (permalink / raw)
To: michael; +Cc: Steven Rostedt, srostedt, linux-kernel
On Thu, 31 Jul 2008 13:52:19 +1000 Michael Ellerman <michael@ellerman.id.au> wrote:
> On Fri, 2008-07-25 at 18:11 -0400, Steven Rostedt wrote:
> > On Wed, Jul 16, 2008 at 05:15:01PM +1000, Michael Ellerman wrote:
> > >
> > > Currently some of the ftrace output goes skewiff if you have more
> > > than 9 cpus, and some if you have more than 99.
> > >
> > > Twiddle with the headers and format strings to make up to 999 cpus
> > > display without causing spacing problems.
> > >
> > > Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> >
> > Signed-off-by: Steven Rostedt <srostedt@redhat.com>
I switched that to Acked-by:. A Signed-off-by: implies that you
(co)authored the patch or that it went through your hands. That does
not appear to be the case here.
> Hi Steven,
>
> Is there an ftrace tree I should send this to? Or should I ask Andrew to
> throw it in -mm ?
Normally Ingo handles ftrace but he will shortly be offline for a bit,
so I'll suck up whatever Ingoish things happen to cross my desk.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ftrace: Make output nicely spaced for up to 999 cpus
2008-07-31 4:01 ` Andrew Morton
@ 2008-07-31 4:07 ` Michael Ellerman
2008-07-31 10:49 ` Steven Rostedt
1 sibling, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2008-07-31 4:07 UTC (permalink / raw)
To: Andrew Morton; +Cc: Steven Rostedt, srostedt, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]
On Wed, 2008-07-30 at 21:01 -0700, Andrew Morton wrote:
> On Thu, 31 Jul 2008 13:52:19 +1000 Michael Ellerman <michael@ellerman.id.au> wrote:
>
> > On Fri, 2008-07-25 at 18:11 -0400, Steven Rostedt wrote:
> > > On Wed, Jul 16, 2008 at 05:15:01PM +1000, Michael Ellerman wrote:
> > > >
> > > > Currently some of the ftrace output goes skewiff if you have more
> > > > than 9 cpus, and some if you have more than 99.
> > > >
> > > > Twiddle with the headers and format strings to make up to 999 cpus
> > > > display without causing spacing problems.
> > > >
> > > > Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> > >
> > > Signed-off-by: Steven Rostedt <srostedt@redhat.com>
>
> I switched that to Acked-by:. A Signed-off-by: implies that you
> (co)authored the patch or that it went through your hands. That does
> not appear to be the case here.
Yep, acked-by is right here.
> > Hi Steven,
> >
> > Is there an ftrace tree I should send this to? Or should I ask Andrew to
> > throw it in -mm ?
>
> Normally Ingo handles ftrace but he will shortly be offline for a bit,
> so I'll suck up whatever Ingoish things happen to cross my desk.
Thanks. I take it the patch still applies, if not yell and I'll send you
a new version.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ftrace: Make output nicely spaced for up to 999 cpus
2008-07-31 4:01 ` Andrew Morton
2008-07-31 4:07 ` Michael Ellerman
@ 2008-07-31 10:49 ` Steven Rostedt
1 sibling, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2008-07-31 10:49 UTC (permalink / raw)
To: Andrew Morton; +Cc: michael, srostedt, linux-kernel
On Wed, 30 Jul 2008, Andrew Morton wrote:
> On Thu, 31 Jul 2008 13:52:19 +1000 Michael Ellerman <michael@ellerman.id.au> wrote:
>
> > On Fri, 2008-07-25 at 18:11 -0400, Steven Rostedt wrote:
> > > On Wed, Jul 16, 2008 at 05:15:01PM +1000, Michael Ellerman wrote:
> > > >
> > > > Currently some of the ftrace output goes skewiff if you have more
> > > > than 9 cpus, and some if you have more than 99.
> > > >
> > > > Twiddle with the headers and format strings to make up to 999 cpus
> > > > display without causing spacing problems.
> > > >
> > > > Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> > >
> > > Signed-off-by: Steven Rostedt <srostedt@redhat.com>
>
> I switched that to Acked-by:. A Signed-off-by: implies that you
> (co)authored the patch or that it went through your hands. That does
> not appear to be the case here.
Ack.
-- Steve
>
> > Hi Steven,
> >
> > Is there an ftrace tree I should send this to? Or should I ask Andrew to
> > throw it in -mm ?
>
> Normally Ingo handles ftrace but he will shortly be offline for a bit,
> so I'll suck up whatever Ingoish things happen to cross my desk.
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-07-31 10:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-16 7:15 [PATCH] ftrace: Make output nicely spaced for up to 999 cpus Michael Ellerman
2008-07-25 22:11 ` Steven Rostedt
2008-07-31 3:52 ` Michael Ellerman
2008-07-31 4:01 ` Andrew Morton
2008-07-31 4:07 ` Michael Ellerman
2008-07-31 10:49 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox