Merge "metrics: Add touch_jank.sql"
diff --git a/Android.bp b/Android.bp
index bb73b17..d39f139 100644
--- a/Android.bp
+++ b/Android.bp
@@ -360,6 +360,9 @@
     "libprocinfo",
     "libunwindstack",
   ],
+  runtime_libs: [
+    "libdexfile",
+  ],
   export_include_dirs: [
     "src/profiling/memory/include",
   ],
diff --git a/CHANGELOG b/CHANGELOG
index a117359..796d7d3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,6 +9,25 @@
     *
 
 
+v19.0 - 2021-09-02:
+  Tracing service and probes:
+    * Added ftrace clock reporting to the trace
+  Trace Processor:
+    * Added support for longs/doubles to RUN_METRIC
+    * Fixed parsing of JSON escape sequences
+    * Fixed JSON trace detection in some situations
+    * Added power profile data for sunfish, redfin, and bramble
+    * Added experimental Python library for computing slice breakdowns
+  UI:
+    * Added local cacheing of traces
+    * Added icon to distinguish metric derived tracks
+    * Added release channel selector to feature flags page
+    * Fixed crash with null slice names
+  SDK:
+    * Added some missing NESTABLE_ASYNC legacy trace macros
+    * Fixed reporting of producer uid in --query
+
+
 v18.0 - 2021-08-02:
   Tracing service and probes:
     * Added cross-compiler toolchains for Linux-{arm,64} based on Debian Sid.
diff --git a/src/profiling/memory/client_unittest.cc b/src/profiling/memory/client_unittest.cc
index 47664e7..fce06fd 100644
--- a/src/profiling/memory/client_unittest.cc
+++ b/src/profiling/memory/client_unittest.cc
@@ -19,7 +19,6 @@
 #include <signal.h>
 
 #include <thread>
-#include <vector>
 
 #include "perfetto/base/thread_utils.h"
 #include "perfetto/ext/base/unix_socket.h"
@@ -51,12 +50,12 @@
 #endif
 
 TEST(ClientTest, MAYBE_GetSigaltStackRange) {
-  std::vector<char> stack(MINSIGSTKSZ);
+  char stack[4096];
   stack_t altstack{};
   stack_t old_altstack{};
-  altstack.ss_sp = stack.data();
-  altstack.ss_size = stack.size();
-  ASSERT_NE(sigaltstack(&altstack, &old_altstack), -1) << strerror(errno);
+  altstack.ss_sp = stack;
+  altstack.ss_size = sizeof(stack);
+  ASSERT_NE(sigaltstack(&altstack, &old_altstack), -1);
 
   struct sigaction oldact;
   struct sigaction newact {};
@@ -76,8 +75,8 @@
   PERFETTO_CHECK(sigaction(SIGUSR1, &oldact, nullptr) != -1);
   PERFETTO_CHECK(sigaltstack(&old_altstack, nullptr) != -1);
 
-  ASSERT_EQ(stackrange.begin, stack.data());
-  ASSERT_EQ(stackrange.end, &stack[MINSIGSTKSZ]);
+  ASSERT_EQ(stackrange.begin, stack);
+  ASSERT_EQ(stackrange.end, &stack[4096]);
   ASSERT_LT(stackrange.begin, stackptr);
   ASSERT_GT(stackrange.end, stackptr);
 }
diff --git a/src/trace_processor/importers/proto/profiler_util.cc b/src/trace_processor/importers/proto/profiler_util.cc
index c28f2fc..277da09 100644
--- a/src/trace_processor/importers/proto/profiler_util.cc
+++ b/src/trace_processor/importers/proto/profiler_util.cc
@@ -99,6 +99,16 @@
     return "com.google.android.as";
   }
 
+  if (location.find("DeviceIntelligenceNetworkPrebuilt") !=
+          base::StringView::npos) {
+    return "com.google.android.as.oss";
+  }
+
+  if (location.find("SettingsIntelligenceGooglePrebuilt") !=
+          base::StringView::npos) {
+    return "com.google.android.settings.intelligence";
+  }
+
   base::StringView gm("/product/app/PrebuiltGmail/PrebuiltGmail.apk");
   if (location.size() >= gm.size() && location.substr(0, gm.size()) == gm) {
     return "com.google.android.gm";
diff --git a/tools/gen_android_bp b/tools/gen_android_bp
index eba6048..c19413f 100755
--- a/tools/gen_android_bp
+++ b/tools/gen_android_bp
@@ -289,6 +289,7 @@
     module.static_libs.add('libbase')
     module.static_libs.add('liblzma')
     module.static_libs.add('libdexfile_support')
+    module.runtime_libs.add('libdexfile') # libdexfile_support dependency
 
 
 def enable_libunwind(module):
@@ -459,6 +460,7 @@
     self.shared_libs = set()
     self.static_libs = set()
     self.whole_static_libs = set()
+    self.runtime_libs = set()
     self.tools = set()
     self.cmd = None
     self.host_supported = False
@@ -502,6 +504,7 @@
     self._output_field(output, 'shared_libs')
     self._output_field(output, 'static_libs')
     self._output_field(output, 'whole_static_libs')
+    self._output_field(output, 'runtime_libs')
     self._output_field(output, 'tools')
     self._output_field(output, 'cmd', sort=False)
     self._output_field(output, 'host_supported')
diff --git a/ui/release/channels.json b/ui/release/channels.json
index fbdf151..e0e356d 100644
--- a/ui/release/channels.json
+++ b/ui/release/channels.json
@@ -2,11 +2,11 @@
   "channels": [
     {
       "name": "stable",
-      "rev": "8930cd247d1f73466338f3d90a772cf1e22666b6"
+      "rev": "8a77c5fd0ab64bb2748a9e94d11ba63504ee5418"
     },
     {
       "name": "canary",
-      "rev": "1753e784fd9055e04439f205d428e0b642d83d7e"
+      "rev": "4652f89f723ef379a30e49bdf25fdbf579717533"
     },
     {
       "name": "autopush",