From aaa6da531fe2cbf685791d217f3ed6bd08392a43 Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Wed, 31 Oct 2012 13:21:28 -0700 Subject: [PATCH] coresight: have trace_printk only log the actual data to STM The trace_printk, when configured to process printk strings before storing them in the internal ring buffer, currently also logs the complete internal buffer data structure to the STM. Instead it should only log the string output obtained after processing the printk format and arguments. Changing the stm_log call to only log this relevant data. Change-Id: Ia33109f95fb84fa1606247a861deeaedd2f95d3f Signed-off-by: Pushkar Joshi --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 1076be8845d..700d2ae5f38 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -1630,7 +1630,7 @@ int trace_array_vprintk(struct trace_array *tr, memcpy(&entry->buf, trace_buf, len); entry->buf[len] = '\0'; if (!filter_check_discard(call, entry, buffer, event)) { - stm_log(OST_ENTITY_TRACE_PRINTK, event, size); + stm_log(OST_ENTITY_TRACE_PRINTK, entry->buf, len + 1); ring_buffer_unlock_commit(buffer, event); ftrace_trace_stack(buffer, irq_flags, 6, pc); }