lkml.org 
[lkml]   [2010]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 14/15] small_traces: Remove trace output of large fields.
Date
Google-Bug-Id: 3224547

Signed-off-by: David Sharp <dhsharp@google.com>
---
kernel/trace/trace.c | 6 ++++++
kernel/trace/trace_output.c | 18 ++++++++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index ed5c14f..177d4e5 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1747,6 +1747,7 @@ static void s_stop(struct seq_file *m, void *p)

static void print_lat_help_header(struct seq_file *m)
{
+#ifndef CONFIG_SMALL_TRACES
seq_puts(m, "# _------=> CPU# \n");
seq_puts(m, "# / _-----=> irqs-off \n");
seq_puts(m, "# | / _----=> need-resched \n");
@@ -1756,6 +1757,11 @@ static void print_lat_help_header(struct seq_file *m)
seq_puts(m, "# |||||/ delay \n");
seq_puts(m, "# cmd pid |||||| time | caller \n");
seq_puts(m, "# \\ / |||||| \\ | / \n");
+#else
+ seq_puts(m, "# CPU# delay \n");
+ seq_puts(m, "# cmd pid | time | caller \n");
+ seq_puts(m, "# \\ / | \\ | / \n");
+#endif
}

static void print_func_help_header(struct seq_file *m)
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 9e33b1f..d5d7575 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -531,6 +531,7 @@ seq_print_ip_sym(struct trace_seq *s, unsigned long ip, unsigned long sym_flags)
* Prints the generic fields of irqs off, in hard or softirq, preempt
* count and lock depth.
*/
+#ifndef CONFIG_SMALL_TRACES
int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry)
{
int ret;
@@ -566,6 +567,12 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry)

return trace_seq_printf(s, "%d", entry->lock_depth);
}
+#else
+int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry)
+{
+ return 1;
+}
+#endif

static int
lat_print_generic(struct trace_seq *s, struct trace_entry *entry, int cpu)
@@ -628,6 +635,7 @@ int trace_print_lat_context(struct trace_iterator *iter)

trace_find_cmdline(entry->pid, comm);

+#ifndef CONFIG_SMALL_TRACES
ret = trace_seq_printf(s, "%16s %5d %3d %d %08x %08lx [%08llx]"
" %ld.%03ldms (+%ld.%03ldms): ", comm,
entry->pid, iter->cpu, entry->flags,
@@ -637,6 +645,16 @@ int trace_print_lat_context(struct trace_iterator *iter)
abs_usecs % USEC_PER_MSEC,
rel_usecs / USEC_PER_MSEC,
rel_usecs % USEC_PER_MSEC);
+#else
+ ret = trace_seq_printf(s, "%16s %5d %3d %08lx [%08llx]"
+ " %ld.%03ldms (+%ld.%03ldms): ", comm,
+ entry->pid, iter->cpu, iter->idx,
+ ns2usecs(iter->ts),
+ abs_usecs / USEC_PER_MSEC,
+ abs_usecs % USEC_PER_MSEC,
+ rel_usecs / USEC_PER_MSEC,
+ rel_usecs % USEC_PER_MSEC);
+#endif
} else {
ret = lat_print_generic(s, entry, iter->cpu);
if (ret)
--
1.7.3.1


\
 
 \ /
  Last update: 2010-12-04 01:17    [W:0.277 / U:0.112 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site