diff options
author | Steve Kondik <steve@cyngn.com> | 2016-03-10 18:17:45 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-03-10 18:17:45 -0800 |
commit | a98331d1ae08eb57a4829674ce05f50de80c169c (patch) | |
tree | f6ff1a51d6e1b773781f6d71ddfd564f0a26237e | |
parent | efd11d3c0bd9dab4f83398acab27226b73da774f (diff) | |
parent | 6df23e81f762ec7bdf3d575582ad51aaef5172cf (diff) | |
download | frameworks_native-a98331d1ae08eb57a4829674ce05f50de80c169c.zip frameworks_native-a98331d1ae08eb57a4829674ce05f50de80c169c.tar.gz frameworks_native-a98331d1ae08eb57a4829674ce05f50de80c169c.tar.bz2 |
Merge tag 'android-6.0.1_r22' of https://android.googlesource.com/platform/frameworks/native into cm-13.0
Android 6.0.1 release 22
-rw-r--r-- | cmds/atrace/atrace.cpp | 1 | ||||
-rw-r--r-- | cmds/dumpstate/dumpstate.c | 17 | ||||
-rw-r--r-- | cmds/installd/commands.cpp | 23 | ||||
-rw-r--r-- | include/android/keycodes.h | 17 | ||||
-rw-r--r-- | include/input/InputEventLabels.h | 9 | ||||
-rw-r--r-- | include/media/openmax/OMX_Core.h | 6 | ||||
-rw-r--r-- | include/media/openmax/OMX_VideoExt.h | 9 | ||||
-rw-r--r-- | services/surfaceflinger/Android.mk | 4 | ||||
-rw-r--r-- | services/surfaceflinger/main_surfaceflinger.cpp | 7 |
9 files changed, 66 insertions, 27 deletions
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp index 26c5b4a..7201e77 100644 --- a/cmds/atrace/atrace.cpp +++ b/cmds/atrace/atrace.cpp @@ -93,6 +93,7 @@ static const TracingCategory k_categories[] = { { "sched", "CPU Scheduling", 0, { { REQ, "/sys/kernel/debug/tracing/events/sched/sched_switch/enable" }, { REQ, "/sys/kernel/debug/tracing/events/sched/sched_wakeup/enable" }, + { OPT, "/sys/kernel/debug/tracing/events/sched/sched_blocked_reason/enable" }, } }, { "irq", "IRQ Events", 0, { { REQ, "/sys/kernel/debug/tracing/events/irq/enable" }, diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c index 792f015..a2e4f4b 100644 --- a/cmds/dumpstate/dumpstate.c +++ b/cmds/dumpstate/dumpstate.c @@ -47,6 +47,7 @@ static char screenshot_path[PATH_MAX] = ""; #define PSTORE_LAST_KMSG "/sys/fs/pstore/console-ramoops" +#define RAFT_DIR "/data/misc/raft/" #define TOMBSTONE_DIR "/data/tombstones" #define TOMBSTONE_FILE_PREFIX TOMBSTONE_DIR "/tombstone_" /* Can accomodate a tombstone number up to 9999. */ @@ -261,6 +262,8 @@ static unsigned long logcat_timeout(char *name) { /* End copy from system/core/logd/LogBuffer.cpp */ +static const unsigned long logcat_min_timeout = 40000; /* ms */ + /* dumps the current system state to stdout */ static void dumpstate() { unsigned long timeout; @@ -333,23 +336,25 @@ static void dumpstate() { // dump_file("EVENT LOG TAGS", "/etc/event-log-tags"); // calculate timeout timeout = logcat_timeout("main") + logcat_timeout("system") + logcat_timeout("crash"); - if (timeout < 20000) { - timeout = 20000; + if (timeout < logcat_min_timeout) { + timeout = logcat_min_timeout; } run_command("SYSTEM LOG", timeout / 1000, "logcat", "-v", "threadtime", "-d", "*:v", NULL); timeout = logcat_timeout("events"); - if (timeout < 20000) { - timeout = 20000; + if (timeout < logcat_min_timeout) { + timeout = logcat_min_timeout; } run_command("EVENT LOG", timeout / 1000, "logcat", "-b", "events", "-v", "threadtime", "-d", "*:v", NULL); timeout = logcat_timeout("radio"); - if (timeout < 20000) { - timeout = 20000; + if (timeout < logcat_min_timeout) { + timeout = logcat_min_timeout; } run_command("RADIO LOG", timeout / 1000, "logcat", "-b", "radio", "-v", "threadtime", "-d", "*:v", NULL); run_command("LOG STATISTICS", 10, "logcat", "-b", "all", "-S", NULL); + run_command("RAFT LOGS", 600, SU_PATH, "root", "logcompressor", "-r", RAFT_DIR, NULL); + /* show the traces we collected in main(), if that was done */ if (dump_traces_path != NULL) { dump_file("VM TRACES JUST NOW", dump_traces_path); diff --git a/cmds/installd/commands.cpp b/cmds/installd/commands.cpp index 50346c8..09369ce 100644 --- a/cmds/installd/commands.cpp +++ b/cmds/installd/commands.cpp @@ -771,24 +771,11 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name, dex2oat_compiler_filter_flag, NULL) > 0; char dex2oat_threads_buf[PROPERTY_VALUE_MAX]; - bool have_dex2oat_threads_flag = false; - if (!post_bootcomplete) { - have_dex2oat_threads_flag = property_get("dalvik.vm.boot-dex2oat-threads", - dex2oat_threads_buf, - NULL) > 0; - // If there's no boot property, fall back to the image property. - if (!have_dex2oat_threads_flag) { - have_dex2oat_threads_flag = property_get("dalvik.vm.image-dex2oat-threads", - dex2oat_threads_buf, - NULL) > 0; - } - // If there's neither, fall back to the default property. - } - if (!have_dex2oat_threads_flag) { - have_dex2oat_threads_flag = property_get("dalvik.vm.dex2oat-threads", - dex2oat_threads_buf, - NULL) > 0; - } + bool have_dex2oat_threads_flag = property_get(post_bootcomplete + ? "dalvik.vm.dex2oat-threads" + : "dalvik.vm.boot-dex2oat-threads", + dex2oat_threads_buf, + NULL) > 0; char dex2oat_threads_arg[PROPERTY_VALUE_MAX + 2]; if (have_dex2oat_threads_flag) { sprintf(dex2oat_threads_arg, "-j%s", dex2oat_threads_buf); diff --git a/include/android/keycodes.h b/include/android/keycodes.h index 15bb786..421abe5 100644 --- a/include/android/keycodes.h +++ b/include/android/keycodes.h @@ -722,7 +722,22 @@ enum { AKEYCODE_NAVIGATE_PREVIOUS = 260, AKEYCODE_NAVIGATE_NEXT = 261, AKEYCODE_NAVIGATE_IN = 262, - AKEYCODE_NAVIGATE_OUT = 263 + AKEYCODE_NAVIGATE_OUT = 263, + /** Primary stem key for Wear + * Main power/reset button on watch. */ + AKEYCODE_STEM_PRIMARY = 264, + /** Generic stem key 1 for Wear */ + AKEYCODE_STEM_1 = 265, + /** Generic stem key 2 for Wear */ + AKEYCODE_STEM_2 = 266, + /** Generic stem key 3 for Wear */ + AKEYCODE_STEM_3 = 267, + AKEYCODE_MEDIA_SKIP_FORWARD = 272, + AKEYCODE_MEDIA_SKIP_BACKWARD = 273, + AKEYCODE_MEDIA_STEP_FORWARD = 274, + AKEYCODE_MEDIA_STEP_BACKWARD = 275, + /** Put device to sleep unless a wakelock is held. */ + AKEYCODE_SOFT_SLEEP = 276 // NOTE: If you add a new keycode here you must also add it to several other files. // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list. diff --git a/include/input/InputEventLabels.h b/include/input/InputEventLabels.h index c2ed503..c03c0f2 100644 --- a/include/input/InputEventLabels.h +++ b/include/input/InputEventLabels.h @@ -303,6 +303,15 @@ static const InputEventLabel KEYCODES[] = { DEFINE_KEYCODE(NAVIGATE_NEXT), DEFINE_KEYCODE(NAVIGATE_IN), DEFINE_KEYCODE(NAVIGATE_OUT), + DEFINE_KEYCODE(STEM_PRIMARY), + DEFINE_KEYCODE(STEM_1), + DEFINE_KEYCODE(STEM_2), + DEFINE_KEYCODE(STEM_3), + DEFINE_KEYCODE(MEDIA_SKIP_FORWARD), + DEFINE_KEYCODE(MEDIA_SKIP_BACKWARD), + DEFINE_KEYCODE(MEDIA_STEP_FORWARD), + DEFINE_KEYCODE(MEDIA_STEP_BACKWARD), + DEFINE_KEYCODE(SOFT_SLEEP), { NULL, 0 } }; diff --git a/include/media/openmax/OMX_Core.h b/include/media/openmax/OMX_Core.h index 521c223..f746a69 100644 --- a/include/media/openmax/OMX_Core.h +++ b/include/media/openmax/OMX_Core.h @@ -509,7 +509,7 @@ typedef enum OMX_EVENTTYPE OMX_EventKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ OMX_EventVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - /** Event when tunneled decoder has rendered an output + /** Event when tunneled decoder has rendered an output or reached EOS * nData1 must contain the number of timestamps returned * pEventData must point to an array of the OMX_VIDEO_RENDEREVENTTYPE structs containing the * render-timestamps of each frame. Component may batch rendered timestamps using this event, @@ -518,6 +518,10 @@ typedef enum OMX_EVENTTYPE * * If component is doing frame-rate conversion, it must signal the render time of each * converted frame, and must interpolate media timestamps for in-between frames. + * + * When the component reached EOS, it must signal an EOS timestamp using the same mechanism. + * This is in addition to the timestamp of the last rendered frame, and should follow that + * frame. */ OMX_EventOutputRendered = 0x7F000001, OMX_EventMax = 0x7FFFFFFF diff --git a/include/media/openmax/OMX_VideoExt.h b/include/media/openmax/OMX_VideoExt.h index 34c0405..3971bc5 100644 --- a/include/media/openmax/OMX_VideoExt.h +++ b/include/media/openmax/OMX_VideoExt.h @@ -203,10 +203,17 @@ typedef struct OMX_VIDEO_SLICESEGMENTSTYPE { OMX_BOOL bEnableLoopFilterAcrossSlices; } OMX_VIDEO_SLICESEGMENTSTYPE; -/** Structure to return timestamps of rendered output frames for tunneled components */ +/** Structure to return timestamps of rendered output frames as well as EOS + * for tunneled components. + */ typedef struct OMX_VIDEO_RENDEREVENTTYPE { OMX_S64 nMediaTimeUs; // timestamp of rendered video frame OMX_S64 nSystemTimeNs; // system monotonic time at the time frame was rendered + // Use INT64_MAX for nMediaTimeUs to signal that the EOS + // has been reached. In this case, nSystemTimeNs MUST be + // the system time when the last frame was rendered. + // This MUST be done in addition to returning (and + // following) the render information for the last frame. } OMX_VIDEO_RENDEREVENTTYPE; #ifdef __cplusplus diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk index c2b74ed..37ad4ac 100644 --- a/services/surfaceflinger/Android.mk +++ b/services/surfaceflinger/Android.mk @@ -141,6 +141,10 @@ LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--e LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\" LOCAL_CPPFLAGS := -std=c++11 +ifneq ($(ENABLE_CPUSETS),) + LOCAL_CFLAGS += -DENABLE_CPUSETS +endif + LOCAL_SRC_FILES := \ main_surfaceflinger.cpp diff --git a/services/surfaceflinger/main_surfaceflinger.cpp b/services/surfaceflinger/main_surfaceflinger.cpp index 6127cf6..e8464a3 100644 --- a/services/surfaceflinger/main_surfaceflinger.cpp +++ b/services/surfaceflinger/main_surfaceflinger.cpp @@ -42,6 +42,13 @@ int main(int, char**) { set_sched_policy(0, SP_FOREGROUND); +#ifdef ENABLE_CPUSETS + // Put most SurfaceFlinger threads in the system-background cpuset + // Keeps us from unnecessarily using big cores + // Do this after the binder thread pool init + set_cpuset_policy(0, SP_SYSTEM); +#endif + // initialize before clients can connect flinger->init(); |