summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/EventLog
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2013-07-16 20:12:42 -0700
committerJamie Gennis <jgennis@google.com>2013-07-23 17:28:47 -0700
commit6547ff4327aa320fbc9635668d3fc66db7dd78f6 (patch)
tree038c4ccba9a547edddfedccd59c70d4eac85b7fc /services/surfaceflinger/EventLog
parentbdce8170479d0efb548514c1a290e1bfea711cfd (diff)
downloadframeworks_native-6547ff4327aa320fbc9635668d3fc66db7dd78f6.zip
frameworks_native-6547ff4327aa320fbc9635668d3fc66db7dd78f6.tar.gz
frameworks_native-6547ff4327aa320fbc9635668d3fc66db7dd78f6.tar.bz2
surfaceflinger: add frame duration logging
Change-Id: Ib414a45e7e191f23a2726cbbbeb606e9ce68a3b5
Diffstat (limited to 'services/surfaceflinger/EventLog')
-rw-r--r--services/surfaceflinger/EventLog/EventLog.cpp17
-rw-r--r--services/surfaceflinger/EventLog/EventLog.h8
-rw-r--r--services/surfaceflinger/EventLog/EventLogTags.logtags7
3 files changed, 21 insertions, 11 deletions
diff --git a/services/surfaceflinger/EventLog/EventLog.cpp b/services/surfaceflinger/EventLog/EventLog.cpp
index 815242b..47bab83 100644
--- a/services/surfaceflinger/EventLog/EventLog.cpp
+++ b/services/surfaceflinger/EventLog/EventLog.cpp
@@ -31,17 +31,22 @@ ANDROID_SINGLETON_STATIC_INSTANCE(EventLog)
EventLog::EventLog() {
}
-void EventLog::doLogJank(const String8& window, int32_t value) {
- EventLog::TagBuffer buffer(LOGTAG_SF_JANK);
- buffer.startList(2);
+void EventLog::doLogFrameDurations(const String8& window,
+ const int32_t* durations, size_t numDurations) {
+ EventLog::TagBuffer buffer(LOGTAG_SF_FRAME_DUR);
+ buffer.startList(1 + numDurations);
buffer.writeString8(window);
- buffer.writeInt32(value);
+ for (size_t i = 0; i < numDurations; i++) {
+ buffer.writeInt32(durations[i]);
+ }
buffer.endList();
buffer.log();
}
-void EventLog::logJank(const String8& window, int32_t value) {
- EventLog::getInstance().doLogJank(window, value);
+void EventLog::logFrameDurations(const String8& window,
+ const int32_t* durations, size_t numDurations) {
+ EventLog::getInstance().doLogFrameDurations(window, durations,
+ numDurations);
}
// ---------------------------------------------------------------------------
diff --git a/services/surfaceflinger/EventLog/EventLog.h b/services/surfaceflinger/EventLog/EventLog.h
index 2f1cd9b..5207514 100644
--- a/services/surfaceflinger/EventLog/EventLog.h
+++ b/services/surfaceflinger/EventLog/EventLog.h
@@ -30,7 +30,8 @@ class String8;
class EventLog : public Singleton<EventLog> {
public:
- static void logJank(const String8& window, int32_t value);
+ static void logFrameDurations(const String8& window,
+ const int32_t* durations, size_t numDurations);
protected:
EventLog();
@@ -72,8 +73,9 @@ private:
EventLog(const EventLog&);
EventLog& operator =(const EventLog&);
- enum { LOGTAG_SF_JANK = 60100 };
- void doLogJank(const String8& window, int32_t value);
+ enum { LOGTAG_SF_FRAME_DUR = 60100 };
+ void doLogFrameDurations(const String8& window, const int32_t* durations,
+ size_t numDurations);
};
// ---------------------------------------------------------------------------
diff --git a/services/surfaceflinger/EventLog/EventLogTags.logtags b/services/surfaceflinger/EventLog/EventLogTags.logtags
index c83692f..791e0e4 100644
--- a/services/surfaceflinger/EventLog/EventLogTags.logtags
+++ b/services/surfaceflinger/EventLog/EventLogTags.logtags
@@ -30,9 +30,12 @@
# 5: Id
# 6: Percent
# Default value for data of type int/long is 2 (bytes).
+#
+# See system/core/logcat/event.logtags for the master copy of the tags.
+
+# 60100 - 60199 reserved for surfaceflinger
-# surfaceflinger
-60100 sf_jank (window|3),(value|1)
+60100 sf_frame_dur (window|3),(dur0|1),(dur1|1),(dur2|1),(dur3|1),(dur4|1),(dur5|1),(dur6|1)
# NOTE - the range 1000000-2000000 is reserved for partners and others who
# want to define their own log tags without conflicting with the core platform.