Ability to log performance makers to ftrace for Tizen SPI tool
authorNick Holland <nick.holland@partner.samsung.com>
Fri, 21 Feb 2014 14:13:44 +0000 (14:13 +0000)
committerPaul Wisbey <p.wisbey@samsung.com>
Mon, 3 Mar 2014 18:59:38 +0000 (18:59 +0000)
commit2f2f1733457edef55fb839aafd443c3616996015
tree514bfbdbd01ba67bc2727f7d45675f1490a15e59
parentff9068957408302aad4c2bba01b7a534726219fc
Ability to log performance makers to ftrace for Tizen SPI tool

[Issue] N/A

[Problem]
When using ftrace to analyse what the system is doing there is no way to see
what task Dali is doing. E.g. when does it start running its update-thread
in relation to the V-SYNC and event processing.

[Cause] No code

[Solution]

Added extra bitmask option to DALI_LOG_PERFORMANCE environment variable,
Example:

DALI_LOG_PERFORMANCE=4 dali-demo

cat /sys/kernel/debug/tracing/trace

 TASK-PID    CPU#    TIMESTAMP  FUNCTION

  <...>-28189 [001] 269275.222762: tracing_mark_write: SPI_EV_DALI_PROCESS_EVENT_START
  <...>-28189 [001] 269275.222812: tracing_mark_write: SPI_EV_DALI_PROCESS_EVENT_END
  <...>-28196 [000] 269275.239498: tracing_mark_write: SPI_EV_DALI_V_SYNC
  <...>-28194 [005] 269275.239527: tracing_mark_write: SPI_EV_DALI_UPDATE_START
  <...>-28194 [005] 269275.240401: tracing_mark_write: SPI_EV_DALI_UPDATE_END
  <...>-28196 [000] 269275.256192: tracing_mark_write: SPI_EV_DALI_V_SYNC
  <...>-28194 [005] 269275.256228: tracing_mark_write: SPI_EV_DALI_UPDATE_START
  <...>-28194 [005] 269275.256330: tracing_mark_write: SPI_EV_DALI_UPDATE_END

The SPI_EV_ prefix is added to allow SPI tool to detect the markers.

Change-Id: Idec9714308aa19a9f1ef509057f6ba7d227c4649
14 files changed:
adaptors/base/interfaces/adaptor-internal-services.h
adaptors/base/interfaces/kernel-trace-interface.h [new file with mode: 0644]
adaptors/base/interfaces/performance-interface.h
adaptors/base/performance-logging/performance-interface-factory.cpp
adaptors/base/performance-logging/performance-interface-factory.h
adaptors/base/performance-logging/performance-marker.cpp
adaptors/base/performance-logging/performance-marker.h
adaptors/base/performance-logging/performance-server.cpp
adaptors/base/performance-logging/performance-server.h
adaptors/tizen/internal/common/adaptor-impl.cpp
adaptors/tizen/internal/common/adaptor-impl.h
adaptors/tizen/internal/common/file.list
adaptors/tizen/internal/common/kernel-trace.cpp [new file with mode: 0644]
adaptors/tizen/internal/common/kernel-trace.h [new file with mode: 0644]