coresight: add stm logging to support optimization in trace printk
The function trace_printk() performs optimization by determining if there are no format parameters in argument string and calls appropriate apis to write to ftrace buffer. Add STM logging to support this optimization in order to allow CoreSight STM tracing for optimized trace_printk path. Change-Id: I1a77291e77410c6ed99474335a6d25742c409e47 Signed-off-by: Aparna Das <adas@codeaurora.org> Signed-off-by: Pratik Patel <pratikp@codeaurora.org> Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
This commit is contained in:
parent
e56ad58d2c
commit
89ee45617e
1 changed files with 5 additions and 1 deletions
|
@ -574,8 +574,11 @@ int __trace_puts(unsigned long ip, const char *str, int size)
|
|||
if (entry->buf[size - 1] != '\n') {
|
||||
entry->buf[size] = '\n';
|
||||
entry->buf[size + 1] = '\0';
|
||||
} else
|
||||
stm_log(OST_ENTITY_TRACE_PRINTK, entry->buf, size + 2);
|
||||
} else {
|
||||
entry->buf[size] = '\0';
|
||||
stm_log(OST_ENTITY_TRACE_PRINTK, entry->buf, size + 1);
|
||||
}
|
||||
|
||||
__buffer_unlock_commit(buffer, event);
|
||||
ftrace_trace_stack(&global_trace, buffer, irq_flags, 4, pc, NULL);
|
||||
|
@ -616,6 +619,7 @@ int __trace_bputs(unsigned long ip, const char *str)
|
|||
entry = ring_buffer_event_data(event);
|
||||
entry->ip = ip;
|
||||
entry->str = str;
|
||||
stm_log(OST_ENTITY_TRACE_PRINTK, entry->str, strlen(entry->str)+1);
|
||||
|
||||
__buffer_unlock_commit(buffer, event);
|
||||
ftrace_trace_stack(&global_trace, buffer, irq_flags, 4, pc, NULL);
|
||||
|
|
Loading…
Add table
Reference in a new issue