coresight: enable stm logging for ftrace events and printk

Dup ftrace event traffic (including writes to trace_marker file from
userspace) to STM. Also dup printk traffic to STM. This allows Linux
tracing and log data to be correlated with other data transported over
STM.

Change-Id: Ieb0b856447f7667eb0005a6a884211dc46f50217
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
This commit is contained in:
Pratik Patel 2012-06-29 12:24:49 -07:00 committed by Stephen Boyd
parent d43a9870ef
commit 4c6ab53d5f
2 changed files with 10 additions and 6 deletions

View File

@ -14,12 +14,13 @@
#define __MACH_STM_H
enum {
OST_ENTITY_NONE = 0x0,
OST_ENTITY_FTRACE_EVENTS = 0x1,
OST_ENTITY_TRACE_PRINTK = 0x2,
OST_ENTITY_TRACE_MARKER = 0x4,
OST_ENTITY_DEV_NODE = 0x8,
OST_ENTITY_ALL = 0xF,
OST_ENTITY_NONE = 0x00,
OST_ENTITY_FTRACE_EVENTS = 0x01,
OST_ENTITY_TRACE_PRINTK = 0x02,
OST_ENTITY_TRACE_MARKER = 0x04,
OST_ENTITY_DEV_NODE = 0x08,
OST_ENTITY_PRINTK = 0x10,
OST_ENTITY_ALL = 0x1F,
};
enum {

View File

@ -41,6 +41,7 @@
#include <linux/cpu.h>
#include <linux/notifier.h>
#include <linux/rculist.h>
#include <linux/coresight-stm.h>
#include <asm/uaccess.h>
@ -959,6 +960,8 @@ asmlinkage int vprintk(const char *fmt, va_list args)
}
}
stm_log(OST_ENTITY_PRINTK, printk_buf, printed_len);
/*
* Copy the output into log_buf. If the caller didn't provide
* the appropriate log prefix, we insert them here