IP blocks allowing a variety of trace sources to log debugging
information to a pre-defined area have been introduced on a couple of
architecture [1][2]. These system trace blocks (also known as STM)
typically follow the MIPI STPv2 protocol [3] and provide a system wide
logging facility to any device, running a kernel or not, with access
to the block's log entry port(s).  Since each trace message has a
timestamp is it possible to correlate events happening in the entire
system rather than being confined to the logging facility of a single
entity.

This patch is using a very simple "stm_source" introduced in [2] to
duplicate the output of the trace event subsystem to an STM, in this
case coresight STM.  That way logging information generated by the
trace event subsystem and gathered in the coresight sink can be used
in conjunction with trace data from other board components, also
collected in the same trace sink.  This example is using coresight but
the same would apply to any architecture wishing to do the same.

So, this patch set has to depend on [2] from Alexander Shishkin.


Thanks,
Chunyan

[1]. https://lkml.org/lkml/2015/2/4/729
[2]. https://lkml.org/lkml/2015/7/6/206
[3]. http://mipi.org/specifications/debug#STP

Changes from RFC v3:
        * Update patch 1/3 based on the newest verson of STM patches from
           Alexander Shishkin
        * Addressed Steve's comments
        - Reused trace_raw_output_##call() rather than defined a new
          similar function.
        - Moved trace_event_stm_log() into trace_event_buffer_commit()

Changes from RFC v2:
        - Revised some types and variable's name according to the
          code of v4.2-rc1
        - Sorted this patch-set based on the v4.2-rc1
        - Splited the patch 2/3 of my last patch-set to make code can
           be compiled after each patch is applied in order.

Changes from RFC v1:
    - Marked module init/exit functions with __init/__exit key word
      according to the comments from Paul Bolle

Chunyan Zhang (2):
  trace: Introduce trace log output function for STM
  trace: Add an output of trace event logs to STM

Mathieu Poirier (1):
  STM trace event: Adding generic buffer interface driver

 drivers/hwtracing/stm/Kconfig           | 11 ++++++++
 drivers/hwtracing/stm/Makefile          |  2 ++
 drivers/hwtracing/stm/stm_trace_event.c | 46 +++++++++++++++++++++++++++++++++
 kernel/trace/Makefile                   |  1 +
 kernel/trace/trace_events.c             |  2 ++
 kernel/trace/trace_output.h             |  7 +++++
 kernel/trace/trace_output_stm.c         | 22 ++++++++++++++++
 7 files changed, 91 insertions(+)
 create mode 100644 drivers/hwtracing/stm/stm_trace_event.c
 create mode 100644 kernel/trace/trace_output_stm.c

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to