Commit 9b047020 authored by Michael Ellerman's avatar Michael Ellerman Committed by Paul Mackerras

[PATCH] ppc64: Cleanup proc printing of event types

The code that prints event counts by type uses a hand-coded number of tabs
to get the alignment right. Instead use a printf alignment which will allow
allow us to use the event_type strings elsewhere in the future.
Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
Acked-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent ed094150
...@@ -31,15 +31,15 @@ struct hvlpevent_queue hvlpevent_queue __attribute__((__section__(".data"))); ...@@ -31,15 +31,15 @@ struct hvlpevent_queue hvlpevent_queue __attribute__((__section__(".data")));
DEFINE_PER_CPU(unsigned long[HvLpEvent_Type_NumTypes], hvlpevent_counts); DEFINE_PER_CPU(unsigned long[HvLpEvent_Type_NumTypes], hvlpevent_counts);
static char *event_types[HvLpEvent_Type_NumTypes] = { static char *event_types[HvLpEvent_Type_NumTypes] = {
"Hypervisor\t\t", "Hypervisor",
"Machine Facilities\t", "Machine Facilities",
"Session Manager\t", "Session Manager",
"SPD I/O\t\t", "SPD I/O",
"Virtual Bus\t\t", "Virtual Bus",
"PCI I/O\t\t", "PCI I/O",
"RIO I/O\t\t", "RIO I/O",
"Virtual Lan\t\t", "Virtual Lan",
"Virtual I/O\t\t" "Virtual I/O"
}; };
static __inline__ int set_inUse(void) static __inline__ int set_inUse(void)
...@@ -248,7 +248,7 @@ static int proc_lpevents_show(struct seq_file *m, void *v) ...@@ -248,7 +248,7 @@ static int proc_lpevents_show(struct seq_file *m, void *v)
sum += per_cpu(hvlpevent_counts, cpu)[i]; sum += per_cpu(hvlpevent_counts, cpu)[i];
} }
seq_printf(m, " %s %10lu\n", event_types[i], sum); seq_printf(m, " %-20s %10lu\n", event_types[i], sum);
} }
seq_printf(m, "\n events processed by processor:\n"); seq_printf(m, "\n events processed by processor:\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment